Diana Marcela Martinez Ruiz
2012-Jun-28 17:28 UTC
[R] SVY: variance inflation factor VIF with complex survey
Hello, Seeking a way to get the variance inflation factor VIF for a model of regression in complex survey, I have understood that without this package (SURVEY) RGui VIF obtained as follows: fit <- lm(mpg~disp+hp+wt+drat, data=mtcars) vif(fit) But I want to know if survey, Vif is obtained so vif( svyglm(api00~ell+meals+mobility, design=dstrat)) Thank you, happy day [[alternative HTML version deleted]]
Dear Diana, I'm not sure that I entirely understand your question, but the vif() function in the car package should work, I think, with objects produced by svyglm(), since the latter inherit from "lm" and since the vif.lm() method works from the covariance matrix of the coefficients. I hope this helps, John ------------------------------------------------ John Fox Sen. William McMaster Prof. of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox/ On Thu, 28 Jun 2012 12:28:54 -0500 Diana Marcela Martinez Ruiz <dianammr06 at hotmail.com> wrote:> > Hello, > > Seeking a way to get the variance inflation factor VIF for a model of regression in complex survey, I have understood that without this package (SURVEY) RGui VIF obtained as follows: > > fit <- lm(mpg~disp+hp+wt+drat, data=mtcars) > > vif(fit) > > But I want to know if survey, Vif is obtained so > > vif( svyglm(api00~ell+meals+mobility, design=dstrat)) > > Thank you, happy day > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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.