Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: AW: st: RE: RE: difference between robust and cluster option


From   Christopher Baum <kit.baum@bc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: AW: st: RE: RE: difference between robust and cluster option
Date   Sat, 17 Jul 2010 08:40:45 -0400

<>
On Jul 17, 2010, at 2:33 AM, Jing wrote:

> according to Petersen (2009) (estimating standard errors in finance
> panel data sets: comparing approaches, review of financial studies,
> 2009.), the standard errors clustered by firm and time can be a useful
> robustness check. My dataset is a sample of 560 firms over 9 years
> (unbalanced). Could you please advise me how I can cluster both firm and
> time in my analysis by using stata. cos when typing "xtreg, fe cluster
> (year)", the result shows "panels are not nested within clusters".

ssc install xtivreg2, replace
ssc install ivreg2, replace
ssc install ranktest, replace

xtivreg2 depvar indepvars, fe cluster(year firm)

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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index