Provides tools for dyadic multilevel modeling with linear and generalized linear mixed-effects models. It validates and prepares long-format cross-sectional and intensive longitudinal data, including ecological momentary assessment designs, for distinguishable and exchangeable dyads. It also supports datasets containing multiple observed dyad compositions. It constructs composition-aware, model-ready variables for Actor-Partner Interdependence Models (APIMs), Dyad-Individual Models (DIMs), and Dyadic Score Models (DSMs). Prepared data can be used with model engines such as 'glmmTMB' and 'brms' for Gaussian and non-Gaussian outcomes, including counts, proportions, and skewed continuous responses. Post-estimation tools compare compatible fitted models and back-transform exchangeable sum-and-difference random-effect covariance structures into member-level quantities. Experimental predictive checks compare observed and simulated response variances and partner correlations in Gaussian and selected non-Gaussian models. Distributional diagnostics separately check response distributions and residual patterns, using simulations that retain partner and time dependence. The APIM and DSM specifications and their relationships follow Iida et al. (2018) <doi:10.1177/0265407517725407>; the multilevel sum-and-difference random-effects implementation for exchangeable dyads adapts del Rosario and West (2025) <doi:10.1177/25152459251351286>.
Package details |
|
|---|---|
| Author | Pascal Küng [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-7346-9414>) |
| Maintainer | Pascal Küng <kueng.pascal@gmail.com> |
| License | GPL-3 |
| Version | 0.3.0 |
| URL | https://pascal-kueng.github.io/dyadMLM/ https://github.com/Pascal-Kueng/dyadMLM |
| Package repository | View on CRAN |
| Installation |
Install the latest version of this package by entering the following in R:
|
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.