Function to generate simulation data from a sequentially randomized experiment designed in jiang2017estimationQTOCen
simJLSDdata(n, case = "a", s_Diff_Time = 1, C_max = 5,
Censored = TRUE, fix_x0_value = NULL)sample size
string. One of "a", "b", "c", corresponding to three models.
Numeric. Default is 1. This is the length of time between two stages of treatment
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.
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.
Numeric. Default is Null. If supplied, it will generate simulated
data with a fixed value, fix_x0_value, of the univariate baseline covarate.
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 point
s_Diff_Time, when the
a second stage treatment is scheduled
a1 the observed second-stage treatment level at relative time point s_Diff_Time.
This generative model is proposed in jiang2017estimationQTOCen, 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.
jiang2017estimationQTOCen
# NOT RUN {
dataA <- simJLSDdata(500,case="a")
dataB <- simJLSDdata(500,case="b")
dataC <- simJLSDdata(500,case="c")
# }
Run the code above in your browser using DataLab