Imputation of time-to-event outcomes using the piecewise constant hazard exponential function.
pw_exp_impute(time, hazard, maxtime = NULL, cutpoint = NULL)
time | vector. The observed time for patient that have had no event or passed maxtime. |
---|---|
hazard | vector. The constant hazard rates for exponential failures. |
maxtime | scalar. maximum time before end of study. |
cutpoint | vector. The change-point vector indicating time when the hazard rates change. |
a dataset with simulated follow-up time (time) and respective event indicator (1 = event, 0 = censoring)
#> time event #> 1 110 0#> time event #> 1 100.00000 0 #> 2 91.96094 1 #> 3 34.97816 1#> time event #> 1 120.0000 0 #> 2 108.6335 1