Description Usage Arguments Value Author(s) See Also Examples
Summary method for cv.grpreg
or cv.grpsurv
objects
1 2 3 4 |
object |
A |
x |
A |
digits |
Number of digits past the decimal point to print out. Can be a vector specifying different display digits for each of the five non-integer printed values. |
... |
Further arguments passed to or from other methods. |
summary(cvfit)
produces an object with S3 class
"summary.cv.grpreg"
. The class has its own print method and
contains the following list elements:
penalty |
The penalty used by |
model |
The type of model: |
n |
Number of observations |
p |
Number of regression coefficients (not including the intercept). |
min |
The index of |
lambda |
The sequence of |
cve |
Cross-validation error (deviance). |
r.squared |
Proportion of variance explained by the model, as estimated by cross-validation. |
snr |
Signal to noise ratio, as estimated by cross-validation. |
sigma |
For linear regression models, the scale parameter estimate. |
pe |
For logistic regression models, the prediction error (misclassification error). |
Patrick Breheny
grpreg
, cv.grpreg
,
cv.grpsurv
, plot.cv.grpreg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Birthweight data
data(Birthwt)
X <- Birthwt$X
group <- Birthwt$group
# Linear regression
y <- Birthwt$bwt
cvfit <- cv.grpreg(X, y, group)
summary(cvfit)
# Logistic regression
y <- Birthwt$low
cvfit <- cv.grpreg(X, y, group, family="binomial")
summary(cvfit)
# Cox regression
data(Lung)
cvfit <- with(Lung, cv.grpsurv(X, y, group))
summary(cvfit)
|
grLasso-penalized linear regression with n=189, p=16
At minimum cross-validation error (lambda=0.0115):
-------------------------------------------------
Nonzero coefficients: 16
Nonzero groups: 8
Cross-validation error of 0.44
Maximum R-squared: 0.18
Maximum signal-to-noise ratio: 0.21
Scale estimate (sigma) at lambda.min: 0.660
grLasso-penalized logistic regression with n=189, p=16
At minimum cross-validation error (lambda=0.0238):
-------------------------------------------------
Nonzero coefficients: 16
Nonzero groups: 8
Cross-validation error of 1.20
Maximum R-squared: 0.04
Maximum signal-to-noise ratio: 0.03
Prediction error at lambda.min: 0.307
grLasso-penalized Cox regression with n=137, p=14
At minimum cross-validation error (lambda=0.1222):
-------------------------------------------------
Nonzero coefficients: 7
Nonzero groups: 2
Cross-validation error of 7.66
Maximum R-squared: 0.20
Maximum signal-to-noise ratio: 0.03
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.