Joint random-effects covariance with ordinal biomarkers (Gaussian copula)
Source:R/copulaLongitudinal.R
longitudinalSubVarCopula.RdRe-estimates the shared random-effects covariance D
across all biomarkers by maximum likelihood, holding each biomarker's fixed
effects, residual variance and (for an ordinal biomarker) thresholds at
their separate-fit values, as longitudinalSubVar() does for
continuous ones. An ordinal observation is the category of a latent score
\(Z = \eta + \epsilon\), \(\epsilon \sim N(0, 1)\) (probit link,
Albert & Chib), observed only through the thresholds that bracket it, so
the posterior of the random effects given the data is not Gaussian and the
EM's \(E[b b^T \mid y]\) has no closed form. It is computed by
copula_D_aghq(), an EM with adaptive Gauss-Hermite quadrature over the ordinal biomarkers' random effects (the continuous biomarkers' random effects are integrated out exactly), when those number at mostmax_quadrature_dim; deterministic, with the usual convergence check;otherwise
copula_D_saem(), a stochastic-approximation EM (SAEM) that draws the latent scores, whose cost does not grow with that dimension.
Both target the same maximum-likelihood estimate, but with the default
number of iterations SAEM stopped short of it: for two ordinal biomarkers
with a random intercept and slope each (four ordinal random effects), the
random-effects variances were off by about 5% in simulations, which
quadrature (\(5^4 = 625\) nodes per subject) removes; hence the default
max_quadrature_dim = 4. The earlier version
plugged in the mean of each latent score given its category, which ignored
the score's own variance and underestimated the ordinal biomarkers'
random-effects variances (by about 40% for a random intercept and 75%
for a random slope in simulations).
Usage
longitudinalSubVarCopula(
thetaLong,
l,
biomarker_type,
thresholds,
tol.em = 1e-04,
max.iter = 500,
max_quadrature_dim = 4,
verbose = FALSE
)Arguments
- thetaLong
List with the stacked fixed effects
beta, the startingDand the residual variancessigma2(1 for an ordinal biomarker).- l
Per-subject design bookkeeping built by
longitudinalSubCopula();l$yik[[m]]holds an ordinal biomarker's category codes.- biomarker_type, thresholds
As stored in the fit.
- tol.em, max.iter
Convergence tolerance on
Dand iteration cap of the quadrature EM.- max_quadrature_dim
Largest number of ordinal random effects handled by quadrature.
- verbose
Print the change in
Dat every iteration.