I'm trying to run a robust F-Test using a PLM object in R. I'm running the following code:
library('wooldridge')
data(wagepan,package='wooldridge')
library('plm')
pdata<-pdata.frame(wagepan,index=c("nr","year"))
fdreg<-plm(lwage~educ*(d81+d82+d83+d84+d85+d86+d87)+union,data=pdata,model="fd")
summary(fdreg)
library('car')
H0<-matchCoefs(fdreg,"educ")
linearHypothesis(fdreg,H0)
linearHypothesis(fdreg,H0,vcov=vcovHC(fdreg,"HC1"))
I'm getting the following error message:
'arg' should be one of “arellano”, “white1”, “white2”
Can anyone help me with this?
The error occurs in the 2nd line for
linearHypothesis
."HC1"
is a value for argumenttype
but the way you input it, it is used for argumentmethod
due to order of arguments (see?plm::vcovHC
for the arguments and their order).I suggest you change your line to specify the argument explicitly, e.g.,