Recently the “usdm” package has the “vifstep” and “vifcor” functions. ]]>

Thank you for sending through the references. I am here with a query. You made it clear in your posts that the response variables are not involved in the process; only predictors are used to compute linear regression models and, finally, the VIF.

So, what I would assume is that in the first step, one predictor variable is taken at a time and is regressed against the rest of the predictors using backward regression. After each regression, the R-squared is calculated which is then input in the VIF formula. Is that correct?

Many thanks

Irf

Zuur, A.F., Ieno, E.N. Smith, G.M. Analysing Ecological Data. Springer, New York.

Montgomery, D.C., Peck, E.A. 1992. Introduction to Linear Regression Analysis. Wiley, New York.

Thank you sharing this function. It works like a charm and is very useful. I read through the whole blog which brought further clarity.

Just a quick question: how would you like this code to be cited in a scientific paper/journal article?

Regards,

Irf

parms<-runif(num.vars,-10,10)

y<-rand.vars %*% matrix(parms) + rnorm(num.obs,sd=20)

I would like to replace that "created" response variable with a binary outcome variable from my own data (e.g., tobacco use status). I'm new to R (usually a SAS user) and can't quite tell if what I've tried is correctly updating the response variable in the function. I would not include this response variable in the list of potential explanatory variables. Thank you again!

]]>