Description Usage Arguments Value Author(s) References See Also Examples
Displays all possible pairs of bivariate ridge trace plots for a given set of predictors.
1 2 3 4 5 6 | ## S3 method for class 'ridge'
pairs(x, variables, radius = 1, lwd = 1, lty = 1,
col = c("black", "red", "darkgreen", "blue",
"darkcyan", "magenta", "brown", "darkgray"),
center.pch = 16, center.cex = 1.25, digits = getOption("digits") - 3,
diag.cex = 2, diag.panel = panel.label, fill = FALSE, fill.alpha = 0.3, ...)
|
x |
A |
variables |
Predictors in the model to be displayed in the plot: an integer or character vector, giving the indices or names of the variables. |
radius |
Radius of the ellipse-generating circle for the covariance ellipsoids. |
lwd, lty |
Line width and line type for the covariance ellipsoids. Recycled as necessary. |
col |
A numeric or character vector giving the colors used to plot the covariance ellipsoids. Recycled as necessary. |
center.pch |
Plotting character used to show the bivariate ridge estimates. Recycled as necessary. |
center.cex |
Size of the plotting character for the bivariate ridge estimates |
fill |
Logical vector: Should the covariance ellipsoids be filled? Recycled as necessary. |
fill.alpha |
Numeric vector: alpha transparency value(s) for filled ellipsoids. Recycled as necessary. |
digits |
Number of digits to be displayed as the (min, max) values in the diagonal panels |
diag.cex |
Character size for predictor labels in diagonal panels |
diag.panel |
Function to draw diagonal panels. Not yet implemented: just uses internal |
... |
Other arguments passed down |
None. Used for its side effect of plotting.
Michael Friendly
Friendly, M. (2012). The Generalized Ridge Trace Plot: Visualizing Bias and Precision. In press, Journal of Computational and Graphical Statistics, 21.
ridge
for details on ridge regression as implemented here
plot.ridge
, traceplot
for other plotting methods
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | longley.y <- longley[, "Employed"]
longley.X <- data.matrix(longley[, c(2:6,1)])
lambda <- c(0, 0.005, 0.01, 0.02, 0.04, 0.08)
lridge <- ridge(longley.y, longley.X, lambda=lambda)
pairs(lridge, radius=0.5, diag.cex=1.75)
if (require("ElemStatLearn")) {
py <- prostate[, "lpsa"]
pX <- data.matrix(prostate[, 1:8])
pridge <- ridge(py, pX, df=8:1)
pairs(pridge)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.