fastcmprsk (version 1.1.1)

fastCrr: Fast Fine-Gray Model Estimation

Description

Estimates parameters for the proportional subdistribution hazards model using two-way linear scan approach.

Usage

fastCrr(formula, data, eps = 1e-06, max.iter = 1000,
  getBreslowJumps = TRUE, standardize = TRUE, variance = TRUE,
  var.control = varianceControl(B = 100, useMultipleCores = FALSE),
  returnDataFrame = FALSE)

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.

variance

Logical: Get standard error estimates for parameter estimates via bootstrap.

var.control

List of options for variance estimation.

returnDataFrame

Logical: Return (ordered) data frame.

Value

Returns a list of class fcrr.

coef

the estimated regression coefficients

var

estimated variance-covariance matrix via bootstrap (if variance = TRUE)

logLik

log-pseudo likelihood at the estimated regression coefficients

logLik.null

log-pseudo likelihood when the regression coefficients are 0

lrt

log-pseudo likelihood ratio test statistic for the estimated model vs. the null model.

iter

iterations of coordinate descent until convergence

converged

logical.

breslowJump

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

uftime

vector of unique failure (event) times

isVariance

logical to return if variance is chosen to be estimated

df

returned ordered data frame if returnDataFrame = TRUE.

Details

Fits the 'proportional subdistribution hazards' regression model described in Fine and Gray (1999) using a novel two-way linear scan approach. By default, the Crisk object will specify which observations are censored (0), the event of interest (1), or competing risks (2).

References

Fine J. and Gray R. (1999) A proportional hazards model for the subdistribution of a competing risk. JASA 94:496-509.

Examples

Run this code
# 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 <- fastCrr(Crisk(ftime, fstatus) ~ cov, variance = FALSE)

# Not run: How to set up multiple cores for boostrapping
# library(doParallel) #  make sure necessary packages are loaded
# myClust <- makeCluster(2)
# registerDoParallel(myClust)
# fit1 <- fastCrr(Crisk(ftime, fstatus) ~ cov, variance = TRUE,
# var.control = varianceControl(B = 100, useMultipleCores = TRUE))
# stopCluster(myClust)



# }

Run the code above in your browser using DataLab