Your message dated Mon, 11 Feb 2019 20:56:55 +0000
with message-id <[email protected]>
and subject line Bug#921938: fixed in r-cran-lmertest 3.1-0-1
has caused the Debian Bug report #921938,
regarding lme4 breaks r-cran-lmertest autopkgtest
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
921938: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921938
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: lme4, r-cran-lmertest
Control: found -1 lme4/1.1-20-1
Control: found -1 r-cran-lmertest/3.0-1-2
Severity: important
X-Debbugs-CC: [email protected]
User: [email protected]
Usertags: breaks needs-update

Dear maintainers,

With a recent upload of lme4 the autopkgtest of r-cran-lmertest fails in
testing when that autopkgtest is run with the binary packages of lme4
from unstable. It passes when run with only packages from testing. In
tabular form:
                       pass            fail
lme4                   from testing    1.1-20-1
r-cran-lmertest        from testing    3.0-1-2
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of lme4 to testing
[1]. Due to the nature of this issue, I filed this bug report against
both packages. Can you please investigate the situation and reassign the
bug to the right package? If needed, please change the bug's severity.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=lme4

https://ci.debian.net/data/autopkgtest/testing/amd64/r/r-cran-lmertest/1896879/log.gz

autopkgtest [04:42:34]: test run-unit-test: [-----------------------
BEGIN TEST test_a_utils.R

R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> # test_a_utils.R
>
> library(lmerTest)
Loading required package: lme4
Loading required package: Matrix

Attaching package: 'lmerTest'

The following object is masked from 'package:lme4':

    lmer

The following object is masked from 'package:stats':

    step

>
> # test safeDeparse() - equivalence and differences to deparse():
> deparse_args <- formals(deparse)
> safeDeparse_args <- formals(lmerTest:::safeDeparse)
> stopifnot(
+   all.equal(names(deparse_args), names(safeDeparse_args)),
+   all.equal(deparse_args[!names(deparse_args) %in% c("control",
"width.cutoff")],
+             safeDeparse_args[!names(safeDeparse_args) %in%
c("control", "width.cutoff")]),
+   all.equal(deparse_args[["width.cutoff"]], 60L),
+   all(eval(safeDeparse_args[["control"]]) %in%
eval(deparse_args[["control"]])),
+   all.equal(safeDeparse_args[["width.cutoff"]], 500L)
+ )
>
>
BEGIN TEST test_anova.R

R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> # test_anova.R
> library(lmerTest)
Loading required package: lme4
Loading required package: Matrix

Attaching package: 'lmerTest'

The following object is masked from 'package:lme4':

    lmer

The following object is masked from 'package:stats':

    step

>
> # WRE says "using if(requireNamespace("pkgname")) is preferred, if
possible."
> # even in tests:
> assertError <- function(expr, ...)
+   if(requireNamespace("tools")) tools::assertError(expr, ...) else
invisible()
> assertWarning <- function(expr, ...)
+   if(requireNamespace("tools")) tools::assertWarning(expr, ...) else
invisible()
>
> # Kenward-Roger only available with pbkrtest and only then validated
in R >= 3.3.3
> # (faulty results for R < 3.3.3 may be due to unstated dependencies in
pbkrtest)
> has_pbkrtest <- requireNamespace("pbkrtest", quietly = TRUE) &&
getRversion() >= "3.3.3"
>
> data("sleepstudy", package="lme4")
> TOL <- 1e-4
>
> ####################################
> ## Basic anova tests
> ####################################
>
> m <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
>
> ####### ddf argument:
> (an1 <- anova(m)) # Also testing print method.
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, ddf="Satterthwaite"))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2b <- anova(m, ddf="Satterthwaite", type=3))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2c <- anova(m, ddf="Satterthwaite", type=2))
Type II Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an2, tolerance=TOL)
+ ))
> (an3 <- anova(m, ddf="Sat")) ## Abbreviated argument
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an3, tolerance=TOL)
+ ))
> if(has_pbkrtest) {
+   (anova(m, ddf="Kenward-Roger"))
+   (anova(m, ddf="Kenward-Roger", type=3))
+ }
Type III Analysis of Variance Table with Kenward-Roger's method
     Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)
Days  30024   30024     1    17  45.843 3.268e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an1 <- anova(m, ddf="lme4"))
Analysis of Variance Table
     Df Sum Sq Mean Sq F value
Days  1  30024   30024  45.843
> (an2 <- anova(m, ddf="lme4", type=3)) # 'type' is ignored with ddf="lme4"
Analysis of Variance Table
     Df Sum Sq Mean Sq F value
Days  1  30024   30024  45.843
> stopifnot(isTRUE(
+   all.equal(an1, an2, tolerance=TOL)
+ ))
> res <- assertError(anova(m, ddf="KR")) ## Error on incorrect arg.
> stopifnot(
+   grepl("'arg' should be one of ", unlist(res[[1]])$message)
+ )
>
> ## lme4 method:
> an1 <- anova(m, ddf="lme4")
> an2 <- anova(as(m, "lmerMod"))
> stopifnot(isTRUE(
+   all.equal(an1, an2, tolerance=TOL)
+ ))
>
> ###### type argument:
> (an1 <- anova(m, type="1")) # valid type arg.
Type I Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type="I")) # same
Type I Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an2, tolerance=TOL)
+ ))
> (an3 <- anova(m, type=1)) # Not strictly valid, but accepted
Type I Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an3, tolerance=TOL)
+ ))
>
> (an1 <- anova(m, type="2")) # valid type arg.
Type II Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type="II")) # same
Type II Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an2, tolerance=TOL)
+ ))
> (an3 <- anova(m, type=3)) # Not strictly valid, but accepted
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an3, check.attributes=FALSE, tolerance=TOL)
+ ))
>
> (an1 <- anova(m, type="3")) # valid type arg.
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type="III")) # same
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an2, tolerance=TOL)
+ ))
> (an3 <- anova(m, type=3)) # Not strictly valid, but accepted
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  30024   30024     1 16.995  45.843 3.273e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(isTRUE(
+   all.equal(an1, an3, tolerance=TOL)
+ ))
> assertError(anova(m, type=0)) # Not valid arg.
> assertError(anova(m, type="i")) # Not valid arg.
>
> ####### Model comparison:
> fm <- lm(Reaction ~ Days, sleepstudy)
> (an <- anova(m, fm))
refitting model(s) with ML (instead of REML)
Data: sleepstudy
Models:
fm: Reaction ~ Days
m: Reaction ~ Days + (Days | Subject)
   Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)
fm  3 1906.3 1915.9 -950.15   1900.3
m   6 1763.9 1783.1 -875.97   1751.9 148.35      3  < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(
+   nrow(an) == 2L,
+   rownames(an)[2] == "m"
+ )
>
> m2 <- lmer(Reaction ~ Days + I(Days^2) + (Days | Subject), sleepstudy)
> (an <- anova(m, m2, refit=FALSE))
Data: sleepstudy
Models:
m: Reaction ~ Days + (Days | Subject)
m2: Reaction ~ Days + I(Days^2) + (Days | Subject)
   Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)
m   6 1755.6 1774.8 -871.81   1743.6
m2  7 1756.8 1779.2 -871.41   1742.8 0.8127      1     0.3673
> stopifnot(
+   nrow(an) == 2L,
+   rownames(an)[1] == "m"
+ )
>
>
> ####################################
> ## Example with factor fixef:
> ####################################
>
> ## 'temp' is continuous, 'temperature' an ordered factor with 6 levels
> data("cake", package="lme4")
> m <- lmer(angle ~ recipe * temp + (1|recipe:replicate), cake)
> (an <- anova(m))
Type III Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
recipe         4.00    2.00     2 254.02  0.0957 0.9088
temp        1966.71 1966.71     1 222.00 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2 222.00  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_lme4 <- anova(m, ddf="lme4"))
Analysis of Variance Table
            Df  Sum Sq Mean Sq F value
recipe       2   10.39    5.20  0.2488
temp         1 1966.71 1966.71 94.1632
recipe:temp  2    1.74    0.87  0.0417
>
> if(has_pbkrtest) {
+   (an_KR <- anova(m, ddf="Kenward-Roger"))
+   # res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+   #                  an_lme4[, c("Sum Sq", "Mean Sq", "F value")])
+   # stopifnot(isTRUE(res))
+   res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                    an_KR[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
+   stopifnot(isTRUE(res))
+ }
> stopifnot(all.equal(c(2, 1, 2), an$NumDF, tol=1e-6),
+           all.equal(c(254.0157612, 222, 222), an$DenDF, tol=TOL))
>
> an3 <- anova(m, type=3)
> an2 <- anova(m, type=2)
> an1 <- anova(m, type=1)
>
> ## Data is balanced, so Type II and III should be identical:
> ## One variable is continuous, so Type I and II/III are different:
> stopifnot(
+   isTRUE(all.equal(an3, an2, check.attributes=FALSE, tolerance=TOL)),
+   !isTRUE(all.equal(an1, an2, check.attributes=FALSE, tolerance=1e-8))
+ )
>
> # Using an ordered factor:
> m <- lmer(angle ~ recipe * temperature + (1|recipe:replicate), cake)
> (an1 <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> # Type 3 is also available with ordered factors:
> (an3 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> ## Balanced data and only factors: Type I, II and III should be the same:
> stopifnot(
+   isTRUE(all.equal(an1, an2, check.attributes=FALSE, tolerance=TOL)),
+   isTRUE(all.equal(an1, an3, check.attributes=FALSE, tolerance=TOL))
+ )
>
> (an <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_lme4 <- anova(m, type=1, ddf="lme4"))
Analysis of Variance Table
                   Df  Sum Sq Mean Sq F value
recipe              2   10.19    5.09  0.2488
temperature         5 2100.30  420.06 20.5199
recipe:temperature 10  205.98   20.60  1.0062
> res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                  an_lme4[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
> stopifnot(isTRUE(res))
> if(has_pbkrtest) {
+   (an_KR <- anova(m, type=1, ddf="Kenward-Roger"))
+   res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                    an_KR[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
+   stopifnot(isTRUE(res))
+ }
> stopifnot(all.equal(c(2, 5, 10), an$NumDF, tolerance=TOL),
+           all.equal(c(42, 210, 210), an$DenDF, tolerance=TOL))
>
> ########
> ## Make case with balanced unordered factors:
> cake2 <- cake
> cake2$temperature <- factor(cake2$temperature, ordered = FALSE)
> # str(cake2)
> stopifnot(
+   !is.ordered(cake2$temperature)
+ )
> m <- lmer(angle ~ recipe * temperature + (1|recipe:replicate), cake2)
> (an1 <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an3 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
                    Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe               10.19    5.09     2    42  0.2488 0.7809
temperature        2100.30  420.06     5   210 20.5199 <2e-16 ***
recipe:temperature  205.98   20.60    10   210  1.0062 0.4393
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> ## Balanced data and only factors: Type I, II, and III should be the same:
> stopifnot(
+   isTRUE(all.equal(an1, an2, check.attributes=FALSE, tolerance=TOL)),
+   isTRUE(all.equal(an3, an2, check.attributes=FALSE, tolerance=TOL))
+ )
> ########
>
> # No intercept:
> m <- lmer(angle ~ 0 + recipe * temp + (1|recipe:replicate), cake)
> (an <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF DenDF  F value Pr(>F)
recipe      21442.9  7147.6     3    42 342.2200 <2e-16 ***
temp         1966.7  1966.7     1   222  94.1632 <2e-16 ***
recipe:temp     1.7     0.9     2   222   0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
recipe         4.48    1.49     3 254.02  0.0714 0.9752
temp        1966.71 1966.71     1 222.00 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2 222.00  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
recipe         4.48    1.49     3 254.02  0.0714 0.9752
temp        1966.71 1966.71     1 222.00 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2 222.00  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> if(has_pbkrtest)
+   (an_KR <- anova(m, ddf="Kenward-Roger"))
Type III Analysis of Variance Table with Kenward-Roger's method
             Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
recipe         4.48    1.49     3 254.02  0.0714 0.9752
temp        1966.71 1966.71     1 222.00 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2 222.00  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_lme4 <- anova(m, ddf="lme4"))
Analysis of Variance Table
            Df  Sum Sq Mean Sq  F value
recipe       3 21442.9  7147.6 342.2200
temp         1  1966.7  1966.7  94.1632
recipe:temp  2     1.7     0.9   0.0417
> res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                  an_lme4[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
> stopifnot(isTRUE(res))
>
> # ML-fit:
> m <- lmer(angle ~ recipe * temp + (1|recipe:replicate), cake, REML=FALSE)
> (an <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe        10.99    5.49     2    45  0.2666 0.7672
temp        1966.71 1966.71     1   225 95.4357 <2e-16 ***
recipe:temp    1.74    0.87     2   225  0.0423 0.9586
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> if(has_pbkrtest)
+   assertError(an <- anova(m, ddf="Kenward-Roger")) # KR fits should be
REML
> (an_lme4 <- anova(m, ddf="lme4"))
Analysis of Variance Table
            Df  Sum Sq Mean Sq F value
recipe       2   10.99    5.49  0.2666
temp         1 1966.71 1966.71 95.4357
recipe:temp  2    1.74    0.87  0.0423
> res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                  an_lme4[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
> stopifnot(isTRUE(res))
>
> ####################################
> ## Using contr.sum:
> ####################################
>
> m <- lmer(angle ~ recipe * temp + (1|recipe:replicate), cake,
+           contrasts = list('recipe' = "contr.sum"))
> (an <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe        10.39    5.20     2    42  0.2488 0.7809
temp        1966.71 1966.71     1   222 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2   222  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
recipe         4.00    2.00     2 254.02  0.0957 0.9088
temp        1966.71 1966.71     1 222.00 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2 222.00  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an3 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
             Sum Sq Mean Sq NumDF  DenDF F value Pr(>F)
recipe         4.00    2.00     2 254.02  0.0957 0.9088
temp        1966.71 1966.71     1 222.00 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2 222.00  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> stopifnot(
+   isTRUE(all.equal(an2, an3, check.attributes=FALSE, tolerance=TOL))
+ )
> if(has_pbkrtest)
+   (an_KR <- anova(m, type=1, ddf="Kenward-Roger"))
Type I Analysis of Variance Table with Kenward-Roger's method
             Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
recipe        10.39    5.20     2    42  0.2488 0.7809
temp        1966.71 1966.71     1   222 94.1632 <2e-16 ***
recipe:temp    1.74    0.87     2   222  0.0417 0.9592
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_lme4 <- anova(m, ddf="lme4"))
Analysis of Variance Table
            Df  Sum Sq Mean Sq F value
recipe       2   10.39    5.20  0.2488
temp         1 1966.71 1966.71 94.1632
recipe:temp  2    1.74    0.87  0.0417
> res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                  an_lme4[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
> stopifnot(isTRUE(res))
>
>
> ####################################
> ## Example with continuous fixef:
> ####################################
>
> # Example with no fixef:
> m <- lmer(Reaction ~ -1 + (Days | Subject), sleepstudy)
> # m <- lmer(Reaction ~ 0 + (Days | Subject), sleepstudy) # alternative
> stopifnot(length(fixef(m)) == 0L)
> (an <- anova(m, type=1))
Type I Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
> (an_2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
> (an_3 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
> stopifnot(nrow(an) == 0L,
+           nrow(an_2) == 0L,
+           nrow(an_3) == 0L)
> # anova(m, ddf="lme4") # Bug in lme4 it seems
> if(has_pbkrtest) {
+   (an_KR <- anova(m, ddf="Kenward-Roger"))
+   stopifnot(
+     nrow(an_KR) == 0L
+   )
+ }
>
> # Example with intercept only:
> m <- lmer(Reaction ~ (Days | Subject), sleepstudy)
> # m <- lmer(Reaction ~ 1 + (Days | Subject), sleepstudy) # alternative
> stopifnot(length(fixef(m)) == 1L,
+           names(fixef(m)) == "(Intercept)")
> (an <- anova(m))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
> (an_2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
> (an_3 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
> (an_lme4 <- anova(m, ddf="lme4"))
Analysis of Variance Table
     Df Sum Sq Mean Sq F value
> stopifnot(nrow(an) == 0L,
+           nrow(an_2) == 0L,
+           nrow(an_3) == 0L,
+           nrow(an_lme4) == 0L)
> if(has_pbkrtest) {
+   (an_KR <- anova(m, ddf="Kenward-Roger"))
+   stopifnot(
+     nrow(an_KR) == 0L
+   )
+ }
>
> # Example with 1 fixef without intercept:
> m <- lmer(Reaction ~ Days - 1 + (Days | Subject), sleepstudy)
Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.00416642 (tol = 0.002,
component 1)
> # m <- lmer(Reaction ~ 0 + Days + (Days | Subject), sleepstudy) #
alternative
> stopifnot(length(fixef(m)) == 1L,
+           names(fixef(m)) == "Days")
> (an <- anova(m))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  93779   93779     1 16.995  143.19 1.054e-09 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_2 <- anova(m, type=2))
Type II Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  93779   93779     1 16.995  143.19 1.054e-09 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_3 <- anova(m, type=3))
Type III Analysis of Variance Table with Satterthwaite's method
     Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)
Days  93779   93779     1 16.995  143.19 1.054e-09 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> (an_lme4 <- anova(m, ddf="lme4"))
Analysis of Variance Table
     Df Sum Sq Mean Sq F value
Days  1  93779   93779  143.19
> stopifnot(nrow(an) == 1L,
+           nrow(an_2) == 1L,
+           nrow(an_3) == 1L,
+           nrow(an_lme4) == 1L)
> if(has_pbkrtest) {
+   (an_KR <- anova(m, ddf="Kenward-Roger"))
+   stopifnot(
+     nrow(an_KR) == 1L
+   )
+ }
>
> res <- all.equal(an[, c("Sum Sq", "Mean Sq", "F value")],
+                  an_lme4[, c("Sum Sq", "Mean Sq", "F value")],
tolerance=TOL)
> stopifnot(isTRUE(res))
> stopifnot(isTRUE(all.equal(
+   c(1, 17), unname(unlist(an[, c("NumDF", "DenDF")])), tolerance=TOL
+ )))
Error: isTRUE(all.equal(c(1, 17), unname(unlist(an[, c("NumDF",
"DenDF")])),  .... is not TRUE
Execution halted
autopkgtest [04:42:39]: test run-unit-test: -----------------------]

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Source: r-cran-lmertest
Source-Version: 3.1-0-1

We believe that the bug you reported is fixed in the latest version of
r-cran-lmertest, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <[email protected]> (supplier of updated r-cran-lmertest package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 11 Feb 2019 19:36:44 +0100
Source: r-cran-lmertest
Binary: r-cran-lmertest
Architecture: source
Version: 3.1-0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian R Packages Maintainers <[email protected]>
Changed-By: Andreas Tille <[email protected]>
Description:
 r-cran-lmertest - GNU R tests in Linear Mixed Effects Models
Closes: 921938
Changes:
 r-cran-lmertest (3.1-0-1) unstable; urgency=medium
 .
   * New upstream version
     Closes: #921938
   * debhelper 12
   * Standards-Version: 4.3.0
Checksums-Sha1:
 3b6429326c900d11d03667f472cae2824611cd11 2211 r-cran-lmertest_3.1-0-1.dsc
 223d45d0fb1587916c7d7f3be4237b87f9e6e41f 194793 
r-cran-lmertest_3.1-0.orig.tar.gz
 ab80a62e7667039609f9cd242e18e804760a7197 2868 
r-cran-lmertest_3.1-0-1.debian.tar.xz
Checksums-Sha256:
 2d4ec24756dbfe9f3ed18e68eb2bd326ac1189d088070bcdfee9d33a5d24eec0 2211 
r-cran-lmertest_3.1-0-1.dsc
 2bdd4e8c1b9f88653dd39e5ee919878bb45bac857515130946cb17d52b437fda 194793 
r-cran-lmertest_3.1-0.orig.tar.gz
 bb45c7b4dfc25af7c014ff329cbe787f4c67ab0c9ee81b1813119621eba3e36c 2868 
r-cran-lmertest_3.1-0-1.debian.tar.xz
Files:
 d886348428b8e839efb8f306425e9d86 2211 gnu-r optional 
r-cran-lmertest_3.1-0-1.dsc
 85fe0066aee68b8ceb27eab548a0599e 194793 gnu-r optional 
r-cran-lmertest_3.1-0.orig.tar.gz
 74f99be121be70dbc5abfc07564d0ce8 2868 gnu-r optional 
r-cran-lmertest_3.1-0-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAlxh0nURHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtG+DQ//V00hbsahUWMOQwFfOWD3hqYW8AEZDZdd
N9IUqQHz0wwo5udxI2fcwKpX/NOo156HhArihtK+1wQum0vwO8L0Oe6Ejuqmikp0
E41ozUTKg5Xtnuiuh+0+aAJl8WDzqshuRo2j2AS2+S/Tdr8NEWdXa30VsYH//Q0R
Bpx33RXQLP7pWcUvozk9M5OHL9wCS+cOr1FtkcM7dzfS4cfqxdsNRPDx3fzmgj/9
pUe6DvD+oMeoyng/376kdg6Zwwo7MNir/JmdoqN0XswFUW4KzcHQzW5mZnJAOHy0
jgSLzP0CncW5rPlwZBWhQqN4OET+X+JNwmkGgnAaVnAciZAC4YOVm7TUvbGKlQst
cO7HJnZ5O0rDvvRQwnU8U6oHcGGkGTbAZZKoYb20SFyja3wB0IBBxJ6t2rt16LAv
U53UVjAlMtMY0GfKOYB7EB7W2cexfC5gTGH1/PgYn7iuLRzgjNPIb99invy2d73k
Ge2QpcarFcFtLjtroydCboctzxm8ML3zL0afse88X4FCYhqZmT8va/L8M8s84tqR
kMV48u0mHmWiq5/+PwB4PRZsZaP7Nx+u6CAdSYa0Ecv5/3p7s7NNAgjAvP9xxh24
hE90UZa2lhKwASx/RWvRVw9kfLq91YQO7rD/1pqKC9hfHtl3ZkSkvKa5dqWAJ+/+
yV1tdKFpk3c=
=pBOK
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to