alfonso.carfora at uniparthenope.it
2017-Mar-16 21:03 UTC
[R] coeftest with covariance matrix
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)
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) > >