Skip to content

lmtest package - Difference between vcov and vcov.

2 messages · T.Riedle, Achim Zeileis

#
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().

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. 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.
#
On Sun, 19 Feb 2017, T.Riedle wrote:

            
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..
Yes, because then the specification goes into '...' rather than 'vcov' and 
is interpreted as a rule for model updating. This cannot work, though.