On Wed, 27 Nov 2013, Jyotirmoy Bhattacharya wrote:
I was trying to understand how GRETL calculates R^2 for
fixed-effects
panel-data models as the value it produces is different from Stata and R's
plm library.
Premise: I'm no big fan of R^2 in any shape or form, so consider my answer
as coming from someone who, in applied work, never even looks at the R^2
index.
However, it may be argued that a measure of the correlation between your
data and the prediction that the model gives you is a desirable
descriptive statistic to have. The problem here is: which model and which
data.
The fixed-effect model could be conceived in two ways which are, in my
mind, equally defensible: (a) a nice, clean way to get rid of the
individual effects by using the fact that in the linear model a sufficient
stsistic is easy to compute or (b) as a clever way to estimate the
"important" parameters of a model in which you want to include (for some
reason) individual dummies. If you take perspective (b), then your data is
the unmodified y and your model includes the unit dummies as well, and
gretl is already doing the "right thing" (especially considering that it
could be useful, for instructional purposes, to show the students that FE
and a regression with lots of dummies are in practice the same thing);
however, if you take stance (a), then your data is really (y-pmean(y)) in
hansl parlance, or if you prefer $y_{it} - \bar{y}_i$, and your model just
includes the betas, which are the coefficients of the deviations of the x
variables from their per-unit means. In this case, the relevant measure of
R^2 would be what plm reports and what stata calls the "within" R^2.
After discussing the issue for a bit, Allin and I thought it's probably
fair to report both, and simply drop the "adjusted" R^2, which makes
little sense in this context, considering that interpretations (a) and (b)
lead you to consider a different number of regressors, so you'd have to
define two parallel measures of \bar{R}^2 too. We'll commit the change in
CVS in a few hours.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------