Reports the higher-level random-effect correlation edge(s) — the
between-unit coupling u_level,y1 <-> u_level,y2 among random effects sharing a
grouping level (class 3 in docs/design/07-bivariate-covariance-edges.md).
For a drm_pair() these are the declared corpair edges (auto-detected from
shared grouping factors); for a drm_sem() they are the declared higher-level
covariance edges. As with rho12(), the estimate is read back from a live
bivariate drmTMB fit and is NA in the pure-R lane. Reported separately from
the residual rho12 because the two answer different biological questions
(between-unit average coupling vs within-observation residual coupling).
Usage
corpairs(object, ...)
# S3 method for class 'drm_pair'
corpairs(object, ...)
# S3 method for class 'drm_sem'
corpairs(object, ...)References
Bollen KA (1989). Structural Equations with Latent Variables. Wiley, New York.
Brooks ME, Kristensen K, van Benthem KJ, Magnusson A, Berg CW, Nielsen A, Skaug HJ, Maechler M, Bolker BM (2017). “glmmTMB Balances Speed and Flexibility Among Packages for Zero-Inflated Generalized Linear Mixed Models.” The R Journal, 9(2), 378–400. doi:10.32614/RJ-2017-066 .
Examples
corpairs(drm_pair(activity ~ x + (1 | id), boldness ~ x + (1 | id)))
#> <higher-level correlation (corpair): 1 edge>
#> level y1 y2 estimate
#> id activity boldness NA
#> estimate NA: rho12/corpair are declared; a joint bivariate drmTMB fit is needed
#> to read fitted values back (OQ-14, 0.4 engine).