Skip to content

Commit 6c57b0d

Browse files
committed
Version 3.6-0
1 parent 9715f41 commit 6c57b0d

File tree

7 files changed

+48
-41
lines changed

7 files changed

+48
-41
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ncvreg
22
Title: Regularization Paths for SCAD and MCP Penalized Regression Models
33
Version: 3.6-0
4-
Date: 2016-06-02
4+
Date: 2016-06-13
55
Author: Patrick Breheny [aut,cre], Sangin Lee [ctb]
66
Maintainer: Patrick Breheny <[email protected]>
77
Depends:

NEWS

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
3.6-0
2+
* Improved efficiency for cox models (avoids recalculating linear
3+
predictors)
4+
* Exported std() function for standardizing a design matrix
5+
* Reorganized testing suite
6+
* Fixed bug in predict.cv.ncvsurv
7+
* Added 'quick start' vignette
8+
* 'survival' package now used for setupLambda in Cox models
9+
110
3.5-2
211
* Fixed bug for ncvsurv with integer penalty factors
312
* Fixed rare numerical accuracy bug in cv fold assignments

inst/tests/coerce.R

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data(heart)
2+
X <- heart[,1:9]
3+
y <- factor(heart$chd, labels=c("No", "Yes"))
4+
fit <- ncvreg(X, y, family="binomial")
5+
std(X)

inst/tests/cv.ncvreg.R

-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ equal <- function(x, y) {all.equal(x, y, tol=0.001, check.attributes=FALSE)}
77
X <- matrix(rnorm(500), 50, 10)
88
y <- rnorm(50)
99
cvfit <- cv.ncvreg(X, y)
10-
plot(cvfit, type='all')
1110
print(summary(cvfit))
1211

1312
# Predict
@@ -30,7 +29,6 @@ cvfit <- cv.ncvreg(as.data.frame(X), y)
3029
X <- matrix(rnorm(25*4), 25, 4)
3130
y <- rnorm(25)
3231
cvfit <- cv.ncvreg(X, y, nfolds=25)
33-
plot(cvfit, type='all')
3432
print(summary(cvfit))
3533

3634
#### Logistic regression ####
@@ -39,7 +37,6 @@ print(summary(cvfit))
3937
X <- matrix(rnorm(500), 50, 10)
4038
y <- rbinom(50, 1, 0.5)
4139
cvfit <- cv.ncvreg(X, y, family='binomial')
42-
plot(cvfit, type='all')
4340
print(summary(cvfit))
4441

4542
# Predict
@@ -55,14 +52,12 @@ p <- predict(cvfit, X, type='nvars')
5552
X <- matrix(rnorm(30*2), 30, 2)
5653
y <- rbinom(30, 1, 0.5)
5754
cvfit <- cv.ncvreg(X, y, nfolds=30, family='binomial')
58-
plot(cvfit, type='all')
5955
print(summary(cvfit))
6056

6157
#### Poisson regression ####
6258

6359
# Works
6460
cvfit <- cv.ncvreg(X, y, family='poisson')
65-
plot(cvfit, type='all')
6661
print(summary(cvfit))
6762

6863
# Predict
@@ -75,5 +70,4 @@ p <- predict(cvfit, X, type='nvars')
7570

7671
# LOOCV
7772
cvfit <- cv.ncvreg(X, y, nfolds=30, family='poisson')
78-
plot(cvfit, type='all')
7973
print(summary(cvfit))

inst/tests/parallel.R

+16-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
require(parallel)
2-
require(survival)
3-
cl <- makeCluster(4)
1+
if (Sys.getenv("_R_CHECK_LIMIT_CORES_")=="") {
2+
require(parallel)
3+
require(survival)
4+
cl <- makeCluster(4)
45

5-
# Linear
6-
X <- matrix(rnorm(500), 50, 10)
7-
y <- rnorm(50)
8-
cvfit <- cv.ncvreg(X, y, cluster=cl)
6+
# Linear
7+
X <- matrix(rnorm(500), 50, 10)
8+
y <- rnorm(50)
9+
cvfit <- cv.ncvreg(X, y, cluster=cl)
910

10-
# Logistic
11-
y <- rbinom(50, 1, 0.5)
12-
cvfit <- cv.ncvreg(X, y, cluster=cl, family='binomial')
11+
# Logistic
12+
y <- rbinom(50, 1, 0.5)
13+
cvfit <- cv.ncvreg(X, y, cluster=cl, family='binomial')
1314

14-
# Cox
15-
y <- Surv(rexp(50), sample(rep(0:1, c(10,40))))
16-
X <- matrix(rnorm(50*10), 50, 10)
17-
cvfit <- cv.ncvsurv(X, y, cluster=cl)
15+
# Cox
16+
y <- Surv(rexp(50), sample(rep(0:1, c(10,40))))
17+
X <- matrix(rnorm(50*10), 50, 10)
18+
cvfit <- cv.ncvsurv(X, y, cluster=cl)
19+
}

man/ncvreg-package.Rd

+10-19
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,25 @@
33
\docType{package}
44
\title{Regularization paths for SCAD- and MCP-penalized regression
55
models}
6-
\description{Efficient algorithms for fitting regularization paths for
6+
\description{
7+
Efficient algorithms for fitting regularization paths for
78
a variety of regression models (linear, logistic, Poisson, survival)
8-
penalized by MCP or SCAD, with optional additional L2 penalty.}
9+
penalized by MCP or SCAD, with optional additional L2 penalty.
10+
}
911
\details{
10-
\tabular{ll}{
11-
Package: \tab ncvreg\cr
12-
Type: \tab Package\cr
13-
Version: \tab 3.5-2\cr
14-
Date: \tab 2016-04-08\cr
15-
License: \tab GPL-2\cr}
1612
Accepts a design matrix \code{X} and vector of responses \code{y},
1713
produces the regularization path over a grid of values for the tuning
1814
parameter \code{lambda}. Also provides methods for plotting,
1915
cross-validation-based inference, and for determining locally convex
20-
regions of the coefficients paths.}
16+
regions of the coefficients paths.
17+
18+
See the "Quick start guide" for a brief overview of how the package
19+
works.
20+
}
2121
\references{Breheny, P. and Huang, J. (2011) Coordinate descent
2222
algorithms for nonconvex penalized regression, with applications to
2323
biological feature selection. Ann. Appl. Statist., 5: 232-253.}
2424
\author{Patrick Breheny <patrick-breheny@uiowa.edu>}
2525
\examples{
26-
data(prostate)
27-
X <- as.matrix(prostate[,1:8])
28-
y <- prostate$lpsa
29-
30-
fit <- ncvreg(X,y)
31-
plot(fit)
32-
33-
cvfit <- cv.ncvreg(X,y)
34-
plot(cvfit)
35-
summary(cvfit)
26+
vignette("quick-start", package="ncvreg")
3627
}

man/plot.fir.Rd

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ fit <- ncvreg(X, y)
3333
f <- fir(fit)
3434
cbind(EF=f$EF, S=f$S, FIR=f$FIR)[1:10,]
3535

36-
## Comparison with perm.ncvreg
36+
# Some plotting options
37+
plot(f)
38+
plot(f, type="EF")
39+
plot(f, log=TRUE)
40+
41+
42+
# Comparison with perm.ncvreg
3743
par(mfrow=c(2,2))
3844
plot(f)
3945
plot(f, type="EF")

0 commit comments

Comments
 (0)