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
Loops within weeklong periodHello Statalist. Happy New Year. This post is an extension of a previous post of mine that I've yet…
Want to regress institutions and some qualitative variables on GDPI want to regress institutions and some qualitative variables on GDP, I know that institutions varia…
Calculating common ownership based on a formula with multiple summationsDear all, Assume that we have a dataset that has the following form: Code: input firm_id year …
Correlation of one variable between players in panel dataHi all, I am working with a panel dataset regarding financial products. The dataset has about 200,0…
Stationarity from effective federal funds rate (DFF) from FREDHello, First of all, I wish you a happy new year. I am using the effective federal funds rate in p…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping many variables if all observations contain a certain text
Post a Comment