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?
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")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With