RWTR {wintime} | R Documentation |
Restricted win time ratio
Description
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.
Usage
RWTR(n, m, tau, tg, Time, Delta)
Arguments
n |
The total number of trial participants. |
m |
The number of events in the hierarchy. |
tau |
The maximum follow up time (days). |
tg |
A numeric vector containing treatment arm indicators (1 for treatment, 0 for control). |
Time |
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. |
Delta |
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. |
Value
A list containing: The ratio of losses to wins on treatment, the total number of wins, and the total number of losses.