Why don't we get the same thing for the (centered) variance inflation factor of a given coefficient
1/ when we use the ready to use VARINF instruction
2/ when we compute this (centered) variance inflation factor "by hand" according to the help content : "The centered VIF is the ratio of the variance of the coefficient estimate from the original equation divided by the variance from a coefficient estimate from an equation with only that regressor and a constant".
e.g. the following code :
Code: Select all
create u 100
genr x2 = @runif(1,100)
genr x3 = x2 + nrnd
genr x4 = X2 + X3 + nrnd
genr y = 1 + X2 + X3 + X4 + 100 * nrnd
equation eq1.ls y c x2 x3 x4
equation eq2.ls y c x2
scalar vif2 = (eq1.@stderrs(2)^2) / (eq2.@stderrs(2)^2)
eq1.varinf
show vif2
