[R] coeftest with covariance matrix

Achim Zeileis Achim.Zeileis at uibk.ac.at
Thu Mar 16 22:31:49 CET 2017


On Thu, 16 Mar 2017, alfonso.carfora at uniparthenope.it wrote:

> Hi all,
>
>
> I want to ask you which is the difference between the specifyng and not 
> specifyng the covariance matrix of the estimated coefficients when 
> performing the coeftest command.

coeftest(object, ...) computes Wald statistics for all coefficients. Hence 
coef(object) is used to extract the coefficients and then, by default, 
vcov(object) is used to extract the variance-covariance matrix. For lm() 
models this computes the "usual" covariance matrix estimate assuming 
homoskedastic and uncorelated errors.

When you supply coeftest(object, vcov = vcovHC) then a 
heteroscedasticity-consistent covariance matrix estimate is used (HC3 by 
default).

See vignette("sandwich", package = "sandwich") for more details.

> I'm estimating a VECM model and I want to test the significance of the 
> short-run casual effects of the explanatory variables:
>
> mod<-cajorls(ca.jo(data[,4:6], ecdet = "const", type="eigen", K=2, 
> spec="longrun"))$rlm
>
> The command:
>
> coeftest(mod)
>
> give me different results with respect to this one:
>
> V<-vcovHC(mod)
> coeftest(mod,V)
>
>



More information about the R-help mailing list