Description Usage Arguments Details Value Author(s) References See Also Examples
The traceplot
function extends and simplifies the univariate ridge trace plots
for ridge regresssion provided in the plot
method for
lm.ridge
1 2 3 4 |
x |
A |
X |
What to plot as the horizontal coordinate, one of |
col |
A numeric or character vector giving the colors used to plot the ridge trace curves. Recycled as necessary. |
pch |
Vector of plotting characters used to plot the ridge trace curves. Recycled as necessary. |
xlab |
Label for horizontal axis |
ylab |
Label for vertical axis |
xlim, ylim |
x, y limits for the plot |
... |
Other arguments passed to |
For ease of interpretation, the variables are labeled at the side of the plot (left, right)
where the coefficient estimates are expected to be most widely spread. If xlim
is
not specified, the range of the X
variable is extended slightly to accommodate the
variable names.
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.
Hoerl, A. E. and Kennard R. W. (1970). "Ridge Regression: Applications to Nonorthogonal Problems", Technometrics, 12(1), 69-82.
ridge
for details on ridge regression as implemented here
plot.ridge
, pairs.ridge
for other plotting methods
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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)
traceplot(lridge)
#abline(v=lridge$kLW, lty=3)
#abline(v=lridge$kHKB, lty=3)
#text(lridge$kLW, -3, "LW")
#text(lridge$kHKB, -3, "HKB")
traceplot(lridge, X="df")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.