Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Rsquared within using id & time dummies. xtreg returns collineality error


From   "Rodrigo Alfaro" <ralfaro@bu.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Rsquared within using id & time dummies. xtreg returns collineality error
Date   Thu, 24 Nov 2005 12:09:14 -0500

I am not sure what is your purpose, but I suggest to do the following:
* fixed with time-dummies
qui tab id, g(dum)
xtreg vary varx dum*, fe

R-2 (within) is in e(r2). areg does not compute R-2 (within) but can
use robust (White) std error correction.

Rodrigo.

----- Original Message ----- From: "Jorge Morgenstern" <jmorgenstern@utdt.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Thursday, November 24, 2005 11:07 AM
Subject: st: Rsquared within using id & time dummies. xtreg returns collineality error



Hi everyone,
I have a cross-section time series model, with panel variable for country and monthly data.
I'm trying to run a regresion with country and year dummies, to control for idiosyncratic issues.
I can run the model with "xi: areg vary varx i.id*i.time", but when I try to use the "xi: xtreg vary varx i.id*i.time", but it returns an error saying that the regressors are collinear with the panel variable.
I was able to run the model using xtreg only with i*time dummies, but it returned different coefficients than those from the areg, then it's not performing what I wanted.
How can I obtain the Rsquared within for my model?

Regards,
Jorge.

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

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