easystats / modelbased

:chart_with_upwards_trend: Estimate effects, contrasts and means based on statistical models
https://easystats.github.io/modelbased/
GNU General Public License v3.0
234 stars 19 forks source link

Test fails online and in checks but not locally? #216

Open DominiqueMakowski opened 2 years ago

DominiqueMakowski commented 2 years ago

Super weird, this test fails on the GHA + also when I run the checks locally, but not when I directly run or reprex the code...

    library(modelbased)
    data <- iris
    data$Petal.Length_factor <- ifelse(data$Petal.Length < 4.2, "A", "B")
    model <- lme4::lmer(Sepal.Width ~ Species + (1 | Petal.Length_factor), data = data)

    estim1 <- estimate_contrasts(model, lmer.df = "satterthwaite")
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
    estim2 <- estimate_contrasts(model, lmer.df = "kenward-roger")
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
    any(estim1$CI_low != estim2$CI_low)
#> [1] TRUE

Created on 2022-10-18 by the reprex package (v2.0.1)

It's here:

https://github.com/easystats/modelbased/blob/fb20ff46ce2dc8ed26c6f4d8ed56a3a47539c210/tests/testthat/test-estimate_contrasts.R#L176-L185

@IndrajeetPatil does your knowledge of the testing arcana give you some hints?

DominiqueMakowski commented 2 years ago

Waaait could be that it's related to some changes in insight/parameters? But I think I'm all up to date though 🤔

IndrajeetPatil commented 2 years ago

Let's try with devel-insight and -parameters first, and if tests still fail, I will have a look-see.