Description Usage Arguments Details Value Author(s) References See Also Examples
Produces a tableplot of collinearity diagnostics for a linear regression model (Friendly & Kwan, 2009), showing condition indices and variance proportions for the quantitative predictors. The goal is to highlight the variables involved in one or more nearly collinear relations among the predictors.
The default scheme is to show the column of condition indices at the left, using color to indicate danger (red), warning (yellow) and OK (green) with colors designed to reproduce as ordered in B/W. The variance proportions for the predictors are shown in a block at the right, using white, pink, red for small, medium and large values.
1 2 3 4 5 6 7 8 |
values |
A |
cell.specs |
Specifications for |
prop.col |
A vector of colors used to display the values of the variance proportions. |
cond.col |
A vector of colors used to display the values of the condition indices |
cond.max |
Maximum value for a condition index displayed. |
prop.breaks |
Breaks for the variance proportions. |
cond.breaks |
Breaks for the condition indices |
show.rows |
Vector of indices of the rows of the |
... |
Other arguments to pass down to |
The values of variance proportions are multiplied by 100 and rounded.
None. Used for its side-effect.
Michael Friendly
Friendly, M. & Kwan, E. (2009). Where's Waldo: Visualizing Collinearity Diagnostics The American Statistician, 63(1), 56-65.
colldiag
for calculation of collinearity diagnostics
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Baseball data example, from Friendly & Kwan (2009)
if (require(vcd) && require(perturb)) {
# model, with transformed variables
Baseball$logsal <- log(Baseball$sal87)
Baseball$years7 <- pmin(Baseball$years,7)
base.mod <- lm(logsal ~ years+atbat+hits+homeruns+runs+rbi+walks, data=Baseball)
if (require(car)) {
# examine variance inflation factors
vif(base.mod)
}
# corresponds to SAS: / collinoint option
cd <- colldiag(base.mod, add.intercept=FALSE, center=TRUE)
# simplified display
print(cd, fuzz=.3)
tableplot(cd)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.