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]] ______________________________________________ R-help@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.