Skip to contents

Canonical name for the trait-specific unique-variance covstruct inside a gllvmTMB() formula. Formerly diag(0 + trait | g) – same engine, new name. The new name avoids the clash with base::diag(). The diag() keyword still works for backward compat but emits a one-shot deprecation warning per session.

Arguments

formula

0 + trait | g style formula.

common

FALSE (default) for trait-specific variances; TRUE for one shared variance across traits at this tier.

Value

A formula marker; never evaluated.

Details

Used inside a gllvmTMB() formula:

value ~ 0 + trait + latent(0 + trait | unit, d = 2) +
                    unique(0 + trait | unit)

This is a formula keyword – it's recognised by the parser inside a gllvmTMB() formula's RHS but is never evaluated as a function call. unique is not exported as an R function (because that would shadow base::unique()); the parser handles the symbol directly.

common = TRUE parsimony mode

For non-Gaussian fits or small-sample data where the trait-specific \(\sigma_S\) estimates are weakly identified, pass common = TRUE to fit a single shared \(\sigma_S\) across all traits at this tier (one parameter instead of T). Recovers the "compound symmetric" parsimony pattern – one variance, no per-trait flexibility. Default common = FALSE keeps the per-trait estimation.