fastCrrp: Penalized Fine-Gray Model Estimation via two-way linear scan

Description Usage Arguments Details Value References Examples

View source: R/fastCrrp.R

Description

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).

Usage

1
2
3
4
5
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))

Arguments

formula

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.

data

a data.frame in which to interpret the variables named in the formula.

eps

Numeric: algorithm stops when the relative change in any coefficient is less than eps (default is 1E-6)

max.iter

Numeric: maximum iterations to achieve convergence (default is 1000)

getBreslowJumps

Logical: Output jumps in Breslow estimator for the cumulative hazard.

standardize

Logical: Standardize design matrix.

penalty

Character: Penalty to be applied to the model. Options are "lasso", "scad", "ridge", "mcp", and "enet".

lambda

A user-specified sequence of lambda values for tuning parameters.

alpha

L1/L2 weight for elastic net regression.

lambda.min.ratio

Smallest value for lambda, as a fraction of lambda.max (if lambda is NULL).

nlambda

Number of lambda values (default is 25).

penalty.factor

A vector of weights applied to the penalty for each coefficient. Vector must be of length equal to the number of columns in X.

gamma

Tuning parameter for the MCP/SCAD penalty. Default is 2.7 for MCP and 3.7 for SCAD and should be left unchanged.

Details

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.

Value

Returns a list of class fcrrp.

coef

fitted coefficients matrix with nlambda columns and nvars columns

logLik

vector of log-pseudo likelihood at the estimated regression coefficients

logLik.null

log-pseudo likelihood when the regression coefficients are 0

lambda.path

sequence of tuning parameter values

iter

number of iterations needed until convergence at each tuning parameter value

converged

convergence status at each tuning parameter value

breslowJump

Jumps in the Breslow baseline cumulative hazard (used by predict.fcrr)

uftime

vector of unique failure (event) times

penalty

same as above

gamma

same as above

above

same as above

References

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.

Examples

1
2
3
4
5
6
7
8
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

fastcmprsk documentation built on Sept. 12, 2019, 1:04 a.m.