Summary method for cv.ncvreg
objects
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
#> MCP-penalized linear regression with n=97, p=8
#> At lambda=0.0276:
#> -------------------------------------------------
#> Nonzero coefficients : 7
#> Expected nonzero coefficients: 2.67
#> Average mfdr (7 features) : 0.382
#>
#> Estimate z mfdr Selected
#> lcavol 0.569546 8.956 < 1e-04 *
#> svi 0.752400 4.156 0.0035352 *
#> lweight 0.614420 3.512 0.0325374 *
#> age -0.020913 -2.077 0.6160315 *
#> pgg45 0.005324 2.004 0.6506811 *
#> lcp -0.104960 -1.958 0.6707274 *
#> lbph 0.097353 1.884 0.7009923 *
# 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
#> MCP-penalized logistic regression with n=462, p=9
#> At lambda=0.0270:
#> -------------------------------------------------
#> Nonzero coefficients : 5
#> Expected nonzero coefficients: 0.21
#> Average mfdr (5 features) : 0.042
#>
#> Estimate z mfdr Selected
#> age 0.05109 5.946 < 1e-04 *
#> famhist 0.90619 4.143 0.0022421 *
#> tobacco 0.07012 3.328 0.0435944 *
#> typea 0.03045 3.169 0.0707198 *
#> ldl 0.13459 3.062 0.0959303 *
# 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
#> MCP-penalized Cox regression with n=137, p=8
#> At lambda=0.1276:
#> -------------------------------------------------
#> Nonzero coefficients : 3
#> Expected nonzero coefficients: 1.28
#> Average mfdr (3 features) : 0.426
#>
#> Estimate z mfdr Selected
#> karno -0.03318 -6.589 < 1e-04 *
#> squamous -0.38295 -2.732 0.59462 *
#> adeno 0.33542 2.585 0.68452 *