ORTH.Ord is a package designed for analyzing correlated ordinal outcomes which are commonly seen in longitudinal studies or clustered clinical trials. It implements a modified version of alternating logistic regressions (ALR) with estimation based on orthogonalized residuals (ORTH), which use paired estimating equations to jointly estimate parameters in marginal mean and within-association models. The within-cluster association between ordinal responses is modeled by global pairwise odds ratios (POR). This R package also provides a finite-sample bias correction to POR parameter estimates based on matrix multiplicative adjusted orthogonalized residuals (MMORTH) for correcting estimating equations, and different bias-corrected variance estimators such as BC1, BC2, and BC3. We refer users to our published paper (Meng et al., 2023) for details.
ALR uses marginal models with generalized estimating equations (GEE)
to jointly estimate marginal means and within-cluster associations. Let
Oij be an ordinal response with
C+1 levels, say 1,…,C+1, for the jth observation in the ith cluster, where cluster i has ni observations and i=1,…,N. Let Y(c)ij denote a binary indicator
for the level of ordinal response Oij such that Y(c)ij=I(Oij≤c) where c=1,…,C. For a given cluster i, the response vector Yi=(Y(1)i1,…,Y(C)i1,…,Y(1)ini,…,Y(C)ini)′
has Cni elements. Ordinal
outcomes are usually modeled with the proportional odds assumption,
which means the covariate vector Xij will have the same effect across
all levels of Oij. A marginal
mean model for Y(c)ij using a
proportional-odds cumulative logit model can be written as: logit{E(Y(c)ij|Xij)}=δc+X′ijβ where the intercept δc represents the log-odds of
falling into or below level c
(Oij≤c) when Xij=0, and coefficient vector β represents the effect of each
element of Xij and remains
constant across levels of Oij
under the proportional odds assumption.
ψ(a,b)ij,k=Pr(Y(a)ij=1,Y(b)ik=1)×Pr(Y(a)ij=0,Y(b)ik=0)Pr(Y(a)ij=1,Y(b)ik=0)×Pr(Y(a)ij=0,Y(b)ik=1)=μ(a,b)ij,k(1−μ(a)ij−μ(b)ik+μ(a,b)ij,k)(μ(a)ij−μ(a,b)ij,k)(μ(b)ik−μ(a,b)ij,k) where μ(a)ij=E(Y(a)ij)=Pr(Y(a)ij=1),
μ(b)ik=E(Y(b)ik)=Pr(Y(b)ik=1),
and μ(a,b)ij,k=E(Y(a)ijY(b)ik)=Pr(Y(a)ij=Y(b)ik=1)
for 1≤a,b≤C,1≤j<k≤ni. If we let
α be a vector of association
parameters, then a generalized linear model for ψ(a,b)ij,k is specified as:
log(ψ(a,b)ij,k)=Z(a,b)′ij,kα
where Z(a,b)ij,k is a
covariate vector. We assume the POR is independent from cutpoints a and b, namely ψ(a,b)ij,k=ψij,k, so that
a parsimonious model for the within-cluster association can be obtained.
Note that model (2) is the association model for ALR. The mean parameter
β from model (1) and
association parameter α from
model (2) are jointly estimated through GEE. The estimate of β from model (1) is the solution to
the estimating equations: Uβ=N∑i=1D′iV−1i(Yi−μi)=0 where Di=∂μi/∂β′,
μi is determined by model (1),
and Vi is a working variance
matrix for the binary response Yi.
T(a,b)ij,k=(σ(a)ij,jσ(b)ik,k)1/2(R(a,b)ij,k−ρ(a,b)ij,k)−(b(a,b)ijk:j−μ(b)ik)(Y(a)ij−μ(a)ij)−(b(a,b)ijk:k−μ(a)ij)(Y(b)ik−μ(b)ik) where R(a,b)ij,k=r(a)ijr(b)ik={(Y(a)ij−μ(a)ij)/(σ(a)ij,j)1/2}{(Y(b)ik−μ(b)ik)/(σ(b)ik,k)1/2}ρ(a,b)ijk=Corr(Y(a)ij,Y(b)ik)=(μ(a,b)ij,k−μ(a)ijμ(b)ik)/(σ(a)ij,jσ(b)ik,k)1/2b(a,b)ijk:j=μ(a,b)ij,k(1−μ(b)ik)(μ(b)ik−μ(a,b)ij,k)/d(a,b)ij,kb(a,b)ijk:k=μ(a,b)ij,k(1−μ(a)ij)(μ(a)ij−μ(a,b)ij,k)/d(a,b)ij,kd(a,b)ij,k=σ(a)ij,jσ(b)ik,k−(σ(a,b)ij,k)2 We also define Tij,k=(T(1,1)ij,k,T(1,2)ij,k,⋯,T(1,C−1)ij,k,T(1,C)ij,k,T(2,1)ij,k,T(2,2)ij,k,⋯,T(2,C)ij,k,⋯,T(C,1)ij,k,T(C,2)ij,k,⋯,T(C,C)ij,k)′Ti=(T′i1,2,T′i1,3,⋯,T′i1,(ni−1),T′i1,ni,T′i2,3,T′i2,4,⋯,T′i2,(ni−1),T′i2,ni,⋯,T′i(ni−1),ni)′ to be vectors for the orthogonalized residuals,
where the dimension of Ti is
C2ni(ni−1)/2. In ORTH,
association parameter α is
estimated by the solution to Uα,ORTH=N∑i=1S′iP−1iTi=0 where Si=E(−∂Ti/∂α),
and Pi≈Var(Ti) with
elements defined by Cov(T(a,b)ij,k,T(a′,b′)ij′,k′).
˜T(a,b)ij,k=(σ(a)ij,jσ(b)ik,k)1/2(˜R(a,b)ij,k−ρ(a,b)ij,k)−(b(a,b)ijk:j−μ(b)ik)(Y(a)ij−μ(a)ij)−(b(a,b)ijk:k−μ(a)ij)(Y(b)ik−μ(b)ik) MMORTH uses ˜T(a,b)ij,k as an estimate
of T(a,b)ij,k in the
estimating equation (4).
Ω−11i{N∑i=1C1iD′iV−1iB1i(Yi−μi)(Yi−μi)′B′1iV−1iDiC1i}Ω−11i Further, let Ω2i=∑Ni=1S′iP−1iSi, then the sandwich variance estimator for ˆα is: Ω−12i{N∑i=1C2iS′iP−1iB2iTiT′iB′2iP−1iSiC2i}Ω−12i When B1i=I, B2i=I, C1i=I and C2i=I, there is no bias-correction, and estimators (5) and (6) refer to the uncorrected sandwich estimators for β and α; we will refer to these estimators as BC0. Different choices for B1i, B2i, C1i, and C2i will give different bias-corrected sandwich estimators. The three commonly used approaches for bias corrections considered here are illustrated as follows. Define H1i and H2i as cluster leverage matrices based on the marginal mean and association regression models. Let B1i=(I−H1i)−1/2, B2i=(I−H2i)−1/2, C1i=I and C2i=I; then the estimators (5) and (6) will be equal to the bias-corrected covariance estimators of BC1. When setting B1i=(I−H1i)−1, B2i=(I−H2i)−1, C1i=I and C2i=I, the estimators (5) and (6) become the bias-corrected covariance estimators of BC2. To obtain the bias-corrected covariance estimators of BC3, one can set B1i and B2i as identity matrix I, and let C1i=diag{(1−min and C_{2i}=diag\left\{(1-\min\{\zeta, [Q_{2i}]_{jj}\})^{-{1}/{2}} \right\}, where Q_{1i}=D_{i}'V_{i}^{-1}D_{i}\Omega_{1i}^{-1}, Q_{2i}=S_{i}'P_{i}^{-1}S_{i}\Omega_{2i}^{-1}, and set the bound parameter \zeta=0.75 to avoid over-correction.The three bias-corrected sandwich estimators are summarized in Table 1. BC2 was reported to have a greater amount of correction than both BC1 and BC3 in general, which will result in a larger standard error of parameter estimates.
Label | Sandwich variance estimator for \hat{\beta} | Sandwich variance estimator for \hat{\alpha} |
---|---|---|
C_{1i} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ B_{1i} | C_{2i} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ B_{2i} | |
BC0 | I I | I I |
BC1 | I (I-H_{1i})^{-{1}/{2}} | I (I-H_{2i})^{-{1}/{2}} |
BC2 | I (I-H_{1i})^{-1} | I (I-H_{2i})^{-1} |
BC3 | diag\left\{(1-\min\{\zeta, [Q_{1i}]_{jj}\})^{-1/2}\right\}^{*} I | diag\left\{(1-\min\{\zeta, [Q_{2i}]_{jj}\})^{-1/2}\right\}^{**} I |
*Q_{1i}=D_{i}'V_{i}^{-1}D_{i}\Omega_{1i}^{-1}; **Q_{2i}=S_{i}'P_{i}^{-1}S_{i}\Omega_{2i}^{-1} |
This package ORTH.Ord provides an ALR modeling framework to jointly estimate marginal means and within-cluster association of ordinal outcomes with the ability to adjust for small-sample bias. When using this package, the input data must be numeric for both the response variable and all covariates. For example, if an ordinal response is coded as “never”, “sometimes”, and “always”, the user need to convert it to numeric values, i.e. 1, 2 and 3 accordingly. The arguments of ORTH.Ord function are:
ORTH.Ord(formula_mean, data_mean, cluster, formula_por = NULL, data_por = NULL,
MMORTH = FALSE, BC = NULL, init_beta = NULL, init_alpha = NULL,
miter = 30, crit_level = 0.0001)
The details and defaults of arguments are summarized in Table 2, and further explanation is provided below.
Argument | Description | Default |
---|---|---|
formula_mean | the symbolic description of the marginal mean model that contains the ordinal outcome and marginal mean covariates. | |
data_mean | the data set containing the ordinal outcome and marginal mean covariates. | |
cluster | cluster ID (consecutive integers) in data_mean. | |
formula_por | the symbolic description of marginal association model in the form of a one-sided formula. | NULL |
data_por | a data set for marginal association model. | NULL |
MMORTH | a logical value to indicate if matrix-adjusted estimating equations will be applied for association estimation. | FALSE |
BC | an option to apply bias-correction on covariance estimation. | NULL |
init_beta | pre-specified starting values for parameters in the mean model. | NULL |
init_alpha | pre-specified starting values for parameters in the association model. | NULL |
miter | maximum number of iterations for Fisher scoring. | 30 |
crit_level | tolerance for convergence. | 0.0001 |
Can Meng, Mary Ryan, Paul Rathouz, Elizabeth Turner, John S Preisser, and Fan Li. 2023. ORTH.Ord: An R package for analyzing correlated ordinal outcomes using alternating logistic regressions with orthogonalized residuals. Computer Methods and Programs in Biomedicine, 237, DOI:10.1016/j.cmpb.2023.107567.