grpCox {grpCox} | R Documentation |
Fit a penalized Cox model.
Description
Fit the regularization paths for Cox models with grouped covariates.
Usage
grpCox(X, y, g, m, penalty=c("glasso", "gSCAD", "gMCP"), lambda=NULL,
nlambda=100, rlambda=NULL, gamma=switch(penalty, gSCAD = 3.7, 3),
standardize=TRUE, thresh=1e-3, maxit=1e+4)
Arguments
X |
The design matrix. |
y |
The response vector includes time corresponding to failure/censor times, and status indicating failure (1) or censoring (0). |
g |
A vector indicating the group structure of the covariates. It can be unordered groups. |
m |
Group multipliers. Default is the square root of group size. |
penalty |
The penalty to be applied to the model. It is one of |
lambda |
A user supplied sequence of |
nlambda |
The number of |
rlambda |
Smallest value for lambda, as a fraction of the maximum lambda, the data derived entry value, i.e. the smallest value for which all coefficients are zero. The default depends on the sample size relative to the number of covariates. If sample size>#covariates, the default is 0.001, close to zero. If sample size>#covariates, the default is 0.05. |
gamma |
Tuning parameter of the group SCAD/MCP penalty. Default is 3.7 for SCAD and 3 for MCP. |
standardize |
Logical flag for variable standardization prior to fitting the model. |
thresh |
Convergence threshold for one-step coordinate descent. Defaults value is 1E-7. |
maxit |
Maximum number of passes over the data for all lambda values; default is 1E+5. |
Details
The the group SCAD (gSCAD
) and group MCP (gMCP
) formulations have been presented in Wang et. al 2007, Huang et. al 2012.
Value
aBetaSTD |
A standardized coefficient matrix whose columns correspond to nlambda values of lambda. |
aBetaO |
A coefficient matrix (without standardization) whose columns correspond to nlambda values of lambda. |
lambda |
The lambda values used. |
ll |
The log likelihood values. |
g |
A vector indicating the group structure of the covariates. |
Author(s)
Xuan Dang <xuandang11289@gmail.com>
References
Wang, L., Chen, G., and Li, H. Group SCAD regression analysis for microarray time course gene expression data. Bioinformatics 23.12 (2007), pp. 1486-1494.
Huang, J., Breheny, P., and Ma, S. A selective review of group selection in high-dimensional models. Statistical Science 27.4 (2012), pp. 481-499.
Examples
set.seed(200)
N <- 50
p <- 9
x <- matrix(rnorm(N * p), nrow = N)
beta <- c(.65,.65,0,0,.65,.65,0,.65,0)
hx <- exp(x %*% beta)
ty <- rexp(N,hx)
tcens <- 1 - rbinom(n=N, prob = 0.2, size = 1)
y <- data.frame(illt=ty, ills=tcens)
names(y) <- c("time", "status")
g <- c(1,1,2,2,3,3,2,3,2)
m <- c(sqrt(2),sqrt(4),sqrt(3))
fit <- grpCox(x,y,g,m,penalty="glasso")
plot.gCoef(fit$aBetaO, fit$g, fit$lambda)