Calculate measures of collinearity

collinearity(formula, data, format = c("SeIF", "degrees", "radians",
  "VIF"))

Arguments

formula

a formula giving, on the right-hand side, the explanatory variables to be considered. Iteractions, etc. may also be specified.

data

a data frame from which to draw the variables in the formula

format

choice of "SeIF" for inflation of standard errors, "degrees" or "radians" for collinearity described as an angle or "VIF" for the variance inflation factor (which is the square of SeIF).

Examples

collinearity( ~ cyl * disp * hp, data = mtcars)
#> expl_vars SeIF #> 1 cyl 19.38242 #> 2 disp 52.50735 #> 3 hp 38.99003 #> 4 cyl:disp 70.96065 #> 5 cyl:hp 57.14974 #> 6 disp:hp 152.54661 #> 7 cyl:disp:hp 170.88251
collinearity( ~ cyl * disp * hp, data = mtcars, format = "degrees")
#> expl_vars degrees #> 1 cyl 2.9573819 #> 2 disp 1.0912613 #> 3 hp 1.4696593 #> 4 cyl:disp 0.8074570 #> 5 cyl:hp 1.0026065 #> 6 disp:hp 0.3755979 #> 7 cyl:disp:hp 0.3352953