Learn R Programming

wintime (version 0.2.0)

WTR: 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 win time difference as the deciding factor of a win or loss.

Usage

WTR(n, m, tau, tg, Time, Delta)

Value

A list containing: The ratio of losses to wins on treatment, the total number of wins, and the total number of losses.

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). 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. Rows should represent events and columns should represent participants. Event rows should be in increasing order of clinical severity.