Hi!
I have just appended three datasets from 2010, 2011 and 2012. They have many identical variables, but the 2011 dataset has some new variables that aren't in the 2010 dataset, and the 2012 dataset has some new variables that aren't in either the 2010 or 2011 dataset.
In the new dataset, I therefore have lots of missing observations for the new variables that aren't available in 2010. How can I drop all these new variables and keep only the ones that are observed in all years?
Note: there are roughly 250 new variables in 2011 and 200 new variables in 2012, so it would be tedious to drop them manually.
Thank you!
Related Posts with Drop variables which are missing all observations in a year
Direct effect switches sign when moderator is added - what does this mean?Hello! I have examined a panel and performed various analyses in STATA, whose results you can see …
Logistic RegressionI am fairly new to Statistics. I have a large datatset where N=50,000. I have a dichotomous outcome …
A Solution for Publication Quality Regression Tables (from STATA to .DOC)Dear friends, I often use Latex to generate publication-quality tables and figures and the STATA-La…
short term and long term analysisHello everyone, I want to test the short-term and long-term impact of a certain independent variabl…
Error r(603) has suddenly started to occur in Mac OSRunning Stata 17 on Mac OS 11.6.6. Until two days ago (1/6/22) I was able to run the following comm…
Subscribe to:
Post Comments (Atom)
0 Response to Drop variables which are missing all observations in a year
Post a Comment