Summary method for cv.ncvreg
objects
Arguments
- object
A
cv.ncvreg
orcv.ncvsurv
object.- include_fit
In addition to summarizing the cross-validation object, also summarize the model with the lowest CV error? (default: FALSE)
- ...
Further arguments passed to or from other methods.
- x
A
summary.cv.ncvreg
object.- 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.
Value
An object with S3 class summary.cv.ncvreg
. The class has its own
print method and contains the following list elements:
- penalty
The penalty used by
ncvreg
.- model
Either
"linear"
or"logistic"
, depending on thefamily
option inncvreg
.- n
Number of instances
- 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.ncvreg
.- cve
Cross-validation error (deviance).
- r.squared
Proportion of variance explained by the model, as estimated by cross-validation. For models outside of linear regression, the Cox-Snell approach to defining R-squared is used.
- 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).
References
Breheny P and Huang J. (2011) Coordinate descent algorithms for nonconvex penalized regression, with applications to biological feature selection. Annals of Applied Statistics, 5: 232-253. doi:10.1214/10-AOAS388
Examples
# Linear regression --------------------------------------------------
data(Prostate)
cvfit <- cv.ncvreg(Prostate$X, Prostate$y)
summary(cvfit)
#> MCP-penalized linear regression with n=97, p=8
#> At minimum cross-validation error (lambda=0.0276):
#> -------------------------------------------------
#> Nonzero coefficients: 7
#> Cross-validation error (deviance): 0.54
#> R-squared: 0.59
#> Signal-to-noise ratio: 1.45
#> Scale estimate (sigma): 0.734
# Logistic regression ------------------------------------------------
data(Heart)
cvfit <- cv.ncvreg(Heart$X, Heart$y, family="binomial")
summary(cvfit)
#> MCP-penalized logistic regression with n=462, p=9
#> At minimum cross-validation error (lambda=0.0270):
#> -------------------------------------------------
#> Nonzero coefficients: 5
#> Cross-validation error (deviance): 1.06
#> R-squared: 0.21
#> Signal-to-noise ratio: 0.26
#> Prediction error: 0.271
# Cox regression -----------------------------------------------------
data(Lung)
cvfit <- cv.ncvsurv(Lung$X, Lung$y)
summary(cvfit)
#> MCP-penalized Cox regression with n=137, p=8
#> At minimum cross-validation error (lambda=0.1276):
#> -------------------------------------------------
#> Nonzero coefficients: 3
#> Cross-validation error (deviance): 7.53
#> R-squared: 0.29
#> Signal-to-noise ratio: 0.41