Win ratio regression analysis
wreg.Rd
Fit a multiplicative win-ratio regression model to partially ordered response against covariates.
Arguments
- Y
An \(n\times K\) matrix for \(K\)-variate response data on \(n\) subjects. The entries must be numeric. For pseudo-efficient estimation (without specifying
sfun
), the average score across components (row means) should be compatible with the partial order (i.e., preserve the same order for any two comparable and ordered elements).- Z
An \(n\times p\) design matrix for covariates.
- 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.- sfun
The scoring function used in pseudo-efficient estimation. The default is to take the row means of
Y
.- ep
Convergence criterion in Newton-Raphson algorithm. The default is 1e-6.
Value
An object of class wreg
with the following components:
- beta
A vector of estimated regression coefficients.
- var
Estimated covariance matrix for
beta
- l
Number of Newton-Raphson iterations.
- beta_nv
Naive (non-pseudo-efficient) estimates of
beta
.- se_nv
Estimated standard errors for
beta_nv
.- n
Sample size \(n\) of input data with non-missing values.
- Nwl
Number of comparable pairs (those with a win and loss) out of the \(n(n-1)/2\) possible ones.
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
# 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
#> Call:
#> wreg(Y = Y, Z = Z)
#>
#> n = 154 subjects with complete data
#> Comparable (win/loss) pairs: 9548/11781 = 81%
#>
#> Female AF Steatosis SSF2 LSN
#> -0.18956 -0.9660827 -0.02779146 -0.007926333 -0.1029914
summary(obj)
#> Call:
#> wreg(Y = Y, Z = Z)
#>
#> n = 154 subjects with complete data
#> Comparable (win/loss) pairs: 9548/11781 = 81%
#>
#> Newton-Raphson algoritm converged in 7 iterations
#>
#> coef exp(coef) se(coef) z Pr(>|z|)
#> Female -0.189560 0.8273 0.259988 -0.729 0.465934
#> AF -0.966083 0.3806 0.280313 -3.446 0.000568 ***
#> Steatosis -0.027791 0.9726 0.005281 -5.262 1.42e-07 ***
#> SSF2 -0.007926 0.9921 0.003953 -2.005 0.044953 *
#> LSN -0.102991 0.9021 0.125718 -0.819 0.412657
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> exp(coef) exp(-coef) lower .95 upper .95
#> Female 0.82732 1.20872 0.49702 1.3771
#> AF 0.38057 2.62763 0.21970 0.6592
#> Steatosis 0.97259 1.02818 0.96258 0.9827
#> SSF2 0.99210 1.00796 0.98445 0.9998
#> LSN 0.90213 1.10848 0.70512 1.1542
#>
#> Overall Wald test = 79.129 on 5 df, p = 1.221245e-15