Simulate right censored survival data with two covariates X1 and X2, both have effect exp(1) on the hazard of the unobserved event time.

SimSurv(N, ...)

Arguments

N

sample size

...

do nothing

Value

data.frame with simulated data

Details

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

References

Bender, Augustin & Blettner. Generating survival times to simulate Cox proportional hazards models. Statistics in Medicine, 24: 1713-1723, 2005.

Author

Thomas Alexander Gerds

Examples


SimSurv(10)
#>     eventtime   censtime      time event X1         X2 status
#> 1   4.5382785 16.2775163 4.5382785     1  0  0.5498275      1
#> 2  23.2675989  0.5579756 0.5579756     0  1 -2.2741149      0
#> 3   0.8937004  7.0090240 0.8937004     1  1  2.6825572      1
#> 4   8.9800164 13.2552517 8.9800164     1  1 -0.3612213      1
#> 5   4.8293753  3.0809932 3.0809932     0  1  0.2133557      0
#> 6   3.7179210 18.1237894 3.7179210     1  1  1.0743459      1
#> 7   6.3577598  7.2223780 6.3577598     1  1 -0.6650882      1
#> 8   6.7244336 11.9991243 6.7244336     1  0  1.1139524      1
#> 9   9.9090385  3.1366848 3.1366848     0  0 -0.2458964      0
#> 10  3.2034958  4.4701934 3.2034958     1  1 -1.1775633      1