Skip to content

Commit 949b6cc

Browse files
committed
Merge branch 'master' of https://github.com/biometry/DHARMa
2 parents bcb8bb5 + 1dda914 commit 949b6cc

File tree

9 files changed

+71
-64
lines changed

9 files changed

+71
-64
lines changed

.travis.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ sudo: false
1717
# cache: packages
1818

1919
r:
20-
- oldrel
2120
- release
22-
- devel
23-
21+
2422
# Install nlopt package to help nloptr install
2523
# glpk-utils and libglpk-dev are needed because of DHARMa #166
2624
addons:

DHARMa/tests/testthat/testModelTypes.R Code/testModelTypes.R

+8-8
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ test_that("glm poisson works",
310310
# fittedModel2 <- glm.nb(observedResponse ~ Environment1, data = testData2)
311311
# expectDispersion(fittedModel2,FALSE)
312312

313-
fittedModel <- glmmTMB(observedResponse ~ Environment1 , family = "poisson", data = testData)
314-
runEverything(fittedModel, testData)
315-
fittedModel2 <- glmmTMB(observedResponse ~ Environment1 , family = "poisson", data = testData2)
316-
expectDispersion(fittedModel2)
313+
#fittedModel <- glmmTMB(observedResponse ~ Environment1 , family = "poisson", data = testData)
314+
#runEverything(fittedModel, testData)
315+
#fittedModel2 <- glmmTMB(observedResponse ~ Environment1 , family = "poisson", data = testData2)
316+
#expectDispersion(fittedModel2)
317317

318-
fittedModel <- glmmTMB(observedResponse ~ Environment1 + (1|group), zi=~1 , family = nbinom2, data = testData)
319-
fittedModel2 <- glmmTMB(observedResponse ~ Environment1 + (1|group), zi=~1 , family = nbinom2, data = testData2)
318+
#fittedModel <- glmmTMB(observedResponse ~ Environment1 + (1|group), zi=~1 , family = nbinom2, data = testData)
319+
#fittedModel2 <- glmmTMB(observedResponse ~ Environment1 + (1|group), zi=~1 , family = nbinom2, data = testData2)
320320
# does not fully work
321321
# runEverything(fittedModel, testData)
322322
# expectDispersion(fittedModel2, F)
@@ -389,8 +389,8 @@ test_that("glm poisson weights throws warning",
389389
expect_warning(simulateResiduals(fittedModel))
390390

391391
# glmmTMB does not warn, implemented warning in DHARMa
392-
fittedModel <- glmmTMB(observedResponse ~ Environment1 , family = "poisson", data = testData, weights = weights)
393-
expect_warning(simulateResiduals(fittedModel))
392+
# fittedModel <- glmmTMB(observedResponse ~ Environment1 , family = "poisson", data = testData, weights = weights)
393+
# expect_warning(simulateResiduals(fittedModel))
394394

395395
# spaMM does not warn, but seems to be simulating with correct (heteroskedastic) variance.
396396
# weights cannot be fit with poisson, because spaMM directly interpretes weights as variance

DHARMa/DESCRIPTION

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: DHARMa
22
Title: Residual Diagnostics for Hierarchical (Multi-Level / Mixed) Regression Models
3-
Version: 0.4.2
4-
Date: 2021-04-8
3+
Version: 0.4.3
4+
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
@@ -28,8 +28,7 @@ Imports:
2828
lmtest,
2929
ape,
3030
qgam (>= 1.3.2),
31-
lme4,
32-
glmmTMB (>= 1.0.1)
31+
lme4
3332
Suggests:
3433
knitr,
3534
testthat,

DHARMa/NEWS

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
NOTE: for more news about the package, see https://github.com/florianhartig/DHARMa/releases
22

3+
DHARMa 0.4.3
4+
============
5+
6+
Bugfixes
7+
8+
- Removed glmmTMB completely, see #289
9+
10+
311
DHARMa 0.4.2
412
============
513

DHARMa/R/compatibility.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ getFixedEffects <- function(fittedModel){
168168
} else if(class(fittedModel)[1] %in% c("glmerMod", "lmerMod", "HLfit")){
169169
out = fixef(fittedModel)
170170
} else if(class(fittedModel)[1] %in% c("glmmTMB")){
171-
out = glmmTMB::fixef(fittedModel)
171+
out = fixef(fittedModel)
172172
out = out$cond
173173
} else {
174174
out = coef(fittedModel)
@@ -232,7 +232,7 @@ getFitted <- function (object, ...) {
232232
#' @export
233233
getFitted.default <- function (object,...){
234234
out = predict(object, type = "response", re.form = ~0)
235-
out = as.vector(out)
235+
out = as.vector(out) # introduced because of phyr error
236236
}
237237

238238

DHARMa/cran-comments.md

+34-34
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This is a bugfix release, attempting to fix the issue with the dependency on glmmTMB, which was apparently exacerbated by the 0.4.2 update yesterday.
66

7-
I have for the moment (hopefully) removed glmmTMB from DHARMa, and will re-introduce it once glmmTMB is fixed.
7+
I have for the moment (hopefully) removed glmmTMB from DHARMa, and will re-introduce it once glmmTMB is fixed.
88

99
This release was tested without apparent problems under
1010

@@ -17,7 +17,7 @@ This release was tested without apparent problems under
1717

1818
## Submission 1, 5.7.2021
1919

20-
This is a bugfix release. See NEWS for details.
20+
This is a bugfix release. See NEWS for details.
2121

2222
This release was tested without apparent problems under
2323

@@ -30,7 +30,7 @@ This release was tested without apparent problems under
3030

3131
## Submission 1, 24.3.2021
3232

33-
This is a bugfix release. See NEWS for details.
33+
This is a bugfix release. See NEWS for details.
3434

3535
This release was tested without apparent problems under
3636

@@ -73,13 +73,13 @@ This release was tested without apparent problems under
7373
* http://win-builder.r-project.org/ - oldrelease / devel / release
7474
* Linux (Travis CI) - oldrel / release / devel
7575

76-
Notes: this is the third submission, pre-submission checks from earlier version complained about lazy data in the descriptin, which I have now really removed.
76+
Notes: this is the third submission, pre-submission checks from earlier version complained about lazy data in the descriptin, which I have now really removed.
7777

7878
# Version 0.3.4
7979

8080
## Submission 1, 23.3.2021
8181

82-
This is a relatively substantial update of DHARMa, with various smaller new features and bugfixes. See NEWS for changes.
82+
This is a relatively substantial update of DHARMa, with various smaller new features and bugfixes. See NEWS for changes.
8383

8484
This release was tested without apparent problems under
8585

@@ -106,10 +106,10 @@ Check: running examples for arch 'x64', Result: NOTE
106106
user system elapsed
107107
hist.DHARMa 10.94 0.12 11.73
108108
plotResiduals 9.64 0.00 10.17
109-
109+
110110
## Submission 2, 23.3.2021
111111

112-
This is a relatively substantial update of DHARMa, with various smaller new features and bugfixes. See NEWS for changes.
112+
This is a relatively substantial update of DHARMa, with various smaller new features and bugfixes. See NEWS for changes.
113113

114114
This release was tested without apparent problems under
115115

@@ -128,7 +128,7 @@ Notes: this is the second submission, pre-submission checks from earlier version
128128

129129
## Submission 1, 22.8.20
130130

131-
This is a minor update of DHARMa. See NEWS for changes.
131+
This is a minor update of DHARMa. See NEWS for changes.
132132

133133
This release was tested without apparent problems under
134134

@@ -143,7 +143,7 @@ This release was tested without apparent problems under
143143

144144
## Submission 1, 16.6.20
145145

146-
This is a minor update of DHARMa, with a few stability improvement and bugfixes. See NEWS for changes.
146+
This is a minor update of DHARMa, with a few stability improvement and bugfixes. See NEWS for changes.
147147

148148
This release was tested without apparent problems under
149149

@@ -157,7 +157,7 @@ This release was tested without apparent problems under
157157

158158
## Submission 1, 11.5.20
159159

160-
This is a minor update of DHARMa, with a few stability improvement and bugfixes. See NEWS for changes.
160+
This is a minor update of DHARMa, with a few stability improvement and bugfixes. See NEWS for changes.
161161

162162
This release was tested without apparent problems under
163163

@@ -171,7 +171,7 @@ This release was tested without apparent problems under
171171

172172
## Submission 1, 20.4.20
173173

174-
This is a substantial update of DHARMa, introducing various new functions and bugfixes. See NEWS for changes.
174+
This is a substantial update of DHARMa, introducing various new functions and bugfixes. See NEWS for changes.
175175

176176
This release was tested without apparent problems under
177177

@@ -184,7 +184,7 @@ This release was tested without apparent problems under
184184

185185
## Submission 1, 4.2.20
186186

187-
This is a minor update of DHARMa, mainly enhancing compatibility with glmmTMB. See NEWS for changes.
187+
This is a minor update of DHARMa, mainly enhancing compatibility with glmmTMB. See NEWS for changes.
188188

189189
This release was tested without apparent problems under
190190

@@ -196,7 +196,7 @@ This release was tested without apparent problems under
196196

197197
## Submission 1, 26.11.19
198198

199-
This release fixes a bug in the vignette that appeared after last release last week. See NEWS for changes.
199+
This release fixes a bug in the vignette that appeared after last release last week. See NEWS for changes.
200200

201201
This release was tested without apparent problems under
202202

@@ -209,7 +209,7 @@ This release was tested without apparent problems under
209209

210210
## Submission 1
211211

212-
This is a minor bugfix release. See NEWS for changes.
212+
This is a minor bugfix release. See NEWS for changes.
213213

214214
This release was tested without apparent problems under
215215

@@ -221,7 +221,7 @@ This release was tested without apparent problems under
221221

222222
## Submission 1
223223

224-
This is a bugfix release, responding to an email from CRAN about a problem building the vignette. See NEWS for changes.
224+
This is a bugfix release, responding to an email from CRAN about a problem building the vignette. See NEWS for changes.
225225

226226
This release was tested without apparent problems under
227227

@@ -233,7 +233,7 @@ This release was tested without apparent problems under
233233

234234
## Submission 1
235235

236-
This is a maintenance release with a few smaller bug fixes and a few improvements to the package. See NEWS for changes.
236+
This is a maintenance release with a few smaller bug fixes and a few improvements to the package. See NEWS for changes.
237237

238238
This release was tested without apparent problems under
239239

@@ -246,7 +246,7 @@ This release was tested without apparent problems under
246246

247247
## Submission 1
248248

249-
This is bugfix release for version 0.2.1, which was published on CRAN a few days ago. This new release 0.2.2 fixes an issue in the vignette (due to some old header command, title, abstract and TOC were not shown). Apologies for the oversight.
249+
This is bugfix release for version 0.2.1, which was published on CRAN a few days ago. This new release 0.2.2 fixes an issue in the vignette (due to some old header command, title, abstract and TOC were not shown). Apologies for the oversight.
250250

251251
This release was tested without apparent problems under
252252

@@ -272,45 +272,45 @@ This release was tested without apparent problems under
272272

273273
## Submission 1
274274

275-
This is major release with a number of important changes to the package. See DHARMa NEWS for changes.
275+
This is major release with a number of important changes to the package. See DHARMa NEWS for changes.
276276

277277
This release was tested without apparent problems under
278278

279279
* local MAC OS 10.13.4 (High Sierra), R 3.3.2
280280
* http://win-builder.r-project.org/ - oldrelease / devel / realease
281281
* Linux (Travis CI) - oldrel / release / devel
282-
282+
283283

284284
# Version 0.1.6
285285

286286
## Submission 1
287287

288-
This is a maintenance release with a few smaller bug fixes and a few improvements to the package. See NEWS for changes.
288+
This is a maintenance release with a few smaller bug fixes and a few improvements to the package. See NEWS for changes.
289289

290290
This release was tested without apparent problems under
291291

292292
* local MAC OS 10.13.3, R 3.3.2
293293
* http://win-builder.r-project.org/ - oldrelease / devel / realease
294294
* Linux (Travis CI) - oldrel / release / devel
295-
295+
296296
# Version 0.1.5
297297

298298
## Submission 1
299299

300-
This release fixes a bug in version 0.1.4 that occurred when running simulateResiduals with refit = T. Apologies for any inconvenience.
300+
This release fixes a bug in version 0.1.4 that occurred when running simulateResiduals with refit = T. Apologies for any inconvenience.
301301

302302
This release was tested without apparent problems under
303303

304304
* local MAC OS 10.10.5, R 3.3.1
305305
* http://win-builder.r-project.org/, current settings
306306
* Linux (Travis CI)
307307
* oldrel / release / devel
308-
308+
309309
# Version 0.1.4
310310

311311
## Submission 1
312312

313-
This is a minor update. See NEWS for changes.
313+
This is a minor update. See NEWS for changes.
314314

315315
This release was tested without apparent problems under
316316

@@ -327,15 +327,15 @@ This is a minor update. Important changes
327327

328328
- includes support for model class 'gam' from package 'mgcv'. Required overwriting the 'fitted' function for gam, see https://github.com/florianhartig/DHARMa/issues/12
329329

330-
- plotResiduals includes support for factors
330+
- plotResiduals includes support for factors
331331

332-
- updates to the help
332+
- updates to the help
333333

334334
This release was tested without apparent problems under
335335

336336
* local MAC OS 10.10.5, R 3.3.1
337337
* http://win-builder.r-project.org/
338-
* R-release: R-3.3.1
338+
* R-release: R-3.3.1
339339
* R-devel: 2016-11-14 r71659
340340
* Linux (Travis CI)
341341
* oldrel / release / devel
@@ -350,7 +350,7 @@ This release was tested without apparent problems under
350350

351351
* local MAC OS 10.10.5, R 3.3.1
352352
* http://win-builder.r-project.org/
353-
* R-release: R-3.3.1
353+
* R-release: R-3.3.1
354354
* R-devel: 2016-11-14 r71659
355355
* Linux (Travis CI)
356356

@@ -368,7 +368,7 @@ This is a minor update of the DHARMa package
368368

369369
* local MAC OS 10.10.5, R 3.3.1
370370
* http://win-builder.r-project.org/
371-
* R-release: R-3.3.1
371+
* R-release: R-3.3.1
372372
* R-devel: 2016-11-14 r71659
373373

374374
### R CMD check results
@@ -382,14 +382,14 @@ R CMD check succeeded
382382

383383
#### win-builder
384384

385-
only some spelling problems that seem fine to me.
385+
only some spelling problems that seem fine to me.
386386

387387

388388

389389
# Version 0.1.0
390390

391391

392-
## Submission 2
392+
## Submission 2
393393

394394
Hi,
395395

@@ -435,11 +435,11 @@ Please fix.
435435
436436
Please shorten the example code so it runs in 5 sec.
437437

438-
* changed the settings in the help of simulateResiduals() - I hope it is below 5 second now.
438+
* changed the settings in the help of simulateResiduals() - I hope it is below 5 second now.
439439

440440
Resubmit when you have made these changes and passed checks without these notes.
441441

442-
Duncan Murdoch
442+
Duncan Murdoch
443443

444444
## Submission 1
445445

@@ -448,7 +448,7 @@ Duncan Murdoch
448448
* local MAC OS 10.10.5, R 3.3.1
449449
* local Windows 2012 Server, R 3.3.0
450450
* http://win-builder.r-project.org/
451-
* R-release: R-release, currently R-3.3.1
451+
* R-release: R-release, currently R-3.3.1
452452
* R-devel: R-devel, to be R-3.4.0
453453

454454
### R CMD check results

DHARMa/inst/examples/hurricanes.R

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
\dontrun{
12
# Loading hurricanes dataset
23

34
library(DHARMa)
4-
data(hurricanes)
55

6+
data(hurricanes)
67
str(hurricanes)
78

89
# this is the model fit by Jung et al.
@@ -24,4 +25,5 @@ res2 = recalculateResiduals(res, group = hurricanes$Year)
2425
testTemporalAutocorrelation(res2, time = unique(hurricanes$Year))
2526

2627
# task: try to address these issues - in many instances, this will
27-
# make the MasFem predictor n.s.
28+
# make the MasFem predictor n.s.
29+
}

0 commit comments

Comments
 (0)