Learn R Programming

glmmTMB (version 1.1.15.2)

Generalized Linear Mixed Models using Template Model Builder

Description

Fit linear and generalized linear mixed models with various extensions, including zero-inflation. The models are fitted using maximum likelihood estimation via 'TMB' (Template Model Builder). Random effects are assumed to be Gaussian on the scale of the linear predictor and are integrated out using the Laplace approximation. Gradients are calculated using automatic differentiation.

Copy Link

Version

Install

install.packages('glmmTMB')

Monthly Downloads

47,539

Version

1.1.15.2

License

AGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Mollie Brooks

Last Published

September 29th, 2026

Functions in glmmTMB (1.1.15.2)

getGroups.glmmTMB

Extract Grouping Factors from an Object
getCapabilities

List model options that glmmTMB knows about
formula.glmmTMB

Extract the formula of a glmmTMB object
nbinom2

Family functions for glmmTMB
fixef

Extract fixed-effects estimates
glmmTMB

Fit Models with TMB
get_cor

transform correlation parameters to and from glmmTMB parameterization
glmmTMBControl

Control parameters for glmmTMB optimization
get_autopar

retrieve current value of TMB autopar setting
mkTMBStruc

Extract info from formulas, reTrms, etc., format for TMB
getReStruc

Calculate random effect structure Calculates number of random effects, number of parameters, block size and number of blocks. Mostly for internal use.
getXReTrms

Create X and random effect terms from formula
estfun.glmmTMB

Extract Empirical Estimating Functions
family_params

Retrieve family-specific parameters
fitTMB

Optimize TMB models and package results, modularly
map.theta.propto

Set map values for theta to be fixed (NA) for propto
meatHC

Simple Cluster Based Meat Matrix Estimator
priors

use of priors in glmmTMB
reexports

Objects exported from other packages
ranef.glmmTMB

Extract Random Effects
profile.glmmTMB

Compute likelihood profiles for a fitted model
sandwich

Sandwich Estimator based on Bread and Meat Matrices
reinstalling

Reinstalling binary dependencies
simulate_new

Simulate from covariate/metadata in the absence of a real data set (EXPERIMENTAL)
set_simcodes

helper function to modify simulation settings for random effects
sigma.glmmTMB

Extract residual standard deviation or dispersion parameter
print.VarCorr.glmmTMB

Printing The Variance and Correlation Parameters of a glmmTMB
predict.glmmTMB

prediction
residuals.glmmTMB

Compute residuals for a glmmTMB object
simulate.glmmTMB

Simulate from a glmmTMB fitted model
getME.glmmTMB

Extract or Get Generalize Components from a Fitted Mixed Effects Model
terms.glmmTMB

Methods for extracting developer-level information from glmmTMB models
getGrpVar

Get Grouping Variable
up2date

conditionally update glmmTMB object fitted with an old TMB version
vcovHC.glmmTMB

Cluster Robust Variance-Covariance Matrix Estimator
summary.glmmTMB

summary for glmmTMB fits
weights.glmmTMB

Extract weights from a glmmTMB object
startParams

Change starting parameters, either by residual method or by user input (start)
useRTMB

switch to using RTMB
omp_check

Check OpenMP status
vcov.glmmTMB

Calculate Variance-Covariance Matrix for a Fitted glmmTMB model
numFactor

Factor with numeric interpretable levels.
spider_long

Spider data from CANOCO, long format
VarCorr.glmmTMB

Extract variance and correlation components
as.theta.vcov

Get theta parameterisation of a covariance structure
anova.glmmTMB

anova method for glmmTMB fits, comparing two or more nested models
bread.glmmTMB

Bread Matrix for Sandwich Estimator
dtruncated_nbinom2

truncated distributions
Anova.glmmTMB

Downstream methods
dof_KR

compute denominator degrees-of-freedom approximations
diagnose

diagnose model problems
isLMM.glmmTMB

support methods for parametric bootstrapping
confint.glmmTMB

Calculate confidence intervals
dgenpois

The Generalized Poisson Distribution
Salamanders

Repeated counts of salamanders in streams
.adjustX

Adjust a model matrix When not rank deficient, do nothing. When rank deficient matrix, drop columns.
dcombinom

The Conway-Maxwell-Binomial Distribution
Owls

Begging by Owl Nestlings
.checkRankX

Check for identifiability of fixed effects matrices X, Xzi, Xdisp. When rank_check='adjust', drop columns in X and remove associated parameters.
dbell

The Bell Distribution
epil2

Seizure Counts for Epileptics - Extended
.collectDuplicates

collapse duplicated observations