Page 1 of 1

how would I only include observation for certain crosssection

Posted: Wed Oct 03, 2018 8:29 pm
by msyed
Dear all,

I am using a panel data set with 900 cross-section (firms) and period between 2010-2016. I would like to remove cross-sections with only two years of data available. So, essentially I like to keep observations for firms with more than two years of observations in my analysis. I guess, i can do this at the series level or when I am estimating the output from the model. I am not sure about the condition that I need to set. Any help will be great.

Re: how would I only include observation for certain crosssection

Posted: Sat Oct 06, 2018 12:11 am
by Lalan_dk
maybe something like this:

Code: Select all

series numberyear=@obsby(crossid, crossid) smpl if numberyear>2