
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\). Mathematically
identical to phylo_unique(species) standalone; standalone =
T univariate phylogenetic mixed models stacked.
Arguments
- formula
0 + trait | speciesstyle formula. The LHS must be0 + trait(the trait factor); the RHS is the species column.- tree
An
ape::phyloobject. Canonical.- vcv
A tip-only phylogenetic correlation matrix (
n_species x n_species). Legacy / superseded.
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()
paired with phylo_unique() for the paired phylogenetic decomposition
\(\boldsymbol\Sigma_{\text{phy}} = \boldsymbol\Lambda_{\text{phy}}\boldsymbol\Lambda_{\text{phy}}^\top + \mathbf S_{\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(). Combining phylo_indep with
phylo_unique is redundant and also errors.
Future extensibility
The formula syntax phylo_indep(0 + trait + trait:x | species) is
reserved as a future path for trait-specific phylogenetic random
slopes on covariate x. The parser recognises the syntax but the
engine currently supports only the simple 0 + trait | species form;
richer LHS expressions are deferred.
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.