Skip to content

sdmTMB 1.1.0

Latest

Choose a tag to compare

@seananderson seananderson released this 04 Jul 00:57

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 new nonlocal_formula and nonlocal_data arguments.
    plot_nonlocal_kernel() and plot_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() gains allow_new_levels for 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,
    including logit and cloglog links, to use area as an explicit
    standardization multiplier for expected-count indices.

  • get_index() gains derived_link to 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() and tidy() now display the correctly transformed correlation
    between a random slope and intercept.

  • sdmTMB() now uses tryCatch() 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() and delta_poisson_link_lognormal() now raise
    deprecation errors instead of warnings. Use
    delta_gamma(type = "poisson-link") and
    delta_lognormal(type = "poisson-link") instead.

  • spatial_varying now respects its own model matrix. The (Intercept) column
    is only dropped when spatial = "on", in which case the ordinary spatial
    field omega_s is 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 for spatial = "off", spatial_varying = ~ 1 + factor: this previously
    stripped the intercept and zeroed omega_s, leaving only K - 1 deviation
    fields with no reference field. It now fits a genuine SVC intercept field
    plus K - 1 deviation fields. A warning is
    emitted for this specification for now.

    The previous message suggesting spatial = "off" when using
    spatial = "on", spatial_varying = ~ 0 + factor_var has 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 correct se_natural column
    (@CataRoman, @gavinfay, #523).

  • residuals() now uses the correct inverse link for encounter and
    positive-component mechanisms, including offsets, in Poisson-link delta
    models, avoiding spurious NaN and Inf values 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 when newdata contains NA in the response
    column for models with random effects and the response column is present but
    unused for prediction (#508).