diff --git a/.gitignore b/.gitignore index b207494..7749ce3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ vignettes/*.html docs +.Rproj.user diff --git a/.travis.yml b/.travis.yml index 25d1957..da515fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: r r_packages: - glmnet - ncvreg + - survival script: - R CMD build . diff --git a/.version.json b/.version.json index f86a2ad..c0136f8 100644 --- a/.version.json +++ b/.version.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "GitHub", - "message": "3.3.0.2", + "message": "3.3.1", "color": "blue" -} \ No newline at end of file +} diff --git a/DESCRIPTION b/DESCRIPTION index 30f0e24..290a845 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: grpreg Title: Regularization Paths for Regression Models with Grouped Covariates -Version: 3.3.0.2 -Date: 2020-07-08 +Version: 3.3.1 +Date: 2021-03-26 Authors@R: c( person("Patrick", "Breheny", role=c("aut","cre"), email="patrick-breheny@uiowa.edu", comment=c(ORCID="0000-0002-0650-1119")), person("Yaohui", "Zeng", role="ctb")) @@ -14,9 +14,9 @@ Description: Efficient algorithms for fitting the regularization path of linear includes group selection methods such as group lasso, group MCP, and group SCAD as well as bi-level selection methods such as the group exponential lasso, the composite MCP, and the group bridge. -BugReports: http://github.com/pbreheny/grpreg/issues +BugReports: https://github.com/pbreheny/grpreg/issues License: GPL-3 -URL: http://pbreheny.github.io/grpreg, https://github.com/pbreheny/grpreg +URL: https://pbreheny.github.io/grpreg/, https://github.com/pbreheny/grpreg LazyData: TRUE RoxygenNote: 7.0.2 Encoding: UTF-8 diff --git a/NEWS b/NEWS.md similarity index 98% rename from NEWS rename to NEWS.md index ec856f6..5a10c6d 100644 --- a/NEWS +++ b/NEWS.md @@ -1,3 +1,7 @@ +# grpreg 3.3.1 (2021-03-26) + * Fixed: AUC() now compatible with survival 3.2.10 + * Internal: Fixed memory leak + # grpreg 3.3.0 (2020-06-10) * Fixed: sqrt(K) no longer hard-coded into discarding rules (thank you to Dan Kessler for pointing this out) diff --git a/R/auc.R b/R/auc.R index c33b4b2..05ca65f 100644 --- a/R/auc.R +++ b/R/auc.R @@ -3,9 +3,13 @@ AUC.cv.grpsurv <- function(obj, ...) { if (!requireNamespace("survival", quietly = TRUE)) { stop("The 'survival' package is needed for AUC() to work. Please install it.", call. = FALSE) } + if (packageVersion("survival") < "3.2.10") stop("AUC.cv.ncvsurv requires version 3.2.10 of 'survival' package or higher", call.=FALSE) S <- survival::Surv(obj$fit$time, obj$fit$fail) - res <- apply(obj$Y, 2, survival::survConcordance.fit, y = S) - num <- res['concordant',] + 0.5*res['tied.risk',] + 0.5*res['tied.time',] - num/sum(res[1:4,1]) + res <- apply(obj$Y, 2, concord, y = S) + num <- res['concordant',] + 0.5*res['tied.x',] + 0.5*res['tied.y',] + 0.5*res['tied.xy',] + num/sum(res[,1]) } AUC <- function(obj, ...) UseMethod("AUC") +concord <- function(x, y) { + survival::concordancefit(y, -x)$count +} diff --git a/man/grpreg-package.Rd b/man/grpreg-package.Rd index 0533ead..458afa5 100644 --- a/man/grpreg-package.Rd +++ b/man/grpreg-package.Rd @@ -58,22 +58,22 @@ \item Breheny, P. and Huang, J. (2009) Penalized methods for bi-level variable selection. \emph{Statistics and its interface}, \strong{2}: 369-380. - \url{http://myweb.uiowa.edu/pbreheny/pdf/Breheny2009.pdf} + \url{https://myweb.uiowa.edu/pbreheny/pdf/Breheny2009.pdf} \item Huang J., Breheny, P. and Ma, S. (2012). A selective review of group selection in high dimensional models. \emph{Statistical Science}, \strong{27}: 481-499. - \url{http://myweb.uiowa.edu/pbreheny/pdf/Huang2012.pdf} + \url{https://myweb.uiowa.edu/pbreheny/pdf/Huang2012.pdf} \item Breheny, P. and Huang, J. (2015) Group descent algorithms for nonconvex penalized linear and logistic regression models with grouped predictors. \emph{Statistics and Computing}, \strong{25}: 173-187. - \url{http://dx.doi.org/10.1007/s11222-013-9424-2} + \doi{10.1007/s11222-013-9424-2} \item Breheny, P. (2015) The group exponential lasso for bi-level variable selection. \emph{Biometrics}, \strong{71}: 731-740. - \url{http://dx.doi.org/10.1111/biom.12300} + \doi{10.1111/biom.12300} } } \author{Patrick Breheny} diff --git a/man/grpreg.Rd b/man/grpreg.Rd index 0dd4ab5..ea2b427 100644 --- a/man/grpreg.Rd +++ b/man/grpreg.Rd @@ -190,21 +190,21 @@ tau = 1/3, group.multiplier, warn=TRUE, returnX = FALSE, ...) \item Breheny, P. and Huang, J. (2009) Penalized methods for bi-level variable selection. \emph{Statistics and its interface}, \strong{2}: 369-380. - \url{http://myweb.uiowa.edu/pbreheny/pdf/Breheny2009.pdf} + \url{https://myweb.uiowa.edu/pbreheny/pdf/Breheny2009.pdf} \item Huang J., Breheny, P. and Ma, S. (2012). A selective review of group selection in high dimensional models. \emph{Statistical Science}, \strong{27}: 481-499. - \url{http://myweb.uiowa.edu/pbreheny/pdf/Huang2012.pdf} + \url{https://myweb.uiowa.edu/pbreheny/pdf/Huang2012.pdf} \item Breheny, P. and Huang, J. (2015) Group descent algorithms for nonconvex penalized linear and logistic regression models with grouped predictors. \emph{Statistics and Computing}, \strong{25}: 173-187. - \url{http://dx.doi.org/10.1007/s11222-013-9424-2} + \doi{10.1007/s11222-013-9424-2} \item Breheny, P. (2015) The group exponential lasso for bi-level variable selection. \emph{Biometrics}, \strong{71}: 731-740. - \url{http://dx.doi.org/10.1111/biom.12300} + \doi{10.1111/biom.12300} } } diff --git a/man/grpsurv.Rd b/man/grpsurv.Rd index 9a8c682..01c7279 100644 --- a/man/grpsurv.Rd +++ b/man/grpsurv.Rd @@ -123,27 +123,27 @@ not correspond to the ith row of \code{X}): \item Breheny, P. and Huang, J. (2009) Penalized methods for bi-level variable selection. \emph{Statistics and its interface}, \strong{2}: 369-380. - \url{http://myweb.uiowa.edu/pbreheny/pdf/Breheny2009.pdf} + \url{https://myweb.uiowa.edu/pbreheny/pdf/Breheny2009.pdf} \item Huang J., Breheny, P. and Ma, S. (2012). A selective review of group selection in high dimensional models. \emph{Statistical Science}, \strong{27}: 481-499. - \url{http://myweb.uiowa.edu/pbreheny/pdf/Huang2012.pdf} + \url{https://myweb.uiowa.edu/pbreheny/pdf/Huang2012.pdf} \item Breheny, P. and Huang, J. (2015) Group descent algorithms for nonconvex penalized linear and logistic regression models with grouped predictors. \emph{Statistics and Computing}, \strong{25}: 173-187. - \url{http://dx.doi.org/10.1007/s11222-013-9424-2} + \doi{10.1007/s11222-013-9424-2} \item Breheny, P. (2015) The group exponential lasso for bi-level variable selection. \emph{Biometrics}, \strong{71}: 731-740. - \url{http://dx.doi.org/10.1111/biom.12300} + \doi{10.1111/biom.12300} \item Simon N, Friedman JH, Hastie T, and Tibshirani R. (2011) Regularization Paths for Cox's Proportional Hazards Model via Coordinate Descent. \emph{Journal of Statistical Software}, \strong{39}: 1-13. - \url{http://www.jstatsoft.org/v39/i05} + \url{https://www.jstatsoft.org/v39/i05} } } \author{Patrick Breheny} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 248dc69..522962b 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -21,6 +21,8 @@ navbar: href: articles/web/penalties.html - text: Functions href: reference/index.html + - text: News + href: news/index.html right: github: icon: fa-github fa-lg