Dear All,
I am having trouble with a command in Stata and no matter how much I researched beforehand, I could not find a solution. I have a dataset that contains cross sectional data. There are around 1500 variables, where many of them contain from observation 1 to observation 29000 the value -1, i.e. ''missing''. I am trying to create a command that tells Stata that if a variable has only the value -1 from the first observation until the last one, then it should drop this variable and this should be done for all the variables that have this problem. Does anyone know how to proceed?
I thank you all for your time and your opinion.
Best.
Lola
Related Posts with Dropping many variables if all observations contain a certain text
Creating an indicator variable in Stata long formatHi all, I'm having difficulty with creating indicator variables in a dataset in long format in stat…
Issue with a Looped Tobit Regression Predicting too high valuesHi Stata Forum I have an issue with a tobit regression predicting too high values. As a part of me …
Pooled OLS with Clustered Robust S.E vs Random Effects (Robust)?I am working on a project with a time invariant independent variable (childhood nutrition at age 5).…
How would I apply a control function approach (CF)/Two-Stage Residual Inclusion (2SRI), when the first stage is an ordinal probit/logit?I read this post, with a very nice answer by Mr. Wooldridge: Sven: It's easy to extend Procedur…
Listing specific lowsI'm wondering if I can list pre-selected rows. Let's say, I would like to list var1 and var2 for obs…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping many variables if all observations contain a certain text
Post a Comment