Learn R Programming

DTR (version 1.2)

DTR.Wald.test: Function to compare dynamic treatment regimes (DTRs) using Wald-type tests

Description

This function compares the survival distributions of dynamic treatment regimes (DTRs) from sequentially randomized clinical trials based on the LDT estimator proposed in Lunceford, Davidian and Tsiatis (2002) or the WRSE estimator proposed in Guo and Tsiatis (2005) using the Wald-type tests. 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 implemented in the current version of the function.

Usage

DTR.Wald.test(fdata, t=quantile(fdata$U, 0.75), method="LDT", 
rmean=FALSE, L=.Machine$double.xmax)

Arguments

fdata
a data frame (X, TR, R, Z, U, delta) representing the full data from a simple two stage randomization design with therapies A1 and A2 available at the first stage, and B1 and B2 available at the second stage. X: first-stage indicator, X=0 if assigned to
t
a time point of interest. For example, t=5 for the comparisons of survival estimates at 5 years among DTRs. Default t is set to be the 75th percentile of the observed time (i.e. 75th percentile of U). The value of t is only used when mean=FALSE.
method
the survival estimates to be used for comparisons. The survival estimator proposed in Lunceford, Davidian and Tsiatis (2002) is used when method="LDT" (default), and the weighted risk set estimator (WRSE) proposed in Guo and Tsiatis (2005) is used when me
rmean
if rmean=FALSE (default), the comparisons are made for the survival estimates at time t. If mean=TRUE, the comparisons are made for the restricted mean survival. mean=TRUE is only allowed when method="LDT".
L
restricted survival time. Default is .Machine$double.xmax, which is the largest double value of R. Set L to a numeric number smaller than the maximum follow-up time if restricted follow-up time up to L is considered. The value of L is only used when metho

Value

  • The function returns a data set with columns: H0, test statistic, and p-value.
  • H0the null hypotheses being tested, for example, H0 (t=3) if rmean=FALSE (default) and t=3, or H0 (mean) if rmean=TRUE for the overall comparison
  • test statisticthe calculated chi-square test statistic
  • pthe resulting p-value

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. Comparisons can be made among DTRs based on two different estimation methods: 1) "LDT" proposed in Lunceford, Davidian and Tsiatis (2002). Two different comparisons are allowed when method="LDT": comparisons of survival estimates at certain time point (e.g. 5 years) if rmean=FALSE (default), and comparisons of restricted mean survival if rmean=TRUE. Values less than the maximum follow-up time are allowed for L. 2) "WRSE" proposed in Guo and Tsiatis (2005). Only comparisons of survival estimates at certain time point (e.g. 5 years) is allowed. Options for rmean and L are disabled. Two different comparisons are performed: 1) An overall comparison H0: A1B1=A1B2=A2B1=A2B2 2) Pairwise comparisons including H0: A1B1=A1B2, H0: A1B1=A2B1, H0: A1B1=A2B2, H0: A1B2=A2B1, H0: A1B2=A2B2, and H0: A2B1=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 Guo X, Tsiatis AA: A weighted risk set estimator for survival distributions in two-stage randomization designs with censored survival data. Int. J. Biostatistics 1:1-15, 2005

See Also

DTR, sim.LDT.data, LDT.estimator, LDT.mean.estimator, sim.WRSE.data, WRSE.estimator, DTR.surv.plot

Examples

Run this code
require(DTR)
  
#-------Example function usage-----------
n <- 500
max.c <- 3.5*365 
pi.r <- 0.5 
pi.z <- 0.5 
mean.T0 <- 182.5 
mean.TR <- 365 
mean.T1 <- 365 
mean.T2 <- 547.5

# Generate A1 data from SRD
set.seed(123)  # Set a seed to reproduce the same data every time running the following command
data <- sim.WRSE.data(n,max.c,pi.r,pi.z,mean.T0,mean.TR,mean.T1,mean.T2)

# Generate full data from SRD
set.seed(123)
data.A1 <- sim.WRSE.data(n,max.c,pi.r,pi.z,mean.T0,mean.TR,mean.T1,mean.T2)
data.A2 <- sim.WRSE.data(n,max.c,pi.r,pi.z,mean.T0,mean.TR,mean.T1,mean.T2)
fdata <- cbind(X=c(rep(0,n), rep(1,n)), rbind(data.A1, data.A2)) # X=0 for A1; X=1 for A2

# Testing
DTR.Wald.test(fdata, t=1, method="LDT", rmean=FALSE, L=1.5)

Run the code above in your browser using DataLab