Learn R Programming

DTR (version 1.2)

DTR.Logrank.test: Function to compare dynamic treatment regimes (DTRs) using weighted logrank tests

Description

This function compares the survival distributions of dynamic treatment regimes (DTRs) from sequentially randomized clinical trials using the weighted logrank tests proposed in an unpublished 2005 PhD thesis from North Carolina State University by X. Guo, Feng and Wahed (2008), and Kidwell and Wahed (2013). 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.Logrank.test(fdata)

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

Value

  • The function returns a data set with columns: H0, (standardized) test statistic, and p-value.
  • H0the null hypotheses being tested, for example, H0: A1B1=A1B2=A2B1=A2B2 for overall comparison
  • (standardized) test statisticthe calculated (standardized) test statistic, chi-square test statistic for overall comparison, and z test statistic for pairwise comparisons
  • 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. 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

Guo X: Statistical analysis in two-stage randomization designs in clinical trials. PhD thesis, Department of Statistics, North Carolina State University, 2005 Feng W, Wahed AS: Supremum weighted log-rank test and sample size for comparing two-stage adaptive treatment strategies. Biometrika 95:695-707, 2008 Kidwell KM, Wahed AS: Weighted log-rank statistic to compare shared-path adaptive treatment strategies. Biostatistics, 14(2):299-312, 2013

See Also

DTR, sim.Logrank.data

Examples

Run this code
require(DTR)
  
#-------Example function usage-----------
n <- 100
max.c <- 12 # 30\% censoring
pi.x <- 0.5
pi.r <- 0.6 # 60\% response rate
pi.z <- 0.5
mean.NR.1 <- 1
mean.NR.2 <- 1
mean.R.1 <- 1
mean.R.2 <- 1
mean.RE.11 <- 5
mean.RE.12 <- 5
mean.RE.21 <- 5
mean.RE.22 <- 5

set.seed(123)
fdata <- sim.Logrank.data(n,max.c,pi.x,pi.r,pi.z,mean.NR.1,mean.NR.2,
mean.R.1,mean.R.2,mean.RE.11,mean.RE.12,mean.RE.21,mean.RE.22)

# Testing
DTR.Logrank.test(fdata)

Run the code above in your browser using DataLab