wrtest {poset}R Documentation

Two-sample win ratio (net benefit) analysis

Description

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

wprod, print.wrtest.

Examples

head(liver)
## 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

[Package poset version 1.0.0 Index]