Learn R Programming

DTR (version 1.1-1)

sim.LDT.data: Function to simulate data from sequentially randomized clinical trials

Description

This function generates a data set from sequentially randomized clinical trials as described in the simulation study of Lunceford, Davidian and Tsiatis (2002). Because different assignments at the first stage are independent to each other, the function only generates data for one of the assignments at the first stage. For example, if there are two first-stage therapies A1 and A2 available, the function only simulates the data for one of the two arms (e.g. A1).

Usage

sim.LDT.data(n, L, max.c, pi.r, pi.z, lambda, alpha, beta1, beta2)

Arguments

n
number of subjects assigned to A1
L
restricted survival time. Because of the limited follow-up time, restricted lifetime is considered. We only consider survival up to some time L, where L is smaller than the maximum follow-up time
max.c
censoring time C is generated from uniform(0, max.c)
pi.r
the probability of response. Response status R is generated from Bernoulli(pi.r)
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=1 if assigned to B2 at the second stage, and Z=0 if assigned to B1 at the second stage. For non-re
lambda
for nonresponders (R=0), a survival time T*_lambda is drawn from exponential(lambda) with mean 1/lambda
alpha
for responders, a response time T*_alpha is drawn from exponential(alpha) with mean 1/alpha
beta1
post-response survival time under B1, T*_11 is drawn from exponential(e^beta1)
beta2
post-response survival time under B2, T*_12 is drawn from exponential(e^(beta1+beta2*T*_11))

Value

  • The function returns a data set with columns: R, Z, V, and delta.
  • Rresponse status, R=1 for responders, and R=0 for non-responders
  • Zsecond-stage indicator, Z=0 if assigned to B1, and Z=1 if assigned to B2
  • Vobserved survival time, V is death time if delta=1, and V is censoring time if delta=0
  • deltacensoring indicator, delta=1 for died, and delta=0 for censored

Details

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.

References

Lunceford JK, Davidian M, Tsiatis AA: Estimation of survival distributions of treatment policies in two-stage randomization designs in clinical trials. Biometrics 58:48-57, 2002

See Also

DTR, LDT.estimator, LDT.mean.estimator

Examples

Run this code
require(DTR)
  
#-------Example function usage-----------
n<-500
L<-1.5
max.c<-2.5
pi.r<-0.5
pi.z<-0.5
lambda<-1.33
alpha<-6.67
beta1<-0.29
beta2<--0.67

# Generate data from SRD
set.seed(123)  # Set a seed to reproduce the same data every time running the following command
data<-sim.LDT.data(n,L,max.c,pi.r,pi.z,lambda,alpha,beta1,beta2)

Run the code above in your browser using DataLab