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
Merging datasets with one to many mappingHi All, My first dataset is an input-output matrix, that resembles the following: Code: * Exampl…
Indexing observations for a subject while skipping missing valuesHello Statalisters, I am sure I am missing something obvious but I looked up on the forum and onlin…
P value for area under the curve using Iroc commandI am using Stata 13. I have run a logistic regression to check the association of Obesity with sever…
Fama MacBeth model - factor loadings: asreg with fmb omits coefficientsDear all, I want to perform Fama and Macbeth (1973) using asreg, but results shows omitted, what is…
Generating a graph for Odds Ration and CI from logistic regression resultsI want to plot the results of logistic regression in Stata 13. The DV is Obesity. The x-axis will sh…
Subscribe to:
Post Comments (Atom)
0 Response to reshaping missing variables
Post a Comment