sim.survdata {CPsurv} | R Documentation |
Simulates Weibull distributed survival data from a given data set with change point above which hazard rate is constant.
sim.survdata(time, event, changeP, shape, scale, censoring, censpoint, times.int, parametric)
time |
Numeric vector with survival times. |
event |
Numeric vector indicating censoring status; 0 = alive (censored), 1 = dead (uncensored). If missing, all observations are assumed to be uncensored. |
changeP |
Change point. |
shape |
Shape parameter of Weibull distribution. |
scale |
Scale parameter of Weibull distribution. |
censoring |
Logical; if |
censpoint |
Censoring point for Type I censoring. |
times.int |
Logical; if |
parametric |
Logical; if |
A dataset with survival times and corresponding censoring status ('event').