Hi. I am working with paneldata.
I want to remove individuals who don't have a value for each year in the period, but also keeping those who always have zero value. I will try to illustrate:
ID year X
1 2010 0
1 2011 0
1 2012 0
2 2010 0.01
2 2011 0
2 2012 0.011
3 2010 0.01
3 2011 0.01
3 2012 0.011
I want to keep indivdiuals like number one here. This is to serve as a control group in my DD regression. I want to remove individual two because treatment is not stable over the years. And I want to keep individual 3, because treatment occours in every year.
All help is appreciated. Thank you!
Related Posts with Removing individuals based on criteria
Jackknife xtqregUsing the Grunfeld data, this works: Code: bootstrap, reps(50) cluster(company) idcluster(comp): xt…
Panel DataHi, I am using panel data with the wave variable ranging from 1 to 10 however i would like to focus…
matching single county with unique congressional districtAccording to us house election data a single county for a specific state belongs to multiple congres…
Combine multiple rows into one when end_date = start_dateHi there, I am looking for a code that combine the rows when end_date = start_date for a certain ID…
Testing stability of reggression discontinuity model (TED)Hello Statalisters, I need your valuable advice. Having applied in my analysis regression discontin…
Subscribe to:
Post Comments (Atom)
0 Response to Removing individuals based on criteria
Post a Comment