Learn R Programming

DTR (version 1.2)

WRSE.estimator: Function for calculating WRSE estimator

Description

The function computes the weighted risk set estimates (WRSE) of the survival functions and their estimated standard errors for dynamic treatment regimes (DTRs) at given time points as proposed in Guo and Tsiatis (2005) Equation (3) and Equation (16). Because different assignments at the first stage are independent to each other, the function only calculates estimates for one of the assignments at the first stage. For example, if there are two first-stage therapies A1 and A2 available, the function only calculates estimates for one of the two arms (e.g. A1).

Usage

WRSE.estimator(data, t)

Arguments

data
a data frame (TR, R, Z, U, delta) representing the data for one of the first-stage assignments from sequentially randomized designs. TR: the time to response for responders (R=1) R: response status, R=1 for responders, and R=0 for non-responders Z: sec
t
a vector with time points of interest. For example, t=c(150,500,700) for the survival estimates at 150, 500, and 700 days respectively

Value

  • The function returns a matrix for the WRSEs and their standard errors for dynamic treatment regimes A1B1 and A1B2 at given time points. Each row represents one of the time points of interest in order. There are a total of six columns (TIME, SURV1, SURV2, SE1, SE2, COV12).
  • TIMEtimes of interest
  • SURV1WRSE for A1B1
  • SURV2WRSE for A1B2
  • SE1estimated standard error for SURV1
  • SE2estimated standard error for SURV2
  • COV12estimated covariance for SURV1 and SURV2

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 DTRs: A1B1, A1B2, A2B1, and A2B2.

References

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.WRSE.data, DTR.Wald.test, 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 data as in Guo and Tsiatis (2005)
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)

# Calculate WRSE
WRSE.estimator(data,t=c(150,500,700))

Run the code above in your browser using DataLab