simLDTdata {DTR} R Documentation

## Function to simulate data from sequentially randomized clinical trials (Lunceford, Davidian and Tsiatis 2002)

### 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

simLDTdata(n, max.c, pi.r, pi.z, lambda, alpha,

### 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.

### Value

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

 R response status, R=1 for responders, and R=0 for non-responders Z second-stage indicator, 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

### Note

Set a seed right before simLDTdata will help reproduce the same data.

### 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

LDTestimate

### Examples


#-------Example function usage-----------
n <- 100
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)
data.A1 <- simLDTdata(n,max.c,pi.r,pi.z,
lambda,alpha,beta1,beta2,L)
data.A2 <- simLDTdata(n,max.c,pi.r,pi.z,
lambda,alpha,beta1,beta2,L)
LDTdata <- cbind(X=c(rep(0,n), rep(1,n)),
rbind(data.A1, data.A2)) # X=0 for A1; X=1 for A2



[Package DTR version 1.7 Index]