Learn R Programming

riskRegression (version 0.0.8)

CSC: Cause-specific Cox proportional hazard regression

Description

Interface for fitting cause-specific Cox proportional hazard regression models in competing risk.

Usage

CSC(formula, data, cause, survtype = "hazard", ...)

Arguments

formula
A list of formulae, one for each cause, each specifying a cause-specific Cox regression model.
data
A data in which to fit the models.
cause
The cause of interest. Defaults to the first cause.
survtype
Either "hazard" (the default) or "survival". If "hazard" fit cause-specific Cox regression models for all causes. If "survival" fit one cause-specific Cox regression model for the cause of in
...
Arguments given to coxph.

Value

  • callthe call
  • modelsa list with the fitted (cause-specific) Cox regression objects
  • responsethe event history response
  • eventTimesthe sorted (unique) event times
  • survtypethe value of survtype
  • theCausethe cause of interest. see cause
  • causesthe other causes

See Also

coxph

Examples

Run this code
library(riskRegression)
library(prodlim)
library(pec)
library(survival)
data(Melanoma)
## fit two cause-specific Cox models
## different formula for the two causes
fit1 <- CSC(list(Hist(time,status)~sex,Hist(time,status)~invasion+epicel+age),data=Melanoma)
print(fit1)

## same formula for both causes
fit2 <- CSC(Hist(time,status)~invasion+epicel+age,data=Melanoma)
print(fit2)

## combine a cause-specific Cox regression model for cause 2 
## and a Cox regression model for the event-free survival:
## different formula for cause 2 and event-free survival
fit3 <- CSC(list(Hist(time,status)~sex+invasion+epicel+age,Hist(time,status)~invasion+epicel+age),data=Melanoma)
print(fit3)

## same formula for both causes
fit4 <- CSC(Hist(time,status)~invasion+epicel+age,data=Melanoma,survtype="surv")
print(fit4)

Run the code above in your browser using DataLab