[R] vif in package car: there are aliased coefficients in the model

Rodolfo Pelinson rodolfopelinson at gmail.com
Fri Mar 27 20:06:49 CET 2015


Hello. I'm trying to use the function vif from package car in a lm. However
it returns the following error:
"Error in vif.default(lm(MDescores.sitescores ~ hidroperiodo + localizacao
+  : there are aliased coefficients in the model"

When I exclude any predictor from the model, it returns this warning
message:
"Warning message: In cov2cor(v) : diag(.) had 0 or NA entries; non-finite
result is doubtful"

When I exclude any other predictor from the model vif finally works. I
can't figure it out whats the problem. This are the results that R returns
me:

> vif(lm(MDescores.sitescores ~ hidroperiodo + localizacao + area +
profundidade + NTVM +  NTVI + PCs...c.1.., data = MDVIF))
Error in vif.default(lm(MDescores.sitescores ~ hidroperiodo + localizacao +
 :   there are aliased coefficients in the model

> vif(lm(MDescores.sitescores ~ localizacao + area + profundidade + NTVM +
 NTVI + PCs...c.1.., data = MDVIF))
             GVIF Df GVIF^(1/(2*Df))
localizacao   NaN  2             NaN
area          NaN  1             NaN
profundidade  NaN  1             NaN
NTVM          NaN  1             NaN
NTVI          NaN  1             NaN
PCs...c.1..   NaN  1             NaN
Warning message:
In cov2cor(v) : diag(.) had 0 or NA entries; non-finite result is doubtful

Thanks.
-- 
Rodolfo Mei Pelinson.

	[[alternative HTML version deleted]]



More information about the R-help mailing list