Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

rstudio

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?

like image 761
Steve Dee Avatar asked Dec 04 '25 03:12

Steve Dee


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")
like image 159
Till Avatar answered Dec 05 '25 17:12

Till



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!