Description Usage Arguments Details Author(s) References Examples
The colldx
function implements the Belsley, Kuh, and Welsch approach to diagnosing collinearity.
1 | colldx(mod, digits)
|
mod |
a model object for one of several supported model classes. |
digits |
minimal number of significant digits, see |
The colldx
function is the R version of a SAS macro originally titled collingenmodv9c
. Beau Bruce adapted the colldiag
function from the perturb
package to compute condition indices as in Matthew Zack's SAS macro.
The macro (and this R function) implement a method suggested by Belsley, Kuh, and Welsch in Regression Diagnostics: Identifying Influential Data and Sources of Collinearity (1980).
Several model classes are currently supported (though have not been extensively tested): glm
, coxph
, geeglm
, geese
, gee
, lmerMod
, glmerMod
, glmmML
, and yagsResult
.
Written by Beau Bruce, modified for compatibility with various model classes by Ryan Patrick Kyle <ryan.kyle@mail.mcgill.ca>.
Belsley DA. A Guide to Using the Collinearity Diagnostics. Computer Science in Economics and Management 2014; 4:33-50.
1 2 3 4 5 6 7 | # As used by perturb/colldiag, example of SAS collinearity diagnostics from
# https://stats.idre.ucla.edu/sas/webbooks/reg/chapter2/regressionwith-saschapter-2-regression-diagnostics/
# 2.4 Tests for Collinearity
library(foreign)
elemapi <- read.dta("https://stats.idre.ucla.edu/stat/data/elemapi2.dta")
m2 <- lm(api00 ~ acs_k3+avg_ed+grad_sch+col_grad+some_col, data=elemapi)
colldx(m2, digits=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.