Learn R Programming

simMSM (version 1.1.2)

simCR: Simulation of Competing Risk Data

Description

Simulates Competing Risk Data

Usage

simCR(n, bhr, beta.x.12, beta.x.13, beta.x.14, diagnostics)

Arguments

n
number of event histories to generate
bhr
baseline hazard rate factor (time-constant function)
beta.x.12
covariate effect of x on transition from 1 to 2
beta.x.13
covariate effect of x on transition from 1 to 3
beta.x.14
covariate effect of x on transition from 1 to 4
diagnostics
logical triggering whether diagnostics about errors (most likeliy because uniroot does not find a root) should be printed during the simulation process?

Value

  • A data frame

Details

The underyling multi-state model is a 4 state-type model with one initial state-type and three different exit state-types.

Examples

Run this code
simCR(n, bhr, beta.x.12, beta.x.13, beta.x.14, diagnostics)

Run the code above in your browser using DataLab