gcrrp: Group penalized variable selection in competing risks...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/gcrrp.R

Description

Extends R package grpreg to the proportional subdistribution hazards (PSH) model (Fine and Gray, 1999). Performs penalized variable selection at the group level. Penalties include group LASSO, adaptive group LASSO, group SCAD, and group MCP.

Usage

1
2
3
4
  gcrrp(time, fstatus, X, failcode = 1, cencode = 0, group=1:ncol(X),
        penalty=c("gLASSO", "gMCP", "gSCAD"),gamma=switch(penalty, SCAD=3.7, 2.7),
        alpha=1, lambda.min=0.001, nlambda=50, lambda, eps=.001, 
        max.iter=1000, weighted=FALSE)

Arguments

time

vector of failure/censoring times

fstatus

vector with a unique code for each failure type and a separate code for censored observations

X

design matrix; crrp standardizes and orthogonizes X by default

failcode

code of fstatus that denotes the failure type of interest

cencode

code of fstatus that denotes censored observations

group

vector of group indicator (see details)

penalty

penalty to be applied to the model. Either "gLASSO", "gSCAD", or "gMCP"

gamma

tuning parameter of the gMCP/gSCAD penalty. Default is 2.7 for group MCP and 3.7 for group SCAD.

alpha

tuning parameter indicating contributions from the MCP/SCAD penalty and the L2 penalty.

lambda.min

the smallest value for lambda. Default is .001

nlambda

number of lambda values. Default is 50

lambda

a user-specified sequence of lambda values. If not specified, a sequence of values of length nlambda is provided

eps

iteration stops when the relative change in any coefficient is less than eps. Default is 0.001

max.iter

maximum number of iterations. Default is 1000

weighted

Default is FALSE. If TRUE, it must be used with gLASSO to produce adaptive group LASSO penalty(see details)

Details

The group vector indicates the grouping of variables. For greatest efficiency, group should be a vector of consecutive integers, although unordered groups are also allowed.

Penalties include group LASSO, group SCAD, and group MCP. We also include adaptive group LASSO by putting weighted=TRUE. The gcrrp function calculates data-adaptive weights formulated by the maximum parital likelihood estimator(MPLE) of the PSH model. The weight for each group is the inverse of the norm of the corresponding sub-vector of MPLE. The algorithm employed is the group coordinate descent algorithm.

Value

Return a list of class gcrrp with components

$beta

fitted coefficients matrix with nvars row and nlambda columns

$iter

number of iterations until convergence for each lambda

$group

same as above

$lambda

sequence of tuning parameter values

$penalty

same as above.

$gamma

same as above.

$alpha

same as above.

$loglik

log likelihood of the fitted model at each value of lambda

$GCV

generalized cross validation of the fitted model at each value of lambda

$BIC

Bayesian information criteria of the fitted model at each value of lambda

Author(s)

Zhixuan Fu <zhixuan.fu@yale.edu>

References

See Also

crrp, cmprsk, grpreg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  set.seed(10)
  ftime <- rexp(200)
  fstatus <- sample(0:2,200,replace=TRUE)
  cov <- matrix(runif(2000),nrow=200)
  dimnames(cov)[[2]] <- paste("x", 1:ncol(cov))
  group <- c(1,1,2,2,2,3,4,4,5,5)
  #fit gSCAD penalty
  fit1 <- gcrrp(ftime, fstatus, cov, group=group, penalty="gSCAD")
  beta1 <- fit1$beta[, which.min(fit1$BIC)]
  #fit adaptive gLASSO
  fit2 <- gcrrp(ftime, fstatus, cov, group=group, penalty="gLASSO", weighted=TRUE)
  beta2 <- fit2$beta[, which.min(fit2$BIC)]

Example output

Loading required package: survival
Loading required package: Matrix
Loading required package: cmprsk

crrp documentation built on May 1, 2019, 6:29 p.m.

Related to gcrrp in crrp...