Skip to contents

Model Guides

Function map and cheat sheet

Find the documented function for preparing, fitting, checking, interpreting, or reporting a stacked-trait GLLVM.

Individual morphometrics: the simplest GLLVM

Use when continuous traits are measured once per individual; fit a Gaussian latent covariance and compare it with known simulation truth.

Behavioural syndromes in repeated measurements

Use repeated Gaussian behaviours to separate stable between-individual covariance from within-occasion covariance and point repeatability.

Behavioural reaction norms with random slopes

Use repeated Gaussian behaviours across an observed environment to estimate individual intercept-slope covariance and trait-specific reaction norms.

How many latent dimensions should I fit?

Compare predeclared Gaussian latent ranks with ML information criteria and fit-health checks, then refit the selected covariance model deliberately.

Joint species distribution models for binary occurrence data

Fit a binary latent-factor JSDM in long or wide form and interpret residual species co-occurrence on a declared liability scale.

Phylogenetic covariance among traits

Use replicated Gaussian species traits and a supplied tree to estimate phylogenetically structured covariance with explicit label and health checks.

Handling missing data

Choose among omitted, retained, or explicitly modelled missing values and verify how each choice changes the estimand and fitted rows.

Concepts

gllvmTMB vocabulary

Look up the model terms, covariance pieces, grouping tiers, identifiability concepts, and uncertainty language used across the guides.

Covariance and correlation: the model behind Sigma

Use as a technical reference for Sigma, Lambda, Psi, liability-scale residual conventions, and the limits of covariance comparisons.

Cross-family trait correlations, including nominal responses

Fit the partially-validated ordinary-unit cross-family route, recover latent correlations across five response families, and compute the reference-invariant nominal summary on its admitted non-ordinal partner set.

Formula keyword grid

Choose a correlation source and covariance mode, then translate the intended model into matching long and traits(…) wide formulas.

Response-specific predictor effects

Specify which predictors affect which responses, including intentional zero coefficients, without confusing fixed-effect structure with covariance constraints.

Choose a response family

Match the response support and sampling process to a family before adding multivariate covariance, and stop at the documented specialist boundaries.

Unordered categories with multinomial()

Model an unordered categorical response as baseline-category log-odds, read its fixed-effect contrasts and probabilities, and distinguish the covered core from two partial covariance routes.

Diagnostics and validation

Screen binary traits before fitting

Check prevalence, sparse outcomes, duplicated cells, and usable denominators before fitting a binary multivariate model.

Can I trust this fit?

Inspect optimiser, gradient, Hessian, residual, and fitted-model predictive signals before interpreting covariance or uncertainty.

Convergence and hard fits

Diagnose a numerically difficult fit and compare start or optimiser strategies without turning a small criterion into a validity certificate.

Profile likelihood: routes and fallbacks

Choose and inspect target-specific profile, Wald, or bootstrap routes while keeping returned bounds separate from coverage claims.

Common pitfalls and how to avoid them

Troubleshoot six common data, formula, covariance, and interpretation mistakes with concrete long-format checks and examples.