[R] plm "within" models: is the correct F-statistic reported?

Achim Zeileis Achim.Zeileis at uibk.ac.at
Wed Mar 17 20:37:01 CET 2010


On Wed, 17 Mar 2010, Liviu Andronic wrote:

>>  In short:
>>   - plm(..., model = "within") offers a convenient approach of what
>>     is usually done in this kind of analysis.
>>
> Unfortunately plm(..., effect="twoways", model = "within") fails on my
> particular unbalanced panel data (100% CPU and the task never
> finishes); there are no such issues with "individual" or "time". Worse
> is that I cannot replicate the issue on dummy data.

Hmm, that sounds strange. Maybe something about the data pre-processing 
went wrong? Depending on how unbalanced the data is, there might not be 
enough observations. Does the lm() version of the "twoways" model work 
ok? If so, I guess you will have to try to find out whether it's your 
preparation of the data or the fault of plm() that it does not work.

>>   - You can replicate everything by hand using lm() but have to take
>>     care of everything yourself. But you do get the same results.
>>
>>   - Don't mix the two approaches.
>>
> I wanted to avoid displaying >2000 individuals in the regression
> coefficients,

And you want fixed effects for all >2000 individuals?

> the reason for trying the mix-up. I also tried to do the
> trick using a plm() model for the null, too, but there is no anova
> method for these.

waldtest() from "lmtest" does work in this context. Furthermore, "plm" 
provides various specialized tests for certain test problems.

Best,
Z

>> gr_fe1 <- plm(invest ~ value + capital, data = pgr,
> +    model = "within", effect="twoways")
>> gr_fe1_null <- plm(invest ~ 0 + firm + year, data = pgr, model = "pooling")
>> anova(gr_fe1_null, gr_fe1)
> Error in UseMethod("anova") :
>  no applicable method for 'anova' applied to an object of class
> "c('plm', 'panelmodel')"
>
> And having checked the source, I wouldn't venture to implement one.
> I'm still a bit stuck on how to proceed. Thank you
> Liviu
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>



More information about the R-help mailing list