In SPSS, how do I pull forward longitudinal data to blank cells for each id?
Example:
ID Time Gender
1 1 M
1 2 .
1 3 .
2 1 F
2 2 .
2 3 .
3 1 .
3 2 F
3 3 .
How do I get to this?
ID Time Gender Gender_Recoded
1 1 M M
1 2 . M
1 3 . M
2 1 F F
2 2 . F
2 3 . F
3 1 . .
3 2 F F
3 3 . F
and then once I am able to carry forward, is there a command to do the reverse like in example 3, 1 so that F will pull up?
Thank you!!!