simPHdata: Function to simulate data from sequentially randomized...

Description Usage Arguments Details Value Note References See Also Examples

Description

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

Usage

1
2
simPHdata(n, max.c, pi.x, pi.z, lambda, alpha, 
beta1, beta2, beta3, beta4, beta5, gamma)

Arguments

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

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

Note

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

References

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

See Also

PHfit, contrast_ph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#-------Example function usage-----------
n <- 400
pi.x <- 0.5
pi.z <- 0.5
lambda <- 1/4
alpha <- 1/6
beta1 <- -0.5
beta2 <- -0.8
beta3 <- 0.5
beta4 <- 1
beta5 <- -1
gamma <- -0.5
max.c <- 14

set.seed(123)
PHdata <- simPHdata(n,max.c,pi.x,pi.z,lambda,alpha,
beta1,beta2,beta3,beta4,beta5,gamma)

DTR documentation built on May 2, 2019, 3:26 p.m.