This function calculates the ratio of losses to wins on treatment. It iterates through all pairs of treatment and control patients and uses their time-to-death (or most severe clinical event) to determine a win or loss. If death is inconclusive, then a winner is determined based on wintime.
RWTR(n, m, tau, tg, Time, Delta)
A list containing: The ratio of losses to wins on treatment, the total number of wins, and the total number of losses.
The total number of trial participants.
The number of events in the hierarchy.
The maximum follow up time (days).
A numeric vector containing treatment arm indicators (1 for treatment, 0 for control).
A m x n matrix of event times (days), where m is the number of events in the hierarchy, and n is the total number of trial participants. Rows should represent events and columns should represent participants. Event rows should be in increasing order of clinical severity.
A m x n matrix of event indicators, where m is the number of events in the hierarchy, and n is the total number of trial participants. Rows should represent events and columns should represent participants. Event rows should be in increasing order of clinical severity.