Generates a dataset with two competing events under a sub-distribution
hazard model parameterized by a four-level baseline covariate z1.
Optionally adds independent or covariate-dependent censoring.
Arguments
- n
Integer. Number of subjects to simulate. Default is 100.
- censoring
Character string specifying the censoring mechanism. One of
"none","independent", or"baseline"(censoring rate depends onz1). Default is"none".- beta1
Numeric. Log sub-distribution hazard ratio for
z1 = 1vsz1 = 0for event type 1. Default islog(1.5).- beta2
Numeric. Log sub-distribution hazard ratio for
z1 = 2vsz1 = 0for event type 1. Default islog(2.25).- beta3
Numeric. Log sub-distribution hazard ratio for
z1 = 3vsz1 = 0for event type 1. Default islog(3.4).- p
Numeric in (0, 1). Baseline probability of event type 1 in the reference group (
z1 = 0). Default is0.3.