Learn R Programming

DTR (version 1.2)

DTR.Cox.test: Function to compare dynamic treatment regimes (DTRs) after adjustment for covariates

Description

This function compares the survival distributions (i.e. hazard functions) of dynamic treatment regimes (DTRs) from sequentially randomized clinical trials after adjustment for covariates as proposed in Tang and Wahed (2011). 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.Cox.test(fdata)

Arguments

fdata
a data frame (X, TR, R, Z, U, delta, V) 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

Value

  • The function returns a data set with columns: H0, test statistic, and p-value.
  • H0the null hypotheses being tested, for example, H0: A1B1=A1B2=A2B1=A2B2
  • 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. Four different comparisons are performed: 1) An overall comparison H0: A1B1=A1B2=A2B1=A2B2 2) First-stage comparison H0: A1=A2 3) Second-stage comparison H0: B1=B2 4) Pairwise comparisons including H0: A1B1=A1B2, H0: A1B1=A2B1, H0: A1B1=A2B2, H0: A1B2=A2B1, H0: A1B2=A2B2, and H0: A2B1=A2B2

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

DTR, sim.Cox.data

Examples

Run this code
require(DTR)
  
#-------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)
fdata <- sim.Cox.data(n,max.c,pi.x,pi.z,lambda,alpha,beta1,beta2,beta3,beta4,beta5,gamma)

# Testing
DTR.Cox.test(fdata)

Run the code above in your browser using DataLab