Partitions the link-scale variance of a fitted sdmTMB model among its
random components using sdmTMB::tidy(), and plots the proportion of that
variance from each. This is an approximate, descriptive summary, not a
formal variance decomposition.
Arguments
- fit
A fitted
sdmTMB::sdmTMB()model.- base_size
Numeric. Base font size. Default
11.
Details
Included are the components with a variance on the link scale:
the spatial field (
sigma_O) and spatiotemporal field (sigma_E);random intercepts (
sd__(Intercept), one per grouping factor);the observation-level variance on the link scale, where the family has one that does not depend on the mean (Nakagawa et al. 2017, doi:10.1098/rsif.2017.0213 ):
phi^2for agaussian()family with an identity link and forlognormal();trigamma(phi)forGamma()with a log link (phiis the shape);pi^2 / 3for abinomial()with a logit link; andpi^2 / 6for a complementary log-log link, which includes the first component of a Poisson-link delta model (type = "poisson-link"), whose encounter probability is1 - exp(-exp(eta)).
Left out are the observation-level variances that depend on the mean (e.g.
Tweedie, Poisson, NB2), smooth-term SDs (sd__s(...), the SD of penalised
spline coefficients, not of the fitted smooth) and spatially varying
coefficient SDs (sigma_Z, whose contribution scales with the covariate).
The proportions are therefore of the variance of the included components
only. For delta models, each component is partitioned on its own link scale.
AI assistance
AI-assisted (model not recorded); not yet reviewed in full by the current model. Edited by Claude Opus 5.5 (Anthropic), 2026-11-24.
