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