coeftest with covariance matrix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

coeftest with covariance matrix

alfonso.carfora
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.

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)

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: coeftest with covariance matrix

Achim Zeileis-4

On Thu, 16 Mar 2017, [hidden email] 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)
>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...