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]

st: xtpcse - "no time periods are common to all panels"


From   Wayne Sandholtz <[email protected]>
To   [email protected]
Subject   st: xtpcse - "no time periods are common to all panels"
Date   Thu, 17 Nov 2011 09:45:15 -0800

Thanks to Kit, Gordon, and Nick for their helpful answers to my question about -xtpcse-. I had assumed that all of the panels included at least some common years, but that was not the case. There may be easier ways to check this, but here is how I did it:

* how many panels are present in each year?
tabstat year, by(year) stat(N)
xtset panel_id year
* what is the pattern of missing years?
xtdescribe
by panel_id: gen yrs=_N
tab yrs
sort yrs panel_id year
* visually checking the sorted data, it was easy to see that countries with fewer than 12 years of data were the problem
drop if yrs<12
drop yrs

Wayne Sandholtz


*
*   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