Hello,
I'm trying to create a dataset with years ranging from 1975 to 2018. However one of the variables (famid) i'm using only exists after 1984. I then used famid to create another variable (primeagefam). I created the variable and tried to make it missing for years before 1984 but STATA is giving me an error message when i tried reshaping the data (i'm guessing you can't reshape missing values in stata?) My end goal is to have primagefam as one of my columns and all the years before 1984 to be missing (i have other columns as well but all of them have data for all the years starting from 1974). Can you please tell me how i can do this?
Here is part of my code (line 41 and 46 is were i tried to create the missing variables)
Array
0 Response to reshaping missing variables
Post a Comment