[R] error when using vcovHC()

oliviax oliviax at 126.com
Wed Apr 22 03:00:40 CEST 2009


Dear R users, 

I meet with an unsolved error when using the function vcovHC() in package
sandwich().

I have a balanced panel dataset, and I run the following codes:

> library(plm)
> data<-plm.data(data, c("state","year"))
> fn<-plm(y~x1+x2, data=data, method="within", effect="individual")
> library(lmtest)
> coeftest(fn,vcovHC(fn, type="HC0"))

But I always get a warning: "Error in UseMethod("estfun") : no applicable
method for "estfun""

Do anyone knows the why it is like this and how to solve it?? Thank you very
much. 

Sincerely, 
Olivia

-- 
View this message in context: http://www.nabble.com/error-when-using-vcovHC%28%29-tp23166624p23166624.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list