So I am running a fixed effects model using the plm
package in R, and I am wondering how I can compare which of two models are more suitable.
For example, here is the code for two models I have constructed:
library(plm)
eurofix <- plm(rlogmod ~ db+gdp+logvix+gb+i+logtdo+fx+ld+euro+core,
data=euro,
model="within")
eurofix2 <- plm(rlogmod ~ db+gdp+logvix+gb+i+logtdo+ld+euro+core,
data=euro,
model="within")
I know that with a regular lm
call, I can compare two models by running an anova test, but that does not seem to work in this case. I always get the following error:
Error in UseMethod("anova") :
no applicable method for 'anova' applied to an object of class "c('plm', 'panelmodel')"
Does anybody know what to do with the plm
package? Is the Wald Test appropriate?