I'm in bit of a pickle here and turning to you all for help. I'm a SAS beginner so pardon me if this is a very basic question. Basically, I have this dataset:
ID Gender Type
1 F X
F Y
2 F Y
M Y
F X
Both the first two observations "belong" to ID=1 and the last three observations "belong" to ID=2. How do I fill in the missing ID values? I've tried using retain but SAS won't let me run any data step where I have a "by id" statement because this dataset isn't sorted by id. However, I can't sort it by ID because then I lose the grouping.
Any solutions here?