drmTMB: Distributional Regression Models Using Template Model Builder

Fast distributional regression models for univariate and bivariate responses using Template Model Builder. The current implementation focuses on Gaussian, Student-t, and skew-normal location-scale models, known sampling covariance, phylogenetic location effects, random-effect scale models, bivariate residual correlation, positive-continuous, 'Tweedie' semi-continuous, strict-proportion, zero-one bounded, and denominator-aware proportion families, fixed-effect Bernoulli/binomial event-probability models, and fixed-effect Poisson, negative-binomial, zero-inflated, zero-truncated, hurdle count, and ordinal cumulative-logit models. Additional response-family models are staged for later phases. Every fitted family also exposes a distributional-output and adequacy layer: randomized quantile-residual worm and QQ plots that detect fixed-effect shape and atom misspecification, and conditional-quantile, exceedance, and centile outputs with plug-in (uncalibrated) intervals.

Version: 0.7.0
Depends: R (≥ 4.1.0)
Imports: cli, lifecycle, Matrix (≥ 1.6.0), methods, stats, TMB (≥ 1.9.6), utils
LinkingTo: RcppEigen, TMB
Suggests: ape, callr, detectseparation (≥ 0.4.0), emmeans, extraDistr, fmesher, glmmTMB, ggplot2, JuliaCall, knitr, lme4, MASS, metadat, metafor, mvtnorm, nlme, numDeriv, ordinal, palmerpenguins, pkgload, rmarkdown, sf, spelling, statmod, testthat (≥ 3.0.0), tweedie, withr
Published: 2026-09-15
DOI: 10.32614/CRAN.package.drmTMB (may not be active yet)
Author: Shinichi Nakagawa ORCID iD [aut, cre, cph]
Maintainer: Shinichi Nakagawa <itchyshin at gmail.com>
BugReports: https://github.com/itchyshin/drmTMB/issues
License: GPL (≥ 3)
Copyright: see file COPYRIGHTS
URL: https://itchyshin.github.io/drmTMB/, https://github.com/itchyshin/drmTMB
NeedsCompilation: yes
Language: en-GB
Citation: drmTMB citation info
Materials: README, NEWS
CRAN checks: drmTMB results

Documentation:

Reference manual: drmTMB.html , drmTMB.pdf
Vignettes: Adding distribution families (source, R code)
Animal models and additive relatedness (source, R code)
Two-tree phylogenetic interactions (source, R code)
Changing residual coupling with rho12 (source, R code)
Bivariate non-Gaussian models: choose a joint or staged association (source, R code)
Can I fit and report this model? (source, R code)
Comparing drmTMB with other packages (source, R code)
Errors, warnings, and convergence (source, R code)
Count abundance and extra zeros (source, R code)
Association between mixed outcome pairs (source, R code)
Choosing response families (source, R code)
Distributional regression with drmTMB (source, R code)
First-week intervals: fit, profile, and boundary (source, R code)
Formula grammar (source, R code)
Implementation map (source, R code)
Julia engine: future support (source, R code)
Working with large data (source, R code)
When variance carries signal, Part 2: location-scale-scale models (source, R code)
When variance carries signal, Part 1: location-scale models (source, R code)
Random-effects meta-analysis with known sampling variances (source, R code)
Handling missing data (source, R code)
What can I fit today? (source, R code)
Model selection with AIC and BIC (source, R code)
Phylogenetic mixed models (source, R code)
Proportions and success rates (source, R code)
Known-matrix relatedness with relmat (source, R code)
Robust continuous responses (source, R code)
Implemented source map (source, R code)
Coordinate-spatial structured effects (source, R code)
Structural dependence overview (source, R code)
Testing likelihoods (source, R code)
Which scale are you modelling? (source, R code)

Downloads:

Package source: drmTMB_0.7.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): drmTMB_0.7.0.tgz, r-release (x86_64): drmTMB_0.7.0.tgz, r-oldrel (x86_64): drmTMB_0.7.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=drmTMB to link to this page.