[R] "Within" model in plm package: is the reported R-squared correct?

Dung Nguyen dungnguyen.ivi at gmail.com
Tue Feb 20 20:44:12 CET 2018


Hi everyone,

I am doing panel data analysis using the 'plm' package. However, I have
noticed that the plm() function reports a different value of R-squared from
the R-squared of the lm() function with time-demeaned data. To be clear, I
have tried to compute the within model both manually (run an OLS regression
with time-demeaned data using lm()) and by using plm(). The two methods
give me 2 different values of R-squared and I am not sure which one is the
correct one for the fixed-effect estimation.

I am new to R and panel data analysis thus it will be so great if someone
can explain the difference to me.

Thank you in advance.

Bests,

MiYung

	[[alternative HTML version deleted]]



More information about the R-help mailing list