Simulate right censored competing risks data with two covariates X1 and X2. Both covariates have effect exp(1) on the hazards of event 1 and zero effect on the hazard of event 2.

SimCompRisk(N, ...)

Arguments

N

sample size

...

do nothing.

Value

data.frame with simulated data

Details

This function calls crModel, then adds covariates and finally calls sim.lvm.

Author

Thomas Alexander Gerds

Examples


SimCompRisk(10)
#>    eventtime1 eventtime2  censtime      time event X1          X2 cause
#> 1    4.880404  0.5417719  7.992597 0.5417719     2  0 -0.09744510     2
#> 2    7.242149 13.7969959  7.139773 7.1397734     0  0 -0.93584735     0
#> 3    9.597586  8.1037400 11.583665 8.1037400     2  0 -0.01595031     2
#> 4   18.648343  4.0877136 11.125203 4.0877136     2  0 -0.82678895     2
#> 5   19.884954  5.7524788  8.566286 5.7524788     2  0 -1.51239965     2
#> 6    3.972741 11.9233225  2.887483 2.8874830     0  0  0.93536319     0
#> 7    7.538394  7.7667702  9.562907 7.5383938     1  0  0.17648861     1
#> 8    3.458965  4.2492462 12.432428 3.4589645     1  1  0.24368546     1
#> 9    2.204391 18.9132824  6.307488 2.2043908     1  1  1.62354888     1
#> 10   4.007740  8.6967433 16.842743 4.0077402     1  0  0.11203808     1