R/vifx.R

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 gencve package in your browser

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

gencve documentation built on May 2, 2019, 6:08 a.m.