NEWS  R Documentation 
glmmTMB News
CHANGES IN VERSION 1.1.10
NEW FEATURES
added random effect structure propto to fit multivariate random effects proportional to a known variancecovariance matrix. This feature is EXPERIMENTAL; please post any problems at https://github.com/glmmTMB/glmmTMB/pull/1068. See
vignette("covstruct")
added "nbinom12" family after Lindén and Mäntyniemi (2011)
random effects, including smooth terms with
s()
, can now be included in the dispersion model. This feature is EXPERIMENTAL; please post any problems to the issues listadded "skewnormal" family (@psmorris) (EXPERIMENTAL: some manual adjustment of starting values may be required)

predict()
now offerstype = "latent"
, which returns the values of the latent variables (with conditional standard deviations ifse.fit = TRUE
) now works with automatic parallelization based on the underlying TMBad autodiff library (specify
parallel=list(..., autopar=TRUE)
inglmmTMBControl
or setoptions(glmmTMB.autopar = TRUE)
)
USERVISIBLE CHANGES
the name of the vector of fixedeffect parameters for the dispersion model has changed from
betad
tobetadisp
; code that specifies parameter values (e.g. as part of astart
argument or innewparams
forsimulate_new
) may need to be adjusted. (For developers: There are similar name changes to other internal model components, e.g.Xd
becomesXdisp
.)
BUG FIXES
fixed bug in
simulate_new
forfamily = "beta_family"
simulation now works for models fitted with the (scaled) t distribution (GH #1024)

vcov
works better for cases wheremap
is used to fix sets of parameters equal to each other fix printing bug for zeroinflation covariance matrices (SO 78393784)

up2date
now works for models with mapped parameters (GH #874) 
ranef()
now works properly for reducedrank models Pearson residuals now work for models with nontrivial dispersion components (GH #1053)
bug fixes to
get_cor()
,put_cor()
utility functions
mgcv
smooths with no unpenalized components (e.g.s(..., bs = "sos")
) now work better calculation of
df.residual
whenREML=TRUE
(#1039)=
OTHER CHANGES
now imports random effect machinery from the
reformulas
package rather than fromlme4
CHANGES IN VERSION 1.1.9 (20240320)
USERVISIBLE CHANGES
the underlying parameterization of the dispersion for Gaussian models has changed from the variance to the standard deviation scale, with the following uservisible consequences:
results of fitting Gaussian models may change slightly, especially for unstable fits
stored model objects need to have their
betadisp
parameters halved for consistency: useup2date(..., adjust_gauss_disp = TRUE)
parameter estimates for dispersion components will change, e.g. from
fixef(.)$disp
orconfint()
for models with dispersion componentsany operations that directly handle dispersion parameters (e.g.
offset
terms for dispersion models) should be specified on the SD rather than the variance scale
interpretation of the weights variable for binomialtype GL(M)Ms has changed. Previously, the weights argument was ignored for a vector (rather than matrixvalued) numeric response, if all observations were either 0 or 1. Now the weights variable is multiplied by the resonse variable to compute the number of successes (consistently with
stats::glm(., family = "binomial")
). (This change makes it easier to use weights to specify the number of trials per observation forsimulate_new()
.)
simulate_new
gives useful warning and error messages about unrecognized parameter names and length mismatches (length mismatches previously gave only a warning)
NEW FEATURES
lognormalhurdle models now work (i.e., zero values can occur in the response if
ziformula
is specified)better checking for illegal (negative or noninteger) values in response variables
experimental support for priors: see
?priors
andvignette("priors", package = "glmmTMB")
BUG FIXES
predictions now work when
weights
variables have attributes (GH #977)
CHANGES IN VERSION 1.1.8 (20231007)
NEW FEATURES
"lognormal" family available (logNormal, parameterized by the mean and standard deviation on the data scale)
an experimental implementation of penalized splines (and related smooth terms) is available, based on
mgcv
. See the example usings
in?glmmTMB
. Constructive feedback welcome at https://github.com/glmmTMB/glmmTMB/issues/928populationlevel prediction with new data no longer requires that the variables involved in the random effects be explicitly specified as
NA
(GH #923, Russ Lenth)the
simulate
method now works for models fitted withfamily=ordbetareg
(GH #942, Daniel Lüdecke)deviance residuals are now available for some families (builtin families from base R (see
?family
) plusnbinom1
,nbinom2
); deviance residuals for other families may be implemented on request.setting
option(glmmTMB_openmp_debug=TRUE)
will produce debugging output about the number of OpenMP threads used
getME(., "b")
returns the vector of conditional modes (BLUPs, in the case of linear mixed models)
USERVISIBLE CHANGES
changes related to handling rankdeficient fits:
default value of
rank_check
inglmmTMBControl
changed to "adjust" (i.e., rankdeficient columns of fixedeffect model matrices are automatically dropped, with a message, by default)the
include_mapped
argument ofvcov
andconfint
is changed toinclude_nonest
, controlling both mapped parameters and those dropped due to rankdeficiency, and is nowTRUE
by default forvcov

model.matrix
now returns the fixedeffect model matrix actually used in fitting (including dropping columns for rankdeficiency)

glmmTMB
now accepts singlecolumn matrices (e.g. as produced byscale
as response variables (GH #937, @santoshbs)
CHANGES IN VERSION 1.1.7 (20230405)

up2date()
adds a dispersion component to family objects where required, for compatibility when checking stored fits across R versions
CHANGES IN VERSION 1.1.6 (20230319)
BUG FIXES
fix bug in diagnose for Tweedie, other models with 'psi' parameter (@nalimilan, GH #135)
NEW FEATURES
added a
doOptim
argument tofitTMB
, to return the constructed TMB object without fitting the parametersnew (experimental) function
simulate_new
, to simulate from a formula, list of parameters, and covariate data (rather than from a fitted object)
emmeans.glmmTMB
method adds two options for thecomponent
argument: "response" and "cmean", corresponding totype = "response"
andtype = "conditional"
inpredict.glmmTMB
(Russ Lenth) new covariance structure
homdiag
(homogeneous diagonal; the existing diagonal covariance structure,diag
, assumes heterogeneous variances)
USERVISIBLE CHANGES
The
emmeans
method for glmmTMB fits now returns infinite "df" (i.e., normal rather than tbased CIs and tests) for nonGaussian families, consistent withglm
and other packages (GH #893)
CHANGES IN VERSION 1.1.5 (20221116)
BUG FIXES
improve predicthandling of complex bases (GH #632, #845, #853)
all standard deviations are now printed in output for models using
cs()
(GH #851)corrected conditional and response predictions for truncated distributions (GH #634, #860, #873)

ranef()
now works correctly for families with extra parameters (Tweedie etc.) (GH #870)
USERVISIBLE CHANGES
glmmTMB has switched to using a different (newer, under active development) autodifferentiation library under the hood (from
CppAD
toTMBad
). This is likely to lead to small changes in estimates, including tipping marginally stable computations to instability or vice versa (e.g. presence or absence of convergence warnings, positivedefinite Hessian warnings,NaN
values of standard errors, etc.) You can revert to using the older autodiff engine by commenting out the linePKG_CPPFLAGS = DTMBAD_FRAMEWORK
insrc/Makevars
and reinstalling the package (make sure to delete .o/.so files from thesrc
directory first if installing from the package directory, as the Makefile doesn't recognize know that this change requires recompilation).glmmTMB now warns if fixedeffect model matrices are rank deficient (i.e., perfectly collinear predictors); this warning can be suppressed by setting
glmmTMBControl(rank_check="skip")
(rank_check = "stop"
will throw an error). Ifrank_check="adjust"
, glmmTMB will automatically drop appropriate columns from the model matrix (Daniel B. Stouffer)the vector of "extra" family parameters (Tweedie power, Studentt df, etc.) has been renamed from "thetaf" to "psi";
start
andmap
arguments that set this parameter will need to be changed. Users will need to runup2date()
when loading stored model objects from previous versions of the package.
predict
now warns if extra (ignored) arguments are provided in...
NEW FEATURES
Studentt response distribution is now implemented (see
t_family
)ordered beta regression as in Kubinec (2022), for proportion data containing exact 0 and 1 values, is now implemented (
ordbeta
)
glmmTMBControl
now has aconv_check
argument that allows suppressing convergence warnings (the intended use is when these warnings are irrelevant, e.g. when running small examples for testing purposes)
CHANGES IN VERSION 1.1.4 (20220712)
USERVISIBLE CHANGES
row names of
confint
output for random effects parameters have changed (new format isStd.Dev
. (term)  (grouping variable) for standard deviations,Cor
. (term1) . (term2)  (grouping variable) for correlations)
BUG FIXES

predict(., "zprob")
now returns 0 andpredict(., "zlink")
returnsInf
for all observations for models without zeroinflation (GH #798, Brenton Wiernik) [was previously supposed to throw an error, but incorrectly returned conditional values] bug fixes and other improvements for
diagnose
(inverted Zscore; now handles models without random effects)
confint
now works for models with more than one random effect 
confint
works better (although not completely) for models with mapped parameters
NEW FEATURES
now provides Pearson residuals for zeroinflated and variabledispersion models (Brenton Wiernik)
CHANGES IN VERSION 1.1.3 (20220313)
USERVISIBLE CHANGES
minor improvements in
diagnose()
BUG FIXES
offset variables with attributes now work properly (previously threw an error; now stripped before being passed to TMB)

emmeans
methods now work whencomponent
is nondefault (GH #780, @rvlenth/@marosteg) 
vcov(., full = TRUE)
is now named for models with multiple variance components
NEW FEATURES
implemented working residuals (
residuals(., type = "working")
; GH #776, @lionel68)new option
print_trivial
for theprint
method for fixed effects (fixef
objects); contributed by @dmorrison
CHANGES IN VERSION 1.1.2.3 (20210920)
USERVISIBLE CHANGES
Doublebar notation (
(x+yg)
) is now translated to a diagonalcovariance term (diag(x+yg)
) rather than being split into separate random effects terms as inlme4
. This should not change modeling results, but may change their presentation/ordering/etc.. (This is also a bug fix, as doublebar notation was not working in several previous versions.)
glmmTMB
now issues a warning when (1)$
is used within formulas or (2) thedata
argument is not specified (the latter warning can be suppressed by specifyingdata=NULL
).
NEW FEATURES
New (experimental) function
up2date
for updating storedglmmTMB
fits that were created with an earlier version ofTMB
than the one used whenglmmTMB
was compiled to binary/installed from sourceUtility functions
dtruncnbinom1
,dtruncnbinom2
,dtruncpoisson
for ktruncated count distributions
CHANGES IN VERSION 1.1.2.2 (20210901)
This is an administrative release (minor revisions for CRAN).
CHANGES IN VERSION 1.1.2 (20210720)
BUG FIXES
resolved OpenMP threadsafety issues on Windows
resolved bug that caused Tweedie models to crash on Solaris
resolved problems with vignettes on Solaris (GH #721)
USERVISIBLE CHANGES
improved control of OpenMP threading for prediction, profiling etc.
CHANGES IN VERSION 1.1.0 (20210624)
NEW FEATURES
reduced rank covariance for GLVMs implemented by M.McGillycuddy (see covstruct vignette for details)

diagnose
function to investigate potential causes of convergence problems improved parallel processing (GH #620 #652)
truncated nbinom2 family now includes a
variance
component
BUG FIXES

Anova
withtype="III"
now handlescomponent
argument correctly, more robust to trivial models fixed a typo/omission in the type3 Anova method that made zi Anova break in some conditions (GH #674)
fixed bugs/inconsistencies in handling of mapped parameters (GH #678)

confint
withparm="beta_"
orparm="theta_"
now work correctly with more complex models (e.g. including both zero inflation and random effects) (reported by @MKie45 on Stack Overflow) 
confint
works for singleparameter models and those with adispformula
(GH #622) mapped (fixed) variables could give incorrect predictions (GH #644)

simulate
is more robust for truncated_nbinom1 and truncated_nbinom2 (GH #572)
USERVISIBLE CHANGES
"mapped" parameters (i.e., fixed by user rather than optimized) are now given variances/standard deviations of NA rather than 0 in
vcov(., include_mapped=TRUE)
and by extension insummary
; hence Zstatistics and Pvalues will also be NA for these parametersrow ordering has changed in
confint
output data frames (random effects parameters come last, matching the row/column order invcov(., full=TRUE)
)new
fast
flag for predictions decreases memory use and computational time (only ifnewdata
,newparams
not specified); default infitted()
methodimproved robustness of betabinomial fits (results of fitting such models may change slightly from previous versions)
consistent predictions between link and inverselink (GH #696)
improved vignette titles
The
emm_basis
method forglmmTMB
objects now accepts a userspecified covariance matrix (vcov.
argument)
CHANGES IN VERSION 1.0.2.1 (20200702)
fix documentation links for CRAN checks
CHANGES IN VERSION 1.0.2 (unreleased)
USERVISIBLE CHANGES
the
refit()
function is now reexported (i.e., you no longer need to loadlme4
to use it)a
modelparm.glmmTMB
method is now provided (so thatmultcomp::glht
should work out of the box withglmmTMB
objects)
NEW FEATURES
new
sparseX
argument to specify sparse fixedeffect model matrices for one or more components
BUG FIXES

summary
and model printing now work ifcontrol=glmmTMBControl(optimizer=optim)
is used (GH #589) structured covariance models now work in zeroinflation components (GH #579)
documentation of formula for variance in beta family (GH #595)
CHANGES IN VERSION 1.0.1 (20200315)
updated for Rdevel changes (R 4.0.0 will set stringsAsFactors=FALSE by default)
CHANGES IN VERSION 1.0.0 (20200203)
The 1.0.0 release does not introduce any major changes or incompatibilities, but signifies that glmmTMB is considered stable and reliable for general use.
NEW FEATURES
new
map
argument toglmmTMB
allows for some parameter values to be fixed (see?TMB::MakeADFun
for details)new
optimizer
andoptArgs
arguments toglmmTMBControl
allow use of optimizers other thannlminb

predict
can make populationlevel predictions (i.e., setting all random effects to zero). See?predict.glmmTMB
for details. 
beta_family
now allows zeroinflation; newziGamma
family (minor modification ofstats::Gamma
) allows zeroinflation (i.e., Gammahurdle models)
BUG FIXES

vcov(., full=TRUE)
(and hence profiling) now work for models withdispformula=~0
Documentation fix: when
family=genpois
, the index of dispersion is known as phi^2.
Anova
now respects thecomponent
argument (GH #494, from @edsslim) 
predict
now works when contrasts are set on factors in original data (GH #439, from @cvoeten) 
bootMer
now works with models with Bernoulli responses (even thoughsimulate()
returns a twocolumn matrix in this case) (GH #529, @frousseu) better support for
emmeans
applied to zeroinflation or dispersion models (correct link functions) (Russ Lenth)
USERVISIBLE CHANGES

sigma(.)
now returnsNA
for models with nontrivial dispersion models (i.e. models with more than one dispersion parameter) (raised by GH #533, from @marektph) 
VarCorr
no longer prints residual variances for models withdispformula=~0
the
model.matrix()
andterms()
methods forglmmTMB
objects have been slightly modified
CHANGES IN VERSION 0.2.3 (20190111)
NEW FEATURES

ranef
now returns information about conditional variances (as attributes of the individual random effects terms) by default; this information can easily be retrieved byas.data.frame(ranef(.))
. 
coef
method now available: as inlme4
, returns sum of fixed + random effects for each randomeffects level. (Conditional variances forcoef
not yet available.) simulate works for models with genpois family
parametric bootstrapping should work, using
bootMer
from thelme4
package as a front end.
BUG FIXES
models with multiple types of RE (e.g. ar1 and us) may have failed previously (GH #329)

predict
was not handling datadependent predictors (e.g.poly
,spline
,scale
) correctly 
profile
now works for models without random effects
USERVISIBLE CHANGES
The value returned from
simulate
for binomial models is now a nonstandard data frame where each element contains a twocolumn matrix (as in the baseRsimulate
method for binomial GLMS).
CHANGES IN VERSION 0.2.2 (20180703)
NEW FEATURES
REML is now an option (GH #352). It is typically only for Gaussian response variables, but can also be useful for some nonGaussian response variables if used with caution (i.e. simulate a test case first).
USERVISIBLE CHANGES
Because family functions are now available for all families that have been implemented in the underlying TMB code, specifying the
family
argument as a raw list (rather than as a family function, the name of a family function, or the output of such a function) is now deprecated.
CHANGES IN VERSION 0.2.1 (20180511)
NEW FEATURES
likelihood profiles (via
profile
) and likelihood profile confidence intervals (viaconfint(profile(.))
) can now be computed;confint(fitted,method="profile")
andconfint(fitted,method="uniroot")
(find CIs by using a rootfinding algorithm on the likelihood profile)offsets are now allowed in the zeroinflation and dispersion formulas as well as in the main (conditionalmean) formula (if
offset
is specified as a separate argument, it applies only to the conditional mean)zerotruncated generalized Poisson
family=truncated_genpois
zerotruncated ConwayMaxwellPoisson
family=truncated_compois

predict
now allowstype
("link", "response", "conditional", "zprob", "zlink")
BUG FIXES
builtin
betar()
family for Beta regression fixed (and name changed tobeta_family()
) (GH #278)fixed segfault in predict method when response is specified as two columns (GH #289)
fixed summaryprinting bug when some random effects have covariance terms and others don't (GH #291)
fix bugs in binomial residuals and prediction (GH #307)
USERVISIBLE CHANGES
in
predict.glmmTMB
, thezitype
argument has been rolled into the newtype
argument: default prediction type is now "link" instead of "response", in order to matchglm()
default