Title: | Analysis of Partially Ordered Data |
---|---|
Description: | Win ratio approach to partially ordered data, such as multivariate ordinal responses under product (consensus) or prioritized order. Two-sample tests and multiplicative regression models are implemented (Mao, 2024). |
Authors: | Lu Mao [aut, cre] |
Maintainer: | Lu Mao <[email protected]> |
License: | CC BY 4.0 |
Version: | 1.0.0 |
Built: | 2025-02-15 03:23:55 UTC |
Source: | https://github.com/lmaowisc/poset |
A total of 186 patients with non-alcoholic fatty liver disease were recruited at the University of Wisconsin Hospitals in 2017. The patients underwent computed tomography scan of the liver for the presence of non-alcoholic steato-hepatitis, the most severe form of non-alcoholic fatty liver disease. The image was subsequently assessed by two radiologists using a scale of 1 to 5, with higher values indicating greater likelihood of disease. This is a slightly altered dataset from the one used in Mao (2024).
liver
liver
A data frame with 186 rows (one per patient) and 7 variables:
Rating scores (1-5) by two readers.
M
: male; F
: female.
Advanced fibrosis (TRUE
or FALSE
).
Percent of steatosis.
Liver mean gray level intensity.
Liver surface nodularity.
Mao, L. (2024). Win ratio for partially ordered data. Statistica Sinica, Under revision.
Print summary results for win ratio regression.
## S3 method for class 'summary.wreg' print(x, ...)
## S3 method for class 'summary.wreg' print(x, ...)
x |
An object returned by |
... |
Further arguments passed to or from other methods |
No return value, called for side effects.
wreg
Print concise results for win ratio regression.
## S3 method for class 'wreg' print(x, ...)
## S3 method for class 'wreg' print(x, ...)
x |
An object returned by |
... |
Further arguments passed to or from other methods |
No return value, called for side effects.
wreg
.
wrtest
Print the results for two-sample win ratio (net benefit) analysis, including point estimates, 95% confidence intervals, and p-values.
## S3 method for class 'wrtest' print(x, ...)
## S3 method for class 'wrtest' print(x, ...)
x |
An object returned by |
... |
Further arguments passed to or from other methods |
No return value, called for side effects.
wreg
Summarize the inferential results for win ratio regression.
## S3 method for class 'wreg' summary(object, ...)
## S3 method for class 'wreg' summary(object, ...)
object |
An object returned by |
... |
Additional arguments affecting the summary produced. |
An object of class summary.wreg
with components:
coefficients |
A matrix of coefficients, standard errors, z-values and p-values. |
exp_coef |
A matrix of win ratios (exp(coef)) and 95% confidence intervals. |
wald , wald_pval
|
Overall wald test statistic on all covariates and p-value. |
wreg
.
#See examples for wreg().
#See examples for wreg().
A common rule of comparison for the fun
argument
in wrtest
and wreg
.
A winner has all its components
greater than or equal to those of the loser, and strictly
so for at least one component.
wprod(y1, y0)
wprod(y1, y0)
y1 |
A |
y0 |
A |
An integer in :
1 |
If |
-1 |
If |
0 |
Otherwise. |
Fit a multiplicative win-ratio regression model to partially ordered response against covariates.
wreg(Y, Z, fun = NULL, sfun = NULL, ep = 1e-06)
wreg(Y, Z, fun = NULL, sfun = NULL, ep = 1e-06)
Y |
An |
Z |
An |
fun |
User-specified win function for pairwise comparison.
It takes two arguments |
sfun |
The scoring function used in pseudo-efficient estimation.
The default is to take the row means of |
ep |
Convergence criterion in Newton-Raphson algorithm. The default is 1e-6. |
An object of class wreg
with the following components:
beta |
A vector of estimated regression coefficients. |
var |
Estimated covariance matrix for |
l |
Number of Newton-Raphson iterations. |
beta_nv |
Naive (non-pseudo-efficient) estimates of |
se_nv |
Estimated standard errors for |
n |
Sample size |
Nwl |
Number of comparable pairs (those with a win and loss)
out of the |
Mao, L. (2024). Win ratio for partially ordered data. Statistica Sinica, Under revision.
wprod
, print.wreg
, summary.wreg
.
head(liver) # regress bivariate ratings against covariates Y <- 5 - liver[, c("R1NASH", "R2NASH")] # lower score is better Z <- cbind("Female" = liver$Sex == "F", liver[, c("AF", "Steatosis", "SSF2", "LSN")]) # covariates obj <- wreg(Y, Z) # fit model obj summary(obj)
head(liver) # regress bivariate ratings against covariates Y <- 5 - liver[, c("R1NASH", "R2NASH")] # lower score is better Z <- cbind("Female" = liver$Sex == "F", liver[, c("AF", "Steatosis", "SSF2", "LSN")]) # covariates obj <- wreg(Y, Z) # fit model obj summary(obj)
Estimate and make inference on win ratio (net benefit) comparing a treatment to a control group.
wrtest(Y1, Y0, fun = wprod)
wrtest(Y1, Y0, fun = wprod)
Y1 |
|
Y0 |
|
fun |
User-specified win function for pairwise comparison.
It takes two arguments |
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 ( |
nb , nb_se , nb_pval
|
Net benefit estimate ( |
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.
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
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