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
Recode date into consecutive days from first dateHi there, I am trying to generate a new variable (called daynumber) that recodes a date (currently …
New on SSC: CONJOINT: a module to analyse and visualise conjoint (factorial) experimentsWith thanks as always to Kit Baum, a new package called -conjoint- is now available on the SCC. con…
Identify weekdays for the high and low points in time series analysisDear all, I have a question about how to identify the weekday of the high and low points in time se…
Merge datasets with different structuresHi All, I want to merge some datasets with my main data set but the structure of the datasets diff…
Model Selection for Categorical dataHi, I have a trouble fitting a model for a categorical data. My dependent variable recorded by a t …
Subscribe to:
Post Comments (Atom)
0 Response to Drop variables which are missing all observations in a year
Post a Comment