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

Bert Gunter bgunter.4567 at gmail.com
Tue Feb 20 21:58:18 CET 2018


Generally speaking, statistical questions are O/T here, but sometimes they
intersect with on-topic R programming issues and do get responses. So if
you do not get a response here, try a statistics forum, like
stats.stackexchange.com  .

Cheers,
Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

On Tue, Feb 20, 2018 at 11:44 AM, Dung Nguyen <dungnguyen.ivi at gmail.com>
wrote:

> 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]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list