Skip to content

Package ​

Start here

DRModels is the package module. For fitting choices, begin with What can I fit today?; for runnable syntax, use Getting started. This page documents the module overview rather than making a package-wide performance claim.

DRModels Module
julia
DRModels

DRModels.jl — a Julia engine for distributional regression models, the Julia twin of the R package drmTMB. Mirrors the gllvmTMB → GLLVModels.jl move.

The package covers univariate and bivariate distributional regression across some twenty response families, with random, phylogenetic, spatial, pedigree and supplied-matrix structure. Its origin is the q=4 phylogenetic bivariate location–scale model (PLSM) — the selling-point model of drmTMB (Nakagawa et al. 2025 MEE, Model 5). That marginal is a sparse augmented-state Laplace approximation with an exact O(p) gradient (implicit-function / TMB-style, via Takahashi selected inverse — never forms a dense p×p Σ_phy), optimised by LBFGS with a fast-path-then-robust mode-finder.

For what is implemented and how far each route is tested, see the capability matrix in the documentation. Measured comparisons against drmTMB include their run conditions in report/comparison-grid.md; they are specific to the model and data measured and are deliberately not quoted as package-wide figures here.

The engine retains the proof-of-concept's script-style organisation. Inference provides Wald, profile, and parametric-bootstrap intervals. Public: opt-in REML (drm(method = :REML); its restricted correction covers all four among-axis axes) and the conjugate-EM Gaussian phylo-mean solver (algorithm = :em). A natural-gradient EM implementation failed the required likelihood-parity check on q4_p100, so algorithm = :natgrad is not exposed; the reusable Fisher metric is retained as engine infrastructure. Experimental prototypes are not wired: SQUAREM EM, trust-region and line-search E-steps, dense q=4 EM, and warm-start variants. Do not treat them as the public REML or :em surface.

source