simJLSDdata {QTOCen} | R Documentation |
Function to generate simulation data from a sequentially randomized experiment designed in (Jiang et al. 2017)
Description
Function to generate simulation data from a sequentially randomized experiment designed in (Jiang et al. 2017)
Usage
simJLSDdata(n, case = "a", s_Diff_Time = 1, C_max = 5,
Censored = TRUE, fix_x0_value = NULL)
Arguments
n |
sample size |
case |
string. One of "a", "b", "c", corresponding to three models. |
s_Diff_Time |
Numeric. Default is 1. This is the length of time between two stages of treatment |
C_max |
Numeric. Default is 5. This the upper bound of the uniform distribution of the censoring time variable. Changing this value shifts the overall censoring rate easily. |
Censored |
Boolean. Default is TRUE. Whether the data has censoring or not. If TRUE, all survival time would not be censored at all in the returned data. |
fix_x0_value |
Numeric. Default is Null. If supplied, it will generate simulated
data with a fixed value, |
Details
This generative model is proposed in (Jiang et al. 2017), Section 5, the second example. It uniformly defined three sets of conditional distributions of the survival times given the observable covariates at each stage within the same framework.
All three models satisfy the independent censoring assumption.
Value
This function returns a data.frame with simulated subject trajectories.
x0
the baseline covariate, always observable at relative time point 0;a0
the observed first-stage treatment level at relative time point 0;x1
an updated covariate observable to the relative time points_Diff_Time
, when the a second stage treatment is scheduleda1
the observed second-stage treatment level at relative time points_Diff_Time
.
References
Jiang R, Lu W, Song R, Davidian M (2017). “On estimation of optimal treatment regimes for maximizing t-year survival probability.” Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79(4), 1165–1185.
Examples
dataA <- simJLSDdata(500,case="a")
dataB <- simJLSDdata(500,case="b")
dataC <- simJLSDdata(500,case="c")