[R] lmtest package - Difference between vcov and vcov.

Achim Zeileis Achim.Zeileis at uibk.ac.at
Sun Feb 19 20:39:56 CET 2017


On Sun, 19 Feb 2017, T.Riedle wrote:

> Dear all,
>
> I want to run a regression using coeftest() in combination with the 
> waldtest() function from the lmtest package. I am confused about the 
> argument vcov. The coeftest uses vcov. whereas according to the manual 
> waldtest uses vcov and I am not sure about the difference between vcov. 
> in coeftest() and vcov in waldtest().

In both cases this is intended to be used as "vcov = ..." by the end-user, 
e.g., "vcov = sandwich" etc. The reason why "vcov." rather than "vcov" was 
used was to avoid name confusions in pre-NAMESPACE times.

The 'trick' with vcov. (rather than vcov) could not be used in waldtest() 
because that always requires exact matching due to the preceeding ... 
argument..

> If I use vcov. and vcov in the waldtest, I get different results for the 
> F-test and the p-value. In addition, vcov. returns an error message that 
> for numeric model specifications all values have to be >=1.

Yes, because then the specification goes into '...' rather than 'vcov' and 
is interpreted as a rule for model updating. This cannot work, though.

> The sandwich package vignette (e.g. p. 10) uses vcov = ... as argument 
> in the coeftest() function.
>
>
> Hence, my question is which argument to use in the both functions coeftest() and waldtest(). Shall I use vcov. in coeftest() and vcov in waldtest() or should I use vcov in both functions?
>
>
>
> I kindly ask for your help.
>
>
>
> Thanks in advance.
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>



More information about the R-help mailing list