How do I name a model after correcting for heteroskedasticity in R? Basically, how do I save a model so that it includes the robust standard errors? I am using the plm package if that makes a difference.
So let's say I have these two models below:
model1<-plm(x~y+z,data=dataset,model="within")
model2<-plm(x~y,data=dataset,model="within")
But then I correct for heteroskedasticity:
coeftest(model1,vcovHC)
coeftest(model2,vcovHC)
How do I save the model so I can do a Wald test to compare the two? I tried doing the following below but it doesn't seem to be correct:
model1B<-coeftest(model1,vcovHC)
model2B<-coeftest(model2,vcovHC)
Basically I am trying to be able to do the following but with robust standard errors:
waldtest(model1,model2)