Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to drop observations in panel


From   Christopher Baum <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: How to drop observations in panel
Date   Sat, 6 Aug 2011 06:28:12 -0400

<>
On Aug 6, 2011, at 2:33 AM, statalist-digest wrote:

> I am new to stata. I am working on an unbalanced data set where firm is the cross section identifier
> and the time identifier is year. 
> Estimation of the model will be based
> on GMM-sys. some of my firms have only one or two years of observations. 
> Should I drop these firms and how I can do it in stata. in other words, any firm
> that have less than three years of data 
> available (less than three observations) will not be included in the estimation.
> In the moment i can't figure it out by myself.
> Hopefully someone can help me.


Given that you are using DPD, you should first be concerned about the issue of gaps in the panel (if you are using the first diffeence transformation, as is likely). You might 

findit onespell

for a routine that takes care of that. Once your data have been onespelled, you can do something like

egen enn=count(invest), by(company)
drop if enn < 5

or whatever threshold you want to set.

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index