My dataset consists of time-series observation of US firms with identifiers like gvkey, cusip and a construct variable cusip_fiscalyear. I use data between 1995 and 2005, but need to drop all observations of a particular firm if the observations are less than 8 years. I suppose I need to generate a kind of frequency variable? And I suppose I can use any one of the three identifiers.
Related Posts with Drop observations if not meeting frequency criterium
Lagged treatment effect in DD model with multiple treatment periodsDear All, I have a question about how to include lagged treatment effect in a Difference-in-Differen…
Replacing values using a loopDear Stata users, I would like to execute the following command through a loop: replace q33_1=.a i…
xtset with unbalanced nested panel dataHello I am trying to perform a fixed effect analysis on student achievement gain scores. My data is …
Replacing variables with loopsreplace c_q33_1=.a if c_q29_1 ==.a replace c_q33_2=.a if c_q29_2 ==.a replace c_q33_3=.a if c_q29_3 …
loop questionHi all, I am new on Stata so my knowledge is limited. I have a variable that indicates whether the …
Subscribe to:
Post Comments (Atom)
0 Response to Drop observations if not meeting frequency criterium
Post a Comment