For mixed-effects models, \Rsqcan be categorized into two types.
Marginal GLMM represents the variance explained by fixed
factors, and is defined as:$$R_{GLMM(m)}^{2}= \frac{\sigma_f^2}{\sigma_f^2 + \sum_{l=1}^{u}\sigma_{l}^{2} +
\sigma_e^2 + \sigma_d^2}$$
Conditional GLMM is interpreted as variance explained by both
fixed and random factors (i.e. the entire model), and is calculated according
to the equation:
$$R_{GLMM(c)}^{2}= \frac{\sigma_f^2 + \sum_{l=1}^{u}\sigma_{l}^{2}}{\sigma_f^2 +
\sum_{l=1}^{u}\sigma_{l}^{2} + \sigma_e^2 + \sigma_d^2}$$
where $\sigma_f^2$ is the variance of the fixed effect components, and
$\sum \sigma_{l}^{2}$ is the sum of all
latex{$u$}{} variance components (group, individual, etc.),
$\sigma_l^2$ is the variance due to additive dispersion and $\sigma_d^2$
is the distribution-specific variance.