Description Usage Arguments Details Value Note References See Also Examples

This function generates a data set from sequentially randomized clinical trials as described in the simulation study of Tang and Wahed (2011).

1 2 |

`n` |
total number of subjects participating in the clinical trial |

`max.c` |
censoring time C is generated from uniform(0, max.c) |

`pi.x` |
the probability of being assigned to A2 at the first stage. The first-stage treatment indicator X is generated from Bernoulli(pi.x). X=0 if assigned to A1 at the first stage, and X=1 if assigned to A2 at the first stage. |

`pi.z` |
the probability of being assigned to B2 among responders. The second-stage treatment indicator Z is generated from Bernoulli(pi.z) among responders (R=1). Z=0 if assigned to B1 at the second stage, and Z=1 if assigned to B2 at the second stage. For non-responders (R=0), Z=0 |

`lambda` |
baseline hazard |

`alpha` |
a response time TR is drawn from exponential(alpha) with mean equal to 1/alpha |

`beta1` |
coefficient for first-stage indicator X |

`beta2` |
coefficient for time-varying response indicator R(t)=R*I(TR<t) |

`beta3` |
coefficient for the interaction between X and R(t) |

`beta4` |
coefficient for the interaction between R(t) and second-stage indicator Z |

`beta5` |
coefficient for the three-way interaction among X, R(t), and Z |

`gamma` |
coefficient for the covariate V. Covariate V is drawn from normal distribution with mean 1 and standard deviation 0.5 |

In sequentially randomized designs, there could be more than two therapies available at each stage. For simplicity, and to maintain similarity to the most common sequentially randomized clinical trials, a simple two-stage randomization design allowing two treatment options at each stage is used in the current version of the package. In detail, patients are initially randomized to either A1 or A2 at the first stage. Based on their response status, they are then randomized to either B1 or B2 at the second stage. Therefore, there are a total of four dynamic treatment regimes (DTRs): A1B1, A1B2, A2B1, and A2B2.

The function returns a data set with columns: X, TR, R, Z, U, delta, and V.

`X` |
first-stage indicator, X=0 if assigned to A1, and X=1 if assigned to A2 |

`TR` |
time to response |

`R` |
response status, R=1 for responders, and R=0 for non-responders |

`Z` |
second-stage indicator among responders (R=1), Z=0 if assigned to B1, and Z=1 if assigned to B2 |

`U` |
observed survival time, U is event time if delta=1, and U is censoring time if delta=0 |

`delta` |
censoring indicator, delta=1 for event, and delta=0 for censored |

`V` |
a continuous covariate following normal distribution with mean 1 and standard deviation 0.5 |

Set a seed right before `simPHdata`

will help reproduce the same data.

Tang X, Wahed AS: Comparison of treatment regimes with adjustment for auxiliary variables. Journal of Applied Statistics 38(12):2925-2938, 2011

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.