
Package index
-
gllvmTMB() - Fit multivariate response models from wide or long data
-
traits() - Wide-format trait marker for the
gllvmTMB()formula LHS -
gllvmTMBcontrol() - Control parameters for
gllvmTMB() -
miss_control() - Missing-data control for
gllvmTMB() -
impute_model() - Predictor model for a missing covariate used inside
mi()
Core covariance keywords
Start with the ordinary decomposition, diagonal baseline, or full covariance before adding a relationship source. The grid has three modes; the one-shared-variance case is now indep(…, common = TRUE) (the soft-deprecated scalar() is under Deprecated below)
Advanced formula keywords and shorthands
First-class mode-dispatch wrappers; the bar form (e.g. phylo(0 + trait | species, mode = …)) is current, while the legacy bare-alias form is soft-deprecated. Public articles prefer the explicit core keywords
Relatedness and spatial helpers
Build relationship matrices, sparse precisions, meshes, and spatial diagnostics
-
pedigree_to_A() - Pedigree to additive-genetic relatedness matrix
A -
pedigree_to_Ainv_sparse() - Sparse pedigree inverse-A via Henderson-Quaas (MCMCglmm-free)
-
make_cross_kernel() - Build a cross-lineage relatedness kernel
-
profile_cross_rho() - Profile fixed cross-lineage rho values
-
profile_cross_rho_ci() - Profile sensitivity interval for the cross-lineage
rho -
diagnose_kernel_separability() - Diagnose fixed-kernel separability before fitting
-
make_mesh()plot(<sdmTMBmesh>) - Construct an SPDE mesh for gllvmTMB
-
add_utm_columns()get_crs() - Add UTM coordinates to a data frame
-
plot_anisotropy()plot_anisotropy2() - Plot anisotropy from a gllvmTMB model
Response families
Match response support and sampling process before adding covariance. Several exported compatibility constructors still stop explicitly rather than fitting an unsupported model; the response-family article states the current reader-facing boundary.
-
Beta()lognormal()gengamma()gamma_mix()lognormal_mix()nbinom2_mix()nbinom2()nbinom1()truncated_poisson()truncated_nbinom2()truncated_nbinom1()student()tweedie()censored_poisson()delta_gamma()delta_gamma_mix()delta_gengamma()delta_lognormal()delta_lognormal_mix()delta_truncated_nbinom2()delta_truncated_nbinom1()delta_poisson_link_gamma()delta_poisson_link_lognormal()betabinomial()delta_beta() - Additional families
-
ordinal_probit() - Ordinal-probit threshold family for the multivariate engine
-
multinomial() - Multinomial (baseline-category logit) family
Predictor-model families (modelled missing predictors)
Not response families: these tag the submodel for a categorical or ordered predictor in the modelled missing-predictor workflow (impute_model() / mi()), not a response distribution.
-
categorical() - Baseline-category softmax unordered categorical missing-predictor family
-
cumulative_logit() - Cumulative-logit ordered categorical missing-predictor family
Source-specific covariance keywords
Add a pedigree, phylogeny, spatial field, supplied kernel, or known-variance structure only when the study design requires it
-
animal_indep() - Independent per-trait animal-model random intercepts:
animal_indep(0 + trait | id) -
animal_dep() - Full unstructured animal-model trait covariance:
animal_dep(0 + trait | id) -
animal_latent() - Reduced-rank animal-model latent factors:
animal_latent(id, d = K) -
pedigree_to_A() - Pedigree to additive-genetic relatedness matrix
A -
pedigree_to_Ainv_sparse() - Sparse pedigree inverse-A via Henderson-Quaas (MCMCglmm-free)
-
phylo_indep() - Per-trait phylogenetic marginal variance:
phylo_indep(0 + trait | species) -
phylo_dep() - Full unstructured phylogenetic trait covariance:
phylo_dep(0 + trait | species) -
phylo_latent() - Reduced-rank phylogenetic latent factors:
phylo_latent(species, d = K) -
spatial_indep() - Per-trait spatial marginal field:
spatial_indep(0 + trait | coords) -
spatial_dep() - Full unstructured spatial trait covariance:
spatial_dep(0 + trait | coords) -
spatial_latent() - Reduced-rank spatial latent factors:
spatial_latent(0 + trait | coords, d = K) -
kernel_latent()kernel_indep()kernel_dep() - Generic dense-kernel covariance keywords
-
meta_V() - Known-V meta-analytic random effect (canonical name):
meta_V(V = V) -
block_V() - Build a block-diagonal sampling-variance matrix V
Report-ready extractors
Recover covariance, correlation, ordination, repeatability, communality, phylogenetic signal, and variance proportions
-
extract_Sigma() - Extract the implied trait covariance / correlation at one tier
-
extract_Gamma() - Extract a cross-lineage Gamma block
-
extract_coevolution_modules() - Extract cross-lineage coevolutionary modules
-
predict_cross_covariance() - Predict pair-specific cross-lineage covariance
-
extract_Sigma_table() - Extract a report-ready table of Sigma or correlation entries
-
compare_Sigma_table() - Compare fitted Sigma-table rows with a known truth matrix
-
extract_Omega() - Total trait covariance Omega summed across requested tiers
-
extract_communality() - Communality of each trait
-
extract_correlations() - Extract cross-trait correlations
-
extract_cross_correlations() - Cross-family correlations between a nominal (multinomial) trait and partners
-
extract_residual_cov()extract_residual_cor() - Implied trait covariance or correlation
-
extract_repeatability() - Per-trait repeatability with confidence intervals
-
extract_phylo_signal() - Phylogenetic-signal proportions per trait
-
extract_proportions() - Per-trait proportion-of-variance decomposition across all model components
-
extract_ordination() - Extract ordination scores and loadings from a fitted multivariate model
-
extract_loadings() - Extract the trait loading matrix
-
extract_lv_effects() - Predictor effects on latent-score means
-
extract_rotated_loadings_table() - Extract a tidy rotated loading table
-
extract_cutpoints() - Extract ordinal-probit cutpoints from a fitted gllvmTMB model
Methods and plots on fitted models
Standard summaries, predictions, simulations, confidence intervals, and current plotting entry point
-
print(<gllvmTMB_multi>)summary(<gllvmTMB_multi>)print(<summary.gllvmTMB_multi>)logLik(<gllvmTMB_multi>)nobs(<gllvmTMB_multi>) - Methods on a fitted gllvmTMB model
-
print(<gllvmTMB_Sigma_phy_slope>) - Print an augmented latent-slope Sigma extraction
-
confint(<gllvmTMB_multi>) - Confidence intervals for a fitted gllvmTMB model
-
tidy(<gllvmTMB_multi>) - Tidy a fitted gllvmTMB model
-
simulate(<gllvmTMB_multi>) - Simulate new responses from a fitted gllvmTMB model
-
predict(<gllvmTMB_multi>) - Predict from a fitted gllvmTMB model
-
predict_missing() - Predict the masked (missing) response cells of a gllvmTMB fit
-
imputed() - Extract fitted missing-predictor values from a
gllvmTMBfit -
phylo_signal_mi() - Phylogenetic-signal diagnostic for a modelled missing predictor
-
plot(<gllvmTMB_multi>) - Plot a fitted multivariate gllvmTMB model
-
plot_correlations() - Plot pairwise trait correlations with intervals
-
plot_Sigma_table() - Plot report-ready Sigma table rows
-
plot_Sigma_heatmap() - Plot Sigma-table rows as a trait-by-trait heatmap
-
plot_Sigma_comparison() - Plot Sigma-table estimates against a known truth matrix
First-line diagnostics and uncertainty
Start here before interpreting covariance, ordination, or interval estimates
-
screen_gllvmTMB() - Screen candidate responses before fitting a gllvmTMB model
-
screen_control() - Control pre-fit response screening
-
screen_table() - Extract tables from a pre-fit screen
-
check_gllvmTMB() - Check convergence, Hessian, gradients, and interval readiness
-
gllvmTMB_diagnose() - Diagnose a fitted model and suggest next actions
-
predictive_check() - Fitted-model predictive checks for a multivariate
gllvmTMBfit -
diagnostic_table() - Extract report-ready tables from diagnostic objects
-
residuals(<gllvmTMB_multi>) - Diagnostic residuals for a multivariate
gllvmTMBfit -
bootstrap_Sigma() - Bootstrap covariance, correlation, communality, and ICC summaries
-
confint_inspect() - Inspect profile confidence-interval shape for a fitted model
-
profile_phylo_signal() - Profile-likelihood curve(s) for per-trait phylogenetic signal
-
plot(<profile_derived>) - Plot a profile-derived LR curve
Advanced validation utilities
Slower diagnostics for investigating a fitted model; none is a calibration certificate
-
sanity_multi() - Print a quick convergence and parameter sanity report
-
check_auto_residual() - Check whether
link_residual = "auto"is coherent for this fit -
gllvmTMB_check_consistency() - Run an advanced Laplace-consistency check
-
compare_dep_vs_two_psi() - Canonical likelihood-based cross-check for the paired phylogenetic decomposition
-
compare_indep_vs_two_psi() - Cheap diagonal cross-check for the paired phylogenetic decomposition (large T)
-
profile_targets() - List profile-ready confidence-interval targets for a fitted model
-
tmbprofile_wrapper() - Profile-likelihood CI for one parameter or linear combination
Simulation helpers
Generate small stacked-trait fixtures for examples and known-data-generating checks
-
simulate_site_trait() - Simulate a functional-biogeography GLLVM dataset (sites × species × traits)
-
simulate_unit_trait() - Simulate a generic stacked-trait GLLVM dataset (units x observations x traits)
Loadings (Lambda) and confirmatory factor analysis
Extract, rotate, and constrain the loading matrix
-
rotate_loadings() - Rotate the loadings of a fitted multivariate model
-
plot_rotated_loadings() - Plot a rotated loading matrix
-
compare_loadings() - Compare two loading matrices after Procrustes alignment
-
suggest_lambda_constraint() - Suggest a
lambda_constraintmatrix for a reduced-rank fit -
suggest_lambda_constraints() - Compare several
lambda_constraintsuggestions -
confirmatory_lambda() - Build a confirmatory
lambda_constraintmatrix from group membership -
loading_ci() - Confidence intervals on individual entries of the loading matrix
-
loading_profile() - Profile-likelihood curve(s) for entries of the loading matrix
-
flag_unreliable_loadings() - Flag loadings whose CI overlaps a "biologically negligible" region
-
plot_loadings_confidence_eye() - Confidence Eye plot for per-species loading uncertainty
-
plot(<profile_loadings>) - Plot a profile_loadings object (LR U-shape per entry)
Profile-likelihood confidence intervals
Target-specific likelihood-profile routes and fallbacks; inspect each target and do not assume universal calibration
-
profile_ci_phylo_signal() - Profile-likelihood CI for per-trait phylogenetic signal H^2
Experimental Julia bridge
Optional point-estimation bridge; use only after reading the explicit method limitations, and do not assume R/TMB feature parity
-
gllvm_julia_fit() - Fit a GLLVM with the Julia engine (GLLVM.jl
bridge_fit). -
gllvm_julia_setup() - Set up JuliaCall and load the GLLVM.jl engine (once per R session).
-
logLik(<gllvmTMB_julia>)print(<gllvmTMB_julia>)coef(<gllvmTMB_julia>)predict(<gllvmTMB_julia>)fitted(<gllvmTMB_julia>)residuals(<gllvmTMB_julia>)simulate(<gllvmTMB_julia>)confint(<gllvmTMB_julia>)summary(<gllvmTMB_julia>)print(<summary.gllvmTMB_julia>) - Methods for Julia bridge fits
Deprecated covariance functions
Soft-deprecated as of 0.5.0; only the functions listed here are deprecated, and the broader animal, phylogenetic, spatial, and kernel APIs remain current. The scalar family (one shared variance) is now indep(…, common = TRUE); the *_unique diagonal companion folds into latent(); the standalone slope keywords are superseded by the reduced-rank latent / indep / dep slope forms. Existing calls keep working and warn once per session.
-
scalar() - One shared trait variance:
scalar(0 + trait | g) -
animal_scalar() - Single-shared-variance animal-model random effect:
animal_scalar(id) -
phylo_scalar() - Single-shared-variance phylogenetic random effect:
phylo_scalar(species) -
spatial_scalar() - One shared spatial-field variance across traits:
spatial_scalar(0 + trait | coords) -
kernel_scalar() - Dense-kernel one-shared-variance covariance:
kernel_scalar() -
unique_keyworduniquedeprecated - Trait-specific unique variance:
unique(0 + trait | g) -
animal_unique()deprecated - Per-trait independent animal-model random intercepts:
animal_unique(id) -
phylo_unique()deprecated - Per-trait independent phylogenetic random intercepts:
phylo_unique(species) -
spatial_unique()deprecated - Per-trait independent spatial random fields:
spatial_unique(0 + trait | coords) -
kernel_unique()deprecated - Deprecated alias:
kernel_unique() -
animal_slope() - Animal-model random slope on a continuous covariate
-
phylo_slope() - Phylogenetic random slope on a continuous covariate
Deprecated and compatibility aliases
Soft-deprecated spellings and gllvm-style accessors retained for migration; new code should prefer the canonical keywords and extract_*() functions
-
gr() - Generic group-with-known-covariance random effect (brms-style)
-
meta() - Known sampling-error term (brms-style, deprecated alias)
-
meta_known_V() - Known-V meta-analytic random effect (deprecated alias):
meta_known_V(V = V) -
phylo_rr() - Reduced-rank phylogenetic random effect (PGLLVM)
-
spde() - Spatial reduced-rank Gaussian random field per trait (Matérn, SPDE/GMRF)
-
gllvmTMB_wide() - Fit a GLLVM from a wide unit × trait matrix
-
extract_Sigma_B() - Between-site covariance matrix Sigma_B (backward-compat wrapper)
-
extract_Sigma_W() - Within-site covariance matrix Sigma_W (backward-compat wrapper)
-
extract_ICC_site() - Site / individual-level ICC per trait
-
extract_residual_split() - Separate OLRE residual variance from the distribution-specific latent residual
-
VP() - Variance partition by source
-
Beta()lognormal()gengamma()gamma_mix()lognormal_mix()nbinom2_mix()nbinom2()nbinom1()truncated_poisson()truncated_nbinom2()truncated_nbinom1()student()tweedie()censored_poisson()delta_gamma()delta_gamma_mix()delta_gengamma()delta_lognormal()delta_lognormal_mix()delta_truncated_nbinom2()delta_truncated_nbinom1()delta_poisson_link_gamma()delta_poisson_link_lognormal()betabinomial()delta_beta() - Additional families
-
getLV() - Extract latent-variable scores from a fitted multivariate model
-
getLoadings() - Extract the loading matrix from a fitted multivariate model
-
getResidualCov()getResidualCor() - Extract implied trait covariance or correlation
-
ordiplot() - Draw a two-axis ordination plot for a fitted multivariate model