R/vifx.R

Defines functions vifx

Documented in vifx

vifx <- function(X){
  Xs <- scale(X)
  xx <- t(Xs)%*%Xs/(nrow(X)-1) #put in correlation form
  diag(solve(xx)) #VIF are the diagnonal elements of the inverse
}

Try the bestglm package in your browser

Any scripts or data that you put into this service are public.

bestglm documentation built on March 26, 2020, 7:25 p.m.