New features
-
sdmTMB()gains experimental support for CAR/SAR areal models as an
alternative to the SPDE. See the relevant vignette at
https://sdmtmb.github.io/sdmTMB/articles/index.html -
sdmTMB()gains non-local covariate support, including spatial diffusion and
time lags, with newnonlocal_formulaandnonlocal_dataarguments.
plot_nonlocal_kernel()andplot_nonlocal_covariate()support visualizing
the resulting kernels and covariates (#507). See the relevant vignette at
https://sdmtmb.github.io/sdmTMB/articles/index.html -
sdmTMB()now supports uncorrelated random slopes and intercepts with the
form(1 + slope_var || group), and reports the results correctly.
(@Joseph-Barss, #536). -
predict.sdmTMB()gainsallow_new_levelsfor prediction with new random
intercept or slope levels; new levels use the population value (#196, #480). -
get_index()now reports index totals on a log-total scale after integrating
response-scale predictions. This preserves existing behaviour for log-link
abundance models and allows binomial and beta-binomial proportion models,
includinglogitandclogloglinks, to useareaas an explicit
standardization multiplier for expected-count indices. -
get_index()gainsderived_linkto override the inverse link, which is
useful when fitting Bernoulli data with a cloglog link and predicting an
expected count from a thinned count process (#339). -
sdmTMB()gains experimental Restricted Spatial Regression (RSR) fixed
effects adjusted for spatial confounding with the random fields (Hanks et al.
2015; Diaz and Thorson 2025). Use
control = sdmTMBcontrol(get_rsr = TRUE)and
tidy(fit, effects = "rsr").
Minor improvements and fixes
-
Fix compatibility with next RcppEigen (#538).
-
print()andtidy()now display the correctly transformed correlation
between a random slope and intercept. -
sdmTMB()now usestryCatch()around Newton loops in optimization so those
steps abort cleanly instead of producing an error. -
predict.sdmTMB()now allows missing factor levels when predicting with
time-varying factor predictors (#533). -
sanity()now identifies the fixed effects, providing more useful
diagnostics (#506). -
delta_poisson_link_gamma()anddelta_poisson_link_lognormal()now raise
deprecation errors instead of warnings. Use
delta_gamma(type = "poisson-link")and
delta_lognormal(type = "poisson-link")instead. -
spatial_varyingnow respects its own model matrix. The(Intercept)column
is only dropped whenspatial = "on", in which case the ordinary spatial
fieldomega_sis used as the SVC intercept or reference-level field.A single informational message is issued at fit time, suppressible via
silent = TRUE.The only material change in fitted-model structure versus published releases
is forspatial = "off", spatial_varying = ~ 1 + factor: this previously
stripped the intercept and zeroedomega_s, leaving onlyK - 1deviation
fields with no reference field. It now fits a genuine SVC intercept field
plusK - 1deviation fields. A warning is
emitted for this specification for now.The previous message suggesting
spatial = "off"when using
spatial = "on", spatial_varying = ~ 0 + factor_varhas been removed; this
is a valid model specification (global spatial field plus per-level SVC
deviations) although it can be more challenging to estimate. -
get_index()now returns the correctse_naturalcolumn
(@CataRoman, @gavinfay, #523). -
residuals()now uses the correct inverse link for encounter and
positive-component mechanisms, including offsets, in Poisson-link delta
models, avoiding spuriousNaNandInfvalues in the first linear
predictor residuals. For most scenarios, simulation-based residuals from
dharma_residuals()remain the most straightforward choice for combined
residuals in delta models (#512). -
predict.sdmTMB()now works whennewdatacontainsNAin the response
column for models with random effects and the response column is present but
unused for prediction (#508).