rpsftm: Rank Preserving Structural Failure Time Model

Description Usage Arguments Details Value Author(s) Examples

Description

rpsftm implements the rank preserving structural failure time model presented by Robins and Tsiatis (1991) and again by Korhonen et al (2012).

Usage

1
2
rpsftm(T, A, R, C, Y, id, strata = NULL, psi = seq(-3, 3, 0.001),
  weights = NULL)

Arguments

T

Total follow-up time contributed by each patient. This is typically the min(T,C), where T is the event time and C is the censoring time.

A

Total time each subject spends on active treatment. For subjects who are never exposed to active treatment (i.e. they are randomized to and remain in the placebo group), this value will be 0. For subjects remaining in the active treatment group during their entire follow-up, this will be equal to T.

R

Indicator of treatment group initially randomized to. This is a binary variable that takes on value 1 if the subject was randomized to treatment and 0 if the subject was randomized to the control group.

C

The observed censoring time. The model assumes that if a subject experiences a failure prior to observing the censoring time, then the censoring time would be the time from randomization until the end of study. It also assumes that censoring is independent of treatment assignment R. Typically, this is the indicator that min(T,C) is equal to T, i.e. that a failure was observed before a censoring event.

Y

Indicator of observed failure event. This is a binary variable that takes on value 1 if the event is observed and 0 otherwise. N

id

Cluster identification variable. This is used to label the counterfactual survival times.

strata

Strata that each id is assigned to.

psi

Grid of potential parameter values to estimate over. By default, the grid is set to seq(-3,3,.001).

weight

Observational weights.

Details

Data should be provided to the function in a longitudinal format, with the indicator of final outcome Y being constant across all observations from the same individual. T is the interval specific time contributed while on the specific treatment TX.

Value

From the potential values of psi, the function will return an object of class rpfstm, which includes (1) the statistics for the counterfactual distribution, (2) the empirical values for the counterfactual distribution off treatment, and (3) the summarized data for time spent both on and off treatment. The summarized data returned is ordered by id, with numeric IDs converted to character form.

For the statistics, the following values are reported

For the counterfactual distribution off treatment, the counterfactual survival times and indicators of failure are calculated for each of the psi values provided to the function.

Author(s)

Linh Tran

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Simulated data under no crossover or censoring
set.seed(1)
n = 100
R = rbinom(n, 1, 0.5)
T0 = rexp(n, .05)
T = ifelse(R==0, T0, exp(0.2)*T0)
A = ifelse(R==0, 0, T)
rpsftmFit1 = rpsftm(T, A, R, C=rep(Inf, n), Y=rep(1,n), id=seq(1,n), psi=seq(-3,3,.01))
rpsftmFit1
plot(rpsftmFit1)

# Simulated data under placebo crossover halfway through follow-up (no censoring)
set.seed(1)
n = 100
R = rbinom(n, 1, 0.5)
crossover = ifelse(R==1, 0, rbinom(n, 1, 0.5))
T0 = rexp(n, .05)
T = ifelse(R==0, ifelse(crossover==1, T0/2+exp(0.2)*(T0/2), T0), exp(0.2)*T0)
A = ifelse(R==0, ifelse(crossover==1, exp(0.2)*(T0/2), 0), T)
rpsftmFit2 = rpsftm(T, A, R, C=rep(Inf, n), Y=rep(1,n), id=seq(1,n), psi=seq(-3,3,.01))
rpsftmFit2
plot(rpsftmFit2)

tranlm/rpsftm documentation built on May 31, 2019, 7:45 p.m.