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
Instrument as control variable for main hypothesis in earlier section of a paper, when 2SLS only used in later sectionDear Statalist Community, I was wondering about good practice in economcetric research, in particul…
Estout with PCA outputHi, I am trying to export PCA output to a word document. I have found useful documentation online (…
evealuating balance after eteffectsHello all, Is there a reason why tebalance summarize is not available after eteffects? Is this beca…
Regression with 150 variablesHi, I want to run a simple regression but I have 150 variables and I do not want to type all of the…
Conformability error, r(503)Hi everyone, I have a problem when I want to input a matrix in Stata. First I local some results and…
Subscribe to:
Post Comments (Atom)
0 Response to reshaping missing variables
Post a Comment