Is there a Package i need to install to get coeftest in R?

Viewed 13433

I am trying to get the HC standard errors from a set of data using

coeftest(Partc, df = Inf, vcov = vcovHC(fm1, type = "HC1"))

but it returns the error:

Error in coeftest(Partc, df = Inf, vcov = vcovHC(fm1, type = "HC1")) : 
   could not find function "coeftest"

Am I missing the package required to do this?

1 Answers

The package lmtest contains a function called coeftest, that seems to be what you are looking for.

Installing that package should solve your issue.

install.packages("lmtest")
Related