
Simulate patient outcomes from a Weibull distribution
SimulatePatientSurvivalWeibull.Rd
This function simulates patient data from a Weibull (shape, scale) distribution. The rweibull
function in the stats
package
is used to simulate the survival time. See help on rweibull
.
The required function signature for integration with East or East Horizon includes the SurvMethod
, NumPrd
, PrdTime
, and SurvParam
,
which are ignored in this function, and only the parameters in UserParam
are utilized.
Usage
SimulatePatientSurvivalWeibull(
NumSub,
NumArm,
TreatmentID,
SurvMethod,
NumPrd,
PrdTime,
SurvParam,
UserParam = NULL
)
Arguments
- NumSub
The number of patient times to generate for the trial. This is a single numeric value, e.g., 250.
- NumArm
The number of arms in the trial, a single numeric value. For a two-arm trial, this will be 2.
- TreatmentID
A vector of treatment IDs.
0 = treatment 1
,1 = treatment 2
. The length ofTreatmentID
must be equal toNumSub
.- NumPrd
Number of time periods that are provided.
- UserParam
A list of user-defined parameters in East or East Horizon. The default is
NULL
. IfUserParam
is supplied, it must contain the following:UserParam$dShapeCtrl
The shape parameter in the Weibull distribution for the control treatment.
UserParam$dScaleCtrl
The scale parameter in the Weibull distribution for the control treatment.
UserParam$dShapeExp
The shape parameter in the Weibull distribution for the experimental treatment.
UserParam$dScaleExp
The scale parameter in the Weibull distribution for the experimental treatment.