Skip to contents

Estimate and make inference on win ratio (net benefit) comparing a treatment to a control group.

Usage

wrtest(Y1, Y0, fun = wprod)

Arguments

Y1

\(K\)-variate response data on \(n_1\) subjects in treatment (\(n_1\times K\) matrix).

Y0

\(K\)-variate response data on \(n_0\) subjects in control (\(n_0\times K\) matrix).

fun

User-specified win function for pairwise comparison. It takes two arguments \(y_1\) and \(y_0\) (both \(K\)-vectors) and returns 1 if \(y_1\) wins, -1 if \(y_0\) wins, and 0 if tied. The default is wprod for the product order of multivariate ordinal data.

Value

An object of class wrtest with the following components:

theta

A bivariate vector of win/loss fractions.

lgwr, lgwr_se, lgwr_pval

Log-win ratio estimate (log(theta[1]/theta[2])), standard error, and p-value.

nb, nb_se, nb_pval

Net benefit estimate (theta[1]-theta[2]), standard error, and p-value.

References

Mao, L. (2024). Win ratio for partially ordered data. Statistica Sinica, Under revision.

Buyse, M. (2010). Generalized pairwise comparisons of prioritized outcomes in the two-sample problem. Statistics in Medicine, 29, 3245-3257.

See also

Examples

head(liver)
#>   R1NASH R2NASH Sex    AF Steatosis  SSF2  LSN
#> 1      3      2   M FALSE        30  0.21 2.33
#> 2      1      1   F FALSE         5  0.38 2.86
#> 3      4      2   M FALSE        70  0.58 3.65
#> 4      4      4   F  TRUE        30 -0.08 2.73
#> 5      4      3   M  TRUE        70 -0.04 2.53
#> 6      3      3   M FALSE        10  0.02 2.88
## compare bivariate ratings by fibrosis stage
## lower score is better
Y1 <- liver[liver$AF, c("R1NASH", "R2NASH")] # advanced
Y0 <- liver[!liver$AF, c("R1NASH", "R2NASH")] # not advanced
obj <- wrtest(Y1, Y0)
obj
#> Call:
#> wrtest(Y1 = Y1, Y0 = Y0)
#> 
#> Two-sample (Y1 vs Y0) win ratio/net benefit analysis
#> 
#> Number of pairs: N1 x N0 =  69 x 116  =  8004 
#>   Win: 4251 (53.1%)
#>   Loss: 2392 (29.9%)
#>   Tie: 1361 (17%)
#> 
#> Win ratio (95% CI): 1.78 (1.16, 2.73), p-value = 0.00856547
#> Net benefit (95% CI): 0.232 (0.065, 0.4), p-value = 0.006577537
#>