Learn R Programming

wintime (version 1.0.0)

EWT: Expected win time

Description

Calculates the state space probabilities using a Kaplan-Meier model (recommended) or a Markov model. This function uses these probabilities to compare both arms and calculate the expected win time of the treatment arm.

Usage

EWT(
  m,
  Time,
  Delta,
  trt,
  dist_state0,
  dist_state1,
  unique_event_times0,
  unique_event_times1,
  nunique_event_times0,
  nunique_event_times1,
  maxfollow0,
  maxfollow1,
  max_time_inc
)

Value

A list of the expected win time of the treatment arm, the components of the treatment effect.

Arguments

m

The number of events in the hierarchy.

Time

A m x n matrix of event times (days). Rows should represent events and columns should represent participants. Rows should be in increasing order of clinical severity.

Delta

A m x n matrix of event indicators Rows should represent events and columns should represent participants. Rows should be in increasing order of clinical severity.

trt

A vector containing treatment arm indicators (1 for treatment, 0 for control).

dist_state0

A matrix of control arm state probabilities (returned from wintime::km() or wintime::markov()).

dist_state1

A matrix of treatment arm state probabilities (returned from wintime::km() or wintime::markov()).

unique_event_times0

A vector of unique control arm event times (days) (returned from wintime::km() or wintime::markov()).

unique_event_times1

A vector of unique treatment arm event times (days) (returned from wintime::km() or wintime::markov()).

nunique_event_times0

The number of unique control arm event times (returned from wintime::km() or wintime::markov()).

nunique_event_times1

The number of unique treatment arm event times (returned from wintime::km() or wintime::markov()).

maxfollow0

The max control arm time (days) for valid nonparametric state space estimation (returned from wintime::markov() or wintime::km()).

maxfollow1

The max trt arm time (days) for valid nonparametric state space estimation (returned from wintime::markov() or wintime::km()).

max_time_inc

Optional. Maximal time increment for updating multi-state distribution when parametric exponential extension models are used. If unspecified, updates done at each event time in combined trial.