Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: balancing panel data & plotting R squared


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: balancing panel data & plotting R squared
Date   Wed, 16 May 2007 12:48:45 +0100

Suppose your panelid is -id- and that you have
annual data for each of 10 years. Then 

bysort id : keep if _N == 10 

keeps only complete panels. 

Otherwise, see -help statsby-. 

Nick 
n.j.cox@durham.ac.uk 

agostino@unical.it

> does anyone of you know how to balance panel data keeping 
> only the individuals 
> with observations in all the years?
> Further, is there a way of plotting the R squared (of separate annual 
> regressions) against the years, without copying the R values 
> by hand to 
> generate a new variable?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index