NEWS | R Documentation |
predict(., "zprob")
now returns 0 and
predict(., "zlink")
returns -Inf
for all observations
for models without zero-inflation (GH #798, Brenton Wiernik) [was
previously supposed to throw an error, but incorrectly returned
conditional values]
bug fixes and other improvements for diagnose
(inverted Z-score; now handles
models without random effects)
now provides Pearson residuals for zero-inflated and variable-dispersion models (Brenton Wiernik)
minor improvements in diagnose()
offset variables with attributes now work properly (previously threw an error; now stripped before being passed to TMB)
emmeans
methods now work when component
is non-default (GH #780, @rvlenth/@marosteg)
vcov(., full = TRUE)
is now named for models with
multiple variance components
implemented working residuals (residuals(., type =
"working")
; GH #776, @lionel68)
new option print_trivial
for the print
method
for fixed effects (fixef
objects); contributed by @d-morrison
Double-bar notation ((x+y||g)
) is now translated to a
diagonal-covariance term (diag(x+y|g)
) rather than being split
into separate random effects terms as in lme4
. This should not
change modeling results, but may change their
presentation/ordering/etc.. (This is also a bug fix, as double-bar
notation was not working in several previous versions.)
glmmTMB
now issues a warning when (1) $
is used
within formulas or (2) the data
argument is not specified (the
latter warning can be suppressed by specifying
data=NULL
).
New (experimental) function up2date
for updating
stored glmmTMB
fits that were created with an earlier
version of TMB
than the one used when glmmTMB
was
compiled to binary/installed from source
Utility functions dtruncnbinom1
,
dtruncnbinom2
, dtruncpoisson
for k-truncated
count distributions
This is an administrative release (minor revisions for CRAN).
resolved OpenMP thread-safety issues on Windows
resolved bug that caused Tweedie models to crash on Solaris
resolved problems with vignettes on Solaris (GH #721)
improved control of OpenMP threading for prediction, profiling etc.
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
Anova
with type="III"
now handles
component
argument correctly, more robust to trivial models
fixed a typo/omission in the type-3 Anova method that made zi Anova break in some conditions (GH #674)
fixed bugs/inconsistencies in handling of mapped parameters (GH #678)
confint
with parm="beta_"
or
parm="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 single-parameter models and those
with a dispformula
(GH #622)
mapped (fixed) variables could give incorrect predictions (GH #644)
simulate
is more robust for truncated_nbinom1 and
truncated_nbinom2 (GH #572)
"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 in
summary
; hence Z-statistics and P-values will also be NA for
these parameters
row ordering has changed in confint
output data
frames (random effects parameters come last, matching the
row/column order in vcov(., full=TRUE)
)
new fast
flag for predictions decreases memory use
and computational time (only if newdata
, newparams
not specified); default in fitted()
method
improved robustness of beta-binomial fits (results of fitting such models may change slightly from previous versions)
consistent predictions between link and inverse-link (GH #696)
improved vignette titles
The emm_basis
method for glmmTMB
objects now accepts a user-specified covariance matrix (vcov.
argument)
fix documentation links for CRAN checks
the refit()
function is now re-exported (i.e., you no
longer need to load lme4
to use it)
a modelparm.glmmTMB
method is now provided (so that
multcomp::glht
should work out of the box with
glmmTMB
objects)
new sparseX
argument to specify sparse fixed-effect
model matrices for one or more components
summary
and model printing now work if
control=glmmTMBControl(optimizer=optim)
is used (GH #589)
structured covariance models now work in zero-inflation components (GH #579)
documentation of formula for variance in beta family (GH #595)
updated for R-devel changes (R 4.0.0 will set stringsAsFactors=FALSE by default)
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 map
argument to glmmTMB
allows for some
parameter values to be fixed
(see ?TMB::MakeADFun
for details)
new optimizer
and
optArgs
arguments to glmmTMBControl
allow use of
optimizers other than nlminb
predict
can make population-level predictions
(i.e., setting all random effects to zero).
See ?predict.glmmTMB
for details.
beta_family
now allows zero-inflation;
new ziGamma
family (minor modification of
stats::Gamma
) allows zero-inflation
(i.e., Gamma-hurdle models)
vcov(., full=TRUE)
(and hence profiling) now work for models with dispformula=~0
Documentation fix: when family=genpois
, the
index of dispersion is known as phi^2.
Anova
now respects the component
argument (GH
#494, from @eds-slim)
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 though simulate()
returns a two-column
matrix in this case) (GH #529, @frousseu)
better support for emmeans
applied to zero-inflation
or dispersion models (correct link functions) (Russ Lenth)
sigma(.)
now returns NA
for models with
non-trivial dispersion models (i.e. models with more than one
dispersion parameter) (raised by GH #533, from @marek-tph)
VarCorr
no longer prints residual variances for
models with dispformula=~0
the model.matrix()
and terms()
methods
for glmmTMB
objects have been slightly modified
ranef
now returns information about conditional variances (as
attributes of the individual random effects terms) by default;
this information can easily be retrieved by
as.data.frame(ranef(.))
.
coef
method now available: as in lme4
, returns
sum of fixed + random effects for each random-effects
level. (Conditional variances for coef
not yet available.)
simulate works for models with genpois family
parametric bootstrapping should work, using
bootMer
from the lme4
package as a front end.
models with multiple types of RE (e.g. ar1 and us) may have failed previously (GH #329)
predict
was not handling data-dependent predictors (e.g. poly
, spline
, scale
) correctly
profile
now works for models without random effects
The value returned from simulate
for binomial models
is now a non-standard data frame where each element contains a
two-column matrix (as in the base-R simulate
method for
binomial GLMS).
REML is now an option (GH #352). It is typically only for Gaussian response variables, but can also be useful for some non-Gaussian response variables if used with caution (i.e. simulate a test case first).
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.
likelihood profiles (via profile
) and likelihood
profile confidence intervals (via confint(profile(.))
)
can now be computed;
confint(fitted,method="profile")
and
confint(fitted,method="uniroot")
(find CIs by using
a root-finding algorithm on the likelihood profile)
offsets are now allowed in the zero-inflation and dispersion
formulas as well as in the main (conditional-mean) formula
(if offset
is specified as a separate argument, it applies
only to the conditional mean)
zero-truncated generalized Poisson family=truncated_genpois
zero-truncated Conway-Maxwell-Poisson
family=truncated_compois
predict
now allows type
("link", "response",
"conditional", "zprob", "zlink")
built-in betar()
family for Beta regression fixed
(and name changed to beta_family()
) (GH #278)
fixed segfault in predict method when response is specified as two columns (GH #289)
fixed summary-printing bug when some random effects have covariance terms and others don't (GH #291)
fix bugs in binomial residuals and prediction (GH #307)
in predict.glmmTMB
,
the zitype
argument has been rolled into the new
type
argument: default prediction type is now
"link" instead of "response", in order to match glm()
default