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
Why does Stata allow a random effect without a level-1 effect?The command for an HLM model in Stata is: Code: mixed depvar indepvars . . . || levelvar: revars, …
Annualized Sharpe ratios and VolatilitiesGood morning, I have Monthly excess returns of two portfolios P1 and P8 over 29 years. For my maste…
Select US listed companies only (Compustat)Hi all, I would like to select only the firms (gvkey) in my dataset which are listed in the US (US …
How to estimate the risk difference with margins after meprobitDear Statalist, Happy new year! Here is my question: Code: clear set seed 2020 set obs 400 set …
Multiple imputation and multi-level data questionHello, I am looking for help with multiple imputation and multi-level data. At level 2 I only have …
Subscribe to:
Post Comments (Atom)
0 Response to How to browse data with complicated condition
Post a Comment