I am now cleaning my firm-level data. I have panel data which contains 19,150 observations/year for 2010-2015. I have done the following command in STATA 14.0 to indicate my panel data:
xtset firmcode, year yearly
Then I would like to drop the observation if its capital is zero during six year (2010-2015). Here is the example of my data:
Year firmcode capital
2010 24 0
2011 24 0
2012 24 0
2013 24 0
2014 24 0
2015 24 0
2010 25 0
2011 25 0
2012 25 1000
2013 25 0
2014 25 0
2015 25 0
As the firm with firmcode 24 does not have data of its capital so I will remove it, so my data will remain only firm with firmcode 25, as follows:
Year firmcode capital
2010 25 0
2011 25 0
2012 25 1000
2013 25 0
2014 25 0
2015 25 0
Would you please help how to write the command for this?
Best regards,
Aisah
Related Posts with How to drop sequence of observations when the observations are zero sequently
Chamberlain Random Effect Probit (Correlated Random Effect Probit) in Multinomial Choice ModelHi, I am finding a command running the Chamberlain random effect probit model in multinomial choice …
HAZ scoreHi, I don't understand why there are still HAZ missing value on my data, even all my height, age, an…
Omitted variables because of collinearity in Fixed Effect ModelHello everyone, I am currently doing my thesis about the determinants of corporate cash holding in a…
Interpretation of coefficients of an interacted variable in the presence of fixed effectsDear all, I'm running the following regressions: reg Y X i.id i.year if C==1 (1) reg Y X i.id i.ye…
Preparing data for multiple membership multilevel modelsHello! I am trying to prepare my dataset for a multiple membership multilevel model, and am getting …
Subscribe to:
Post Comments (Atom)
0 Response to How to drop sequence of observations when the observations are zero sequently
Post a Comment