Skip to content

Commit 96d7605

Browse files
Merge pull request #295 from florianhartig/0.4.4-reintroduceGLMMTMB
0.4.4 reintroduce glmmtmb
2 parents 7a08736 + 6e9ef40 commit 96d7605

13 files changed

+61
-52
lines changed

DHARMa/DESCRIPTION

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Package: DHARMa
22
Title: Residual Diagnostics for Hierarchical (Multi-Level / Mixed) Regression Models
3-
Version: 0.4.3
3+
Version: 0.4.3.1
44
Date: 2021-07-06
55
Authors@R: c(person("Florian", "Hartig", email = "florian.hartig@biologie.uni-regensburg.de", role = c("aut", "cre"), comment=c(ORCID="0000-0002-6255-9059")), person("Lukas", "Lohse", role = "ctb"))
66
Description: The 'DHARMa' package uses a simulation-based approach to create
77
readily interpretable scaled (quantile) residuals for fitted (generalized) linear mixed
88
models. Currently supported are linear and generalized linear (mixed) models from 'lme4'
9-
(classes 'lmerMod', 'glmerMod'), 'glmmTMB' 'GLMMadaptive' and 'spaMM', generalized additive models
10-
('gam' from 'mgcv'), 'glm' (including 'negbin' from 'MASS', but excluding quasi-distributions) and
9+
(classes 'lmerMod', 'glmerMod'), 'glmmTMB' 'GLMMadaptive' and 'spaMM', generalized additive models
10+
('gam' from 'mgcv'), 'glm' (including 'negbin' from 'MASS', but excluding quasi-distributions) and
1111
'lm' model classes. Moreover, externally created simulations, e.g. posterior predictive simulations
1212
from Bayesian software such as 'JAGS', 'STAN', or 'BUGS' can be processed as well.
1313
The resulting residuals are standardized to values between 0 and 1 and can be interpreted
@@ -36,15 +36,16 @@ Suggests:
3636
KernSmooth,
3737
sfsmisc,
3838
MASS,
39-
glmmTMB (>= 1.0.1),
40-
mgcv,
39+
mgcv,
4140
spaMM (>= 3.2.0),
42-
GLMMadaptive
41+
GLMMadaptive,
42+
phyr,
43+
glmmTMB (>= 1.0.1)
4344
License: GPL (>= 3)
4445
URL: http://florianhartig.github.io/DHARMa/
4546
LazyData: TRUE
4647
BugReports: https://github.com/florianhartig/DHARMa/issues
4748
RoxygenNote: 7.1.1
48-
Roxygen: list(old_usage = TRUE)
49+
Roxygen: list(old_usage = TRUE, markdown = TRUE)
4950
VignetteBuilder: knitr
5051
Encoding: UTF-8

DHARMa/R/compatibility.R

+6-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ weightsWarning = "Model was fit with prior weights. These will be ignored in the
101101
#'
102102
#' @seealso \code{\link{getObservedResponse}}, \code{\link{getRefit}}, \code{\link{getFixedEffects}}, \code{\link{getFitted}}
103103
#'
104-
#' @details The function is a wrapper for for the simulate function is to return the simulations from a model in a standardized way.
105-
#'
106-
#' Note: if the model was fit with weights, the function will throw a warning if used with a model class whose simulate function does not include the weightsi in the simulations. Note that the results may or may not be appropriate in this case, depending on how you use the weights.
104+
#' @details The purpose of this function is to wrap or implement the simulate function of different model classes and thus return simulations from fitted models in a standardized way.
107105
#'
106+
#' Note: GLMM and other regression packages often differ in how simulations are produced, and which parameters can be used to modify this behavior.
107+
#'
108+
#' One important difference is how to modifiy which hierarchical levels are held constant, and which are re-simulated. In lme4, this is controlled by the re.form argument (see [lme4::simulate.merMod]). For other packages, please consort the help.
109+
#'
110+
#' If the model was fit with weights and the respective model class does not include the weights in the simulations, getSimulations will throw a warning. The background is if weights are used on the likelihood directly, then what is fitted is effectively a pseudo likelihood, and there is no way to directly simulate from the specified likelihood. Whether or not residuals can be used in this case depends very much on what is tested and how weights are used. I'm sorry to say that it is hard to give a general recommendation, you have to consult someone that understands how weights are processed in the respective model class.
108111
#'
109112
#' @author Florian Hartig
110113
#' @export

DHARMa/man/getSimulations.Rd

+6-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/hurricanes.Rd

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/outliers.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/plot.DHARMa.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/plot.DHARMaBenchmark.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/plotResiduals.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/simulateResiduals.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/testCategorical.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DHARMa/man/testZeroInflation.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

0 commit comments

Comments
 (0)