I am trying to do work with CPS data which works in waves (surveyed four months, then off for eight, then back on for four months, the survey months being waves). I am using waves 1-4. One of the variables is age, and I only want to keep the first response in wave 1 and copy it to the age variable for waves 2-4. Each person has a unique ID identifier (CPSIDP) that I can use to match the waves.
My professor said this, but I am not sure I understand:
"On the question of picking off wave 1 age etc: There are a number of ways it could work. It depends on variable names and the organization of the dataset that you're working with. Here is one way that can work if you have one big data file that has a column for age in each of the possible surveys:
First drop all of the observations that are not wave one. Then you can generate a new variable that is the sum of the age variables. Of course, the age doesn't exist for any of the months that are not wave==1. So, this should just give you the age in wave==1. It might be that the generate command adding up the various age variables doesn't work because the age is coded as missing in the other periods (and the sum when any one element is missing is mis"
Thank you in advance!
My professor said this, but I am not sure I understand:
"On the question of picking off wave 1 age etc: There are a number of ways it could work. It depends on variable names and the organization of the dataset that you're working with. Here is one way that can work if you have one big data file that has a column for age in each of the possible surveys:
First drop all of the observations that are not wave one. Then you can generate a new variable that is the sum of the age variables. Of course, the age doesn't exist for any of the months that are not wave==1. So, this should just give you the age in wave==1. It might be that the generate command adding up the various age variables doesn't work because the age is coded as missing in the other periods (and the sum when any one element is missing is mis"
Thank you in advance!
Comment