I have firm-level data for 2010-2015. I would like to browse variable output and capital for specific firmcode that has zero capital in 2010. I tried to do this in STATA with the following command:
br firmcode if capital==0 & year==2010
Then I got the list of 2966 specified firmcodes, such as 71, 133, 155, etc. In order to correct zero capital in 2010 by inputing the capital value in the following year and by assuming no investment in 2010, so I need to browse those firmcodes by using the following command:
br year firmcode output capital inv inv2 if firmcode==71|firmcode==133|firmcode==155|firmcode= =502|firmcode==534|firmcode==747|firmcode==853|fir mcode==1335|firmcode==1346|
firmcode==1349|firmcode==1352|firmcode==1583|firmc ode==1646|firmcode==1647|firmcode==1658|firmcode== 1660|firmcode==1712|firmcode==1724|firmcode==1774| firmcode==1797|firmcode==1941|firmcode==1948|firmc ode==1951|firmcode==1987
As the firmcodes with zero capital in 2010 are 2966, it will take alot of time if I do by this method. I have to browse many times. Is there another way to browse the specified condition without writing down all he firmcodes?
Related Posts with How to browse data with complicated condition
New package on SSC: qualtricsloadThanks to Kit Baum, my new package qualtricsload is available from SSC. qualtricsload downloads su…
Hausman testHi, I'm running a panel regression. These are my panel commands, followed by regression commands fo…
WlsI want to obtain WLS(Weighted Least Square) estimate susing -[aweight]- , I do not know what should …
Firth Logit and Survey dataI am attempting to run a firth logit (rare event) using data from a nationally-representative survey…
Keep only most recent measure with panel dataHello all. I have a long-format database that looks like this: id wave var1 var2 1 1 85 . 1 2…
Subscribe to:
Post Comments (Atom)
0 Response to How to browse data with complicated condition
Post a Comment