Description Usage Arguments Details Value References Examples
Function to generate simulation data from a sequentially randomized experiment designed in \insertCitejiang2017estimationQTOCen
1 2 | simJLSDdata(n, case = "a", s_Diff_Time = 1, C_max = 5,
Censored = TRUE, fix_x0_value = NULL)
|
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, |
This generative model is proposed in \insertCitejiang2017estimationQTOCen, 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.
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
.
jiang2017estimationQTOCen
1 2 3 | dataA <- simJLSDdata(500,case="a")
dataB <- simJLSDdata(500,case="b")
dataC <- simJLSDdata(500,case="c")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.