
Per-trait phylogenetic marginal variance: phylo_indep(0 + trait | species)
Source: R/brms-sugar.R
phylo_indep.RdCanonical name for T per-trait phylogenetic variances coupled by the phylo correlation matrix \(\mathbf A\); standalone = T univariate phylogenetic mixed models stacked.
Arguments
- formula
Intercept-only
0 + trait | species, or the supported one-covariate intercept-and-slope form described above.- tree
An
ape::phyloobject. Canonical.- vcv
A tip-only phylogenetic correlation matrix (
n_species x n_species). Legacy alias ofA =.- A
Tip-level relatedness matrix (
n_species x n_species) – alias ofvcv =, aligned with theanimal_*family's argument naming.- Ainv
Sparse precision matrix (inverse of
A).- common
FALSE(default) for a separate phylogenetic variance per trait;TRUEties all traits to one shared phylogenetic variance (intercept-only).phylo_indep(0 + trait | species, common = TRUE)is the canonical one-shared-variance spelling and fits the same model as the soft-deprecatedphylo_scalar(species).
Details
Each trait \(t\) gets its own variance \(\sigma^2_{\text{phy},t}\) on the same phylogenetic correlation matrix \(\mathbf A_{\text{phy}}\); trait-specific random vectors are otherwise independent.
$$\mathbf p_t \sim \mathcal{N}(\mathbf 0,\, \sigma^2_{\text{phy},t}\,\mathbf A_{\text{phy}}), \qquad t = 1, \dots, T.$$
Use phylo_indep() for an explicit marginal-only phylogenetic fit
(no cross-trait phylogenetic decomposition). Use
phylo_latent(..., unique = TRUE) for the paired
phylogenetic decomposition
\(\boldsymbol\Sigma_{\text{phy}} = \boldsymbol\Lambda_{\text{phy}}\boldsymbol\Lambda_{\text{phy}}^\top + \boldsymbol\Psi_{\text{phy}}\).
Mutual exclusion with phylo_latent()
Combining phylo_indep(0 + trait | species) with
phylo_latent(species, d = K) is over-parameterised and the
parser raises a cli::cli_abort().
Intercept-and-slope form
A single-covariate random regression uses
phylo_indep(1 + x | species) in wide syntax or
phylo_indep(0 + trait + (0 + trait):x | species) in explicit long syntax.
It estimates an intercept–slope block with their correlation fixed to zero.
Pass the phylogeny via tree = phylo (canonical, sparse \(\mathbf{A}^{-1}\)) or
vcv = Cphy (, dense). See
phylo_latent() for the full discussion of the two paths.
References
Williams et al. (2025) Phylogenetic generalised linear mixed models for multi-trait comparative analyses. bioRxiv 2025.12.20.695312. The marginal
phylo_indep + indepstandalone form stacked across traits matches their PGLMM Eq. 3.