| Scoring_TTE | R Documentation |
Assigns win, loss, or unresolved scores to subject pairs based on a time-to-event endpoint. This function is typically used for the first, highest-priority layer in a hierarchical win ratio analysis.
Scoring_TTE(dataset, var1, var2, censor1, censor2)
dataset |
A data frame containing pairwise subject comparisons.
The data frame must contain columns named |
var1 |
Character. Name of the time-to-event column for subject 1. |
var2 |
Character. Name of the time-to-event column for subject 2. |
censor1 |
Character. Name of the event indicator column for subject 1, coded as 1 for event and 0 for censored. |
censor2 |
Character. Name of the event indicator column for subject 2, coded as 1 for event and 0 for censored. |
A data frame matching dataset, with updated score
and WR_cat columns. Scores are 1 when subject 1 wins, -1 when
subject 2 wins, and NA when the comparison remains tied or
unresolved because of censoring.
pairs <- data.frame(
usubjid1 = c(1, 1),
usubjid2 = c(2, 3),
deathdays1 = c(360, 120),
deathdays2 = c(100, 200),
death1 = c(0, 1),
death2 = c(1, 1),
score = NA_real_,
WR_cat = ""
)
Scoring_TTE(pairs, "deathdays1", "deathdays2", "death1", "death2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.