View source: R/Scoring_Conti.R
| Scoring_Conti | R Documentation |
Assigns win, loss, tie, or unresolved scores to subject pairs based on a continuous endpoint. This function is typically used after higher-priority layers have left a pair unresolved.
Scoring_Conti(dataset, higher_better, var1, var2)
dataset |
A data frame containing pairwise subject comparisons.
The data frame must contain columns named |
higher_better |
Character. Use |
var1 |
Character. Name of the continuous endpoint column for subject 1. |
var2 |
Character. Name of the continuous endpoint column for subject 2. |
A data frame matching dataset, with updated score
and WR_cat columns. Scores are 1 when subject 1 wins, -1 when
subject 2 wins, 0 for exact or near-exact ties, and NA when either
value is missing.
pairs <- data.frame(
usubjid1 = c(1, 1, 2),
usubjid2 = c(3, 4, 4),
kccq1 = c(15, 10, NA),
kccq2 = c(10, 10, 12),
score = NA_real_,
WR_cat = ""
)
Scoring_Conti(pairs, higher_better = "Yes", var1 = "kccq1", var2 = "kccq2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.