Date: Wed, 4 Nov 2009 07:51:40 -0500
Reply-To: Cara Booker <cbook76@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Cara Booker <cbook76@GMAIL.COM>
Subject: Recode Variables
Hi,
I have a data set which is in long form. I have some variables (i.e. gender,
ethnicity) where the data is missing for specific waves, although I know the
values at baseline. I would like to copy the baseline value onto the rest of
the waves. Here is an example:
ID Wave Eth Sex
1 1 1 2
1 2 . .
1 3 . .
1 5 . .
2 1 2 1
2 2 . .
2 5 . .
2 7 . .
I would like it to look like:
ID Wave Eth Sex
1 1 1 2
1 2 1 2
1 3 1 2
1 5 1 2
2 1 2 1
2 2 2 1
2 5 2 1
2 7 2 1
Thank you,
Cara
|