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
Interpretation of "/logs" in Stata17 output using mestregDear Stata users, Can someone please kindly explain in simple terms what the "/logs" output refers …
Plotting a bar graph with two y-axisdear colleagues I am trying two create a bar graph with two y-axis from my data and code below and a…
Combining surveys with distinct analytical weightsHi. I have a dataset which combine 14 household surveys in 14 countries. Each survey was conducted …
regress with panel data Code: * Example generated by -dataex-. To install: ssc install dataex clear input str7 ym byte hs_c…
eivreg in rolling window setting (estimates not stored properly)Dear Statalist, I might be shooting my shot with this post but I want to implement the eivreg comma…
Subscribe to:
Post Comments (Atom)
0 Response to reshaping missing variables
Post a Comment