Skip to contents

Canonical 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.

Usage

phylo_indep(formula, tree = NULL, vcv = NULL)

Arguments

formula

0 + trait | species style formula. The LHS must be 0 + trait (the trait factor); the RHS is the species column.

tree

An ape::phylo object. Canonical.

vcv

A tip-only phylogenetic correlation matrix (n_species x n_species). Legacy / superseded.

Value

A formula marker; never evaluated.

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 ([Superseded], 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 + indep standalone form stacked across traits matches their PGLMM Eq. 3.

Examples

if (FALSE) { # \dontrun{
library(ape)
tree <- rcoal(20); tree$tip.label <- paste0("sp", 1:20)
fit <- gllvmTMB(value ~ 0 + trait +
                  phylo_indep(0 + trait | species, tree = tree),
                data = df)
} # }