Summary method for cv.grpreg
or cv.grpsurv
objects
Value
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
grpreg
/grpsurv
.- model
The type of model:
"linear"
,"logistic"
,"Poisson"
,"Cox"
, etc.- n
Number of observations
- p
Number of regression coefficients (not including the intercept).
- min
The index of
lambda
with the smallest cross-validation error.- lambda
The sequence of
lambda
values used bycv.grpreg
/cv.grpsurv
.- 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).
Examples
# Birthweight data
data(Birthwt)
X <- Birthwt$X
group <- Birthwt$group
# Linear regression
y <- Birthwt$bwt
cvfit <- cv.grpreg(X, y, group)
summary(cvfit)
#> grLasso-penalized linear regression with n=189, p=16
#> At minimum cross-validation error (lambda=0.0167):
#> -------------------------------------------------
#> Nonzero coefficients: 16
#> Nonzero groups: 8
#> Cross-validation error of 0.43
#> Maximum R-squared: 0.18
#> Maximum signal-to-noise ratio: 0.22
#> Scale estimate (sigma) at lambda.min: 0.659
# Logistic regression
y <- Birthwt$low
cvfit <- cv.grpreg(X, y, group, family="binomial")
summary(cvfit)
#> grLasso-penalized logistic regression with n=189, p=16
#> At minimum cross-validation error (lambda=0.0136):
#> -------------------------------------------------
#> Nonzero coefficients: 16
#> Nonzero groups: 8
#> Cross-validation error of 1.12
#> Maximum R-squared: 0.11
#> Maximum signal-to-noise ratio: 0.10
#> Prediction error at lambda.min: 0.291
# Cox regression
data(Lung)
cvfit <- with(Lung, cv.grpsurv(X, y, group))
summary(cvfit)
#> grLasso-penalized Cox regression with n=137, p=14
#> At minimum cross-validation error (lambda=0.1063):
#> -------------------------------------------------
#> Nonzero coefficients: 7
#> Nonzero groups: 2
#> Cross-validation error of 7.60
#> Maximum R-squared: 0.25
#> Maximum signal-to-noise ratio: 0.04