contrast_logrank {DTR}R Documentation

Function to compare dynamic treatment regimes (DTRs) using weighted logrank tests


This function compares the survival distributions of dynamic treatment regimes (DTRs) from sequentially randomized clinical trials using the weighted logrank tests proposed in Kidwell and Wahed (2013).





a data frame (X, TR, R, Z, U, delta) representing the data from a 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 A1, and X=1 if assigned to A2
TR: optional time to response for responders (R=1), only needed if method="WRSE"
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 death time if delta=1, and U is censoring time if delta=0
delta: censoring indicator, delta=1 for died, and delta=0 for censored


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


The function returns a data frame with four columns: H0, (standardized) test statistic, df, and p.


the null hypotheses being tested, for example, H0: A1B1=A1B2=A2B1=A2B2 for overall comparison

(standardized) test statistic

the calculated (standardized) test statistic, chi-square test statistic for overall comparison, and z test statistic for pairwise comparisons


the degree of freedom


the resulting p-value


The data frame generated from simLRdata is the same as the input data frame for contrast_logrank.


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



## Not run: 
## End(Not run)

[Package DTR version 1.7 Index]