simMCOD: Simulate survival data with multiple causes of death

Description Usage Arguments Details Value References Examples

Description

simMCOD simulates data from the multiple-cause model of Moreno-Betancur et al. (2017), specifically under the same assumptions as in their simulation study.

Usage

1
simMCOD(n, xi, rho, phi, pgen, lambda, v, pUC)

Arguments

n

Size of dataset to be generated

xi

Log-ratio of the pure baseline hazards, assumed constant

rho

Effect of the binary exposure X1(=Z1) on the pure hazard of the disease of interest

phi

Effect of the binary exposure Z1(=X1) on the pure hazard of other diseases

pgen

Vector of weights corresponding to each of the 6 states in the multistate model.

lambda

Weibull scale parameter used to specify the pure baseline hazard of the disease of interest.

v

Weibull shape parameter used to specify the pure baseline hazard of the disease of interest.

pUC

Vector indicating the values in pgen corresponding to weight values assigned to the underlying cause of death.

Details

The function can be used to generate data from any of the scenarios considered in the the main simulation settings of Moreno-Betancur et al. (2017). See that reference for details.

Value

A data.frame as required by survMCOD function. Specifically, a dataset with one row per individual and the following variables:

X1

Binary exposure (to include in model for disease of interest).

Z1

Binary exposure equal to X1 (to include in model for other diseases).

TimeEntry

Time of entry into the study

TimeExit

Time of exit from the study

Status

Indicator of vital status, with Status=1 if individual died and Status=0 if individual is censored.

Pi

Weight indicating the proportion of the death attributed to the disease of interest (missing, i.e. "NA", if Status=0).

UC

The Underlying Cause Indicator, which is 1 if the individual died and the disease of interest was selected as underlying cause of death and 0 otherwise (i.e. 0 if individual censored or if individual died but the disease of interest was not selected as underlying cause of death).

References

Moreno-Betancur M, Sadaoui H, Piffaretti C, Rey G. Survival analysis with multiple causes of death: Extending the competing risks model. Epidemiology 2017; 28(1): 12-19.

Examples

1
2
3
4
5
  datEx<-simMCOD(n=1000,xi=-1,rho=-2,phi=0,
          pgen=c(1,0,0.75,0.25,0.125,0.083),
          lambda=0.001,v=2,pUC=c(1,0.75))

  head(datEx)

moreno-betancur/survMCOD documentation built on May 23, 2019, 6:11 a.m.