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
Related Posts with reshaping missing variables
command for conditional likelihood regression using timesseries dataDear mr/mrs, I am currently trying to make a regression in STATA using times-series data on GNP. I …
sfpanel postestimationDear Stata Users, I'm trying to estimate technical efficiency with -sfpanel post estimation command…
Collinearity among multiple category IVs in survey dataHi folks, Insights please! I am running logit model with complex survey data. All the independent …
Using collapse to calculate standard errors with survey dataHello, I have been trying to use -collapse- to calculate standard errors of the mean, binomial (seb)…
Using r() with recodeI am trying to recode a variable using the values from the return list but from the error message I …
Subscribe to:
Post Comments (Atom)
0 Response to reshaping missing variables
Post a Comment