Performs penalized regression for the proportional subdistribution hazards model. Penalties currently include LASSO, MCP, SCAD, and ridge regression. User-specificed weights can be assigned to the penalty for each coefficient (e.g. implementing adaptive LASSO and broken adaptive ridge regerssion).
fastCrrp(formula, data, eps = 1e-06, max.iter = 1000,
getBreslowJumps = TRUE, standardize = TRUE, penalty = c("LASSO",
"RIDGE", "MCP", "SCAD", "ENET"), lambda = NULL, alpha = 0,
lambda.min.ratio = 0.001, nlambda = 25, penalty.factor = rep(1,
ncol(X)), gamma = switch(penalty, scad = 3.7, 2.7))
a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a Crisk object as returned by the Crisk
function.
a data.frame in which to interpret the variables named in the formula.
Numeric: algorithm stops when the relative change in any coefficient is less than eps
(default is 1E-6
)
Numeric: maximum iterations to achieve convergence (default is 1000)
Logical: Output jumps in Breslow estimator for the cumulative hazard.
Logical: Standardize design matrix.
Character: Penalty to be applied to the model. Options are "lasso", "scad", "ridge", "mcp", and "enet".
A user-specified sequence of lambda
values for tuning parameters.
L1/L2 weight for elastic net regression.
Smallest value for lambda
, as a fraction of lambda.max
(if lambda
is NULL).
Number of lambda
values (default is 25).
A vector of weights applied to the penalty for each coefficient. Vector must be of length equal to the number of columns in X
.
Tuning parameter for the MCP/SCAD penalty. Default is 2.7 for MCP and 3.7 for SCAD and should be left unchanged.
Returns a list of class fcrrp
.
fitted coefficients matrix with nlambda
columns and nvars
columns
vector of log-pseudo likelihood at the estimated regression coefficients
log-pseudo likelihood when the regression coefficients are 0
sequence of tuning parameter values
number of iterations needed until convergence at each tuning parameter value
convergence status at each tuning parameter value
Jumps in the Breslow baseline cumulative hazard (used by predict.fcrr
)
vector of unique failure (event) times
same as above
same as above
same as above
The fastCrrp
functions performed penalized Fine-Gray regression.
Parameter estimation is performed via cyclic coordinate descent and using a two-way linear scan approach to effiiciently
calculate the gradient and Hessian values. Current implementation includes LASSO, SCAD, MCP, and ridge regression.
Fu, Z., Parikh, C.R., Zhou, B. (2017) Penalized variable selection in competing risks regression. Lifetime Data Analysis 23:353-376.
Breheny, P. and Huang, J. (2011) Coordinate descent algorithms for nonconvex penalized regression, with applications to biological feature selection. Ann. Appl. Statist., 5: 232-253.
Fine J. and Gray R. (1999) A proportional hazards model for the subdistribution of a competing risk. JASA 94:496-509.
# NOT RUN {
library(fastcmprsk)
set.seed(10)
ftime <- rexp(200)
fstatus <- sample(0:2, 200, replace = TRUE)
cov <- matrix(runif(1000), nrow = 200)
dimnames(cov)[[2]] <- c('x1','x2','x3','x4','x5')
fit <- fastCrrp(Crisk(ftime, fstatus) ~ cov, lambda = 1, penalty = "RIDGE")
fit$coef
# }
Run the code above in your browser using DataLab