Description Usage Arguments Details Author(s) See Also Examples
Plots the cross-validation curve from a cv.grpreg
object, along with standard error bars.
1 2 3 4 |
x |
A |
log.l |
Should horizontal axis be on the log scale? Default is TRUE. |
type |
What to plot on the vertical axis. |
selected |
If |
vertical.line |
If |
col |
Controls the color of the dots (CV estimates). |
... |
Other graphical parameters to |
Error bars representing approximate +/- 1 SE (68% confidence
intervals) are plotted along with the estimates at value of
lambda
. For rsq
and snr
, these confidence
intervals are quite crude, especially near zero, and will hopefully be
improved upon in later versions of grpreg
.
Patrick Breheny
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Birthweight data
data(Birthwt)
X <- Birthwt$X
group <- Birthwt$group
# Linear regression
y <- Birthwt$bwt
cvfit <- cv.grpreg(X, y, group)
plot(cvfit)
par(mfrow=c(2,2))
plot(cvfit, type="all")
## Logistic regression
y <- Birthwt$low
cvfit <- cv.grpreg(X, y, group, family="binomial")
plot(cvfit)
par(mfrow=c(2,2))
plot(cvfit, type="all")
|
Loading required package: Matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.