sim.survdata {CPsurv} | R Documentation |
Simulate Survival Data with Change Point
Description
Simulates Weibull distributed survival data from a given data set with change point above which hazard rate is constant.
Usage
sim.survdata(time, event, changeP, shape, scale, censoring, censpoint,
times.int, parametric)
Arguments
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 |
Value
A dataset with survival times and corresponding censoring status ('event').
[Package CPsurv version 1.0.0 Index]