Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print.summary.cv.ncvreg behaves differently in a non-interactive session #51

Closed
pbreheny opened this issue Feb 24, 2025 · 0 comments
Closed

Comments

@pbreheny
Copy link
Owner

In particular, the model summary information is duplicated

library(ncvreg)
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.0019):
#> -------------------------------------------------
#>   Nonzero coefficients: 8
#>   Cross-validation error (deviance): 0.55
#>   R-squared: 0.58
#>   Signal-to-noise ratio: 1.40
#>   Scale estimate (sigma): 0.741
#> MCP-penalized linear regression with n=97, p=8
#> At lambda=0.0019:
#> -------------------------------------------------
#>   Nonzero coefficients         :   8
#>   Expected nonzero coefficients:   3.88
#>   Average mfdr (8 features)    :   0.485
#> 
#>          Estimate       z      mfdr Selected
#> lcavol   0.564341  8.7910   < 1e-04        *
#> svi      0.761673  4.1676 0.0034946        *
#> lweight  0.622020  3.5220 0.0355307        *
#> age     -0.021248 -2.0908 0.6495080        *
#> lcp     -0.106051 -1.9598 0.7069159        *
#> lbph     0.096713  1.8544 0.7465772        *
#> pgg45    0.004458  1.6616 0.8050543        *
#> gleason  0.049228  0.4698 0.9362313        *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant