crrHARD: Hard Threshold Regression for Competing Risks Regression

Description Usage Arguments Details Value References Examples

Description

Fits hard thresholding penalty for competing risks regression. Estimates are calculated via crr from the cmprsk package.

Usage

1
2
crrHARD(ftime, fstatus, X, failcode = 1, cencode = 0, lambda = 0,
  nlambda = 25)

Arguments

ftime

A vector of event/censoring times.

fstatus

A vector with unique code for each event type and a separate code for censored observations.

X

A matrix of fixed covariates (nobs x ncovs)

failcode

Integer: code of fstatus that event type of interest (default is 1)

cencode

Integer: code of fstatus that denotes censored observations (default is 0)

nlambda

Numeric: number of lambda values if performing grid search (default is 25)

Details

The crrHARD performs hard thresholding on the MPLE using the rule \hat{β_j} = \hat{beta}_j I(|β_j| > λ)

Value

Returns a list of class crrBAR.

References

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
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 <- crrHARD(ftime, fstatus, cov, lambda = 0.05)
fit$coef

erickawaguchi/crrBAR documentation built on June 6, 2019, 7:56 a.m.