Open dtgnn opened 3 years ago
Just wanted to add a +1. This has broken a load of my learnr tutorials (in that text no longer matches output). Here's another reproducible example:
pupluv_tib <- read.csv("https://www.discovr.rocks/csv/puppy_love.csv") |>
dplyr::mutate(
dose = forcats::as_factor(dose)
)
pupluv_lm <- lm(happiness ~ puppy_love + dose, data = pupluv_tib)
modelbased::estimate_contrasts(pupluv_lm, fixed = "puppy_love", adjust = "holm")
modelbased::estimate_contrasts(pupluv_lm, fixed = "puppy_love", adjust = "bonferroni")
Hi and thank you for your work on easystats. I wanted to point out that the contrast estimation function appears to handle the
adjust
argument incorrectly.Changing the adjustment method has no effect on the p-values. A comparison with
emmeans
also shows that the default method used bymodelbased
is actually "tukey" instead of "holm", despite what is written in the documentation and what is printed in the footer of the output table:Created on 2021-09-13 by the reprex package (v2.0.0)
Session info
``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.2 (2020-06-22) #> os macOS High Sierra 10.13.6 #> system x86_64, darwin17.0 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2021-09-13 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> backports 1.2.1 2020-12-09 [1] CRAN (R 4.0.2) #> bayestestR 0.11.0 2021-09-03 [1] CRAN (R 4.0.2) #> cli 3.0.1 2021-07-17 [1] CRAN (R 4.0.2) #> coda 0.19-4 2020-09-30 [1] CRAN (R 4.0.2) #> codetools 0.2-18 2020-11-04 [1] CRAN (R 4.0.2) #> crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.2) #> datawizard 0.2.0.1 2021-09-02 [1] CRAN (R 4.0.2) #> digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.2) #> effectsize 0.4.5 2021-05-25 [1] CRAN (R 4.0.2) #> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.0.2) #> emmeans 1.6.1 2021-06-01 [1] CRAN (R 4.0.2) #> estimability 1.3 2018-02-11 [1] CRAN (R 4.0.1) #> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.0) #> fansi 0.5.0 2021-05-25 [1] CRAN (R 4.0.2) #> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2) #> glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2) #> highr 0.9 2021-04-16 [1] CRAN (R 4.0.2) #> htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 4.0.2) #> insight 0.14.4 2021-09-02 [1] CRAN (R 4.0.2) #> knitr 1.33 2021-04-24 [1] CRAN (R 4.0.2) #> lattice 0.20-44 2021-05-02 [1] CRAN (R 4.0.2) #> lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.2) #> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.2) #> MASS 7.3-54 2021-05-03 [1] CRAN (R 4.0.2) #> Matrix 1.3-4 2021-06-01 [1] CRAN (R 4.0.2) #> modelbased 0.7.0 2021-06-06 [1] CRAN (R 4.0.2) #> multcomp 1.4-17 2021-04-29 [1] CRAN (R 4.0.2) #> mvtnorm 1.1-2 2021-06-07 [1] CRAN (R 4.0.2) #> palmerpenguins 0.1.0 2020-07-23 [1] CRAN (R 4.0.2) #> parameters 0.14.0 2021-05-29 [1] CRAN (R 4.0.2) #> pillar 1.6.2 2021-07-29 [1] CRAN (R 4.0.2) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.0) #> plyr 1.8.6 2020-03-03 [1] CRAN (R 4.0.0) #> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.0) #> Rcpp 1.0.7 2021-07-07 [1] CRAN (R 4.0.2) #> reprex 2.0.0 2021-04-02 [1] CRAN (R 4.0.2) #> rlang 0.4.11 2021-04-30 [1] CRAN (R 4.0.2) #> rmarkdown 2.10 2021-08-06 [1] CRAN (R 4.0.2) #> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.2) #> sandwich 3.0-1 2021-05-18 [1] CRAN (R 4.0.2) #> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2) #> stringi 1.7.3 2021-07-16 [1] CRAN (R 4.0.2) #> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.0) #> styler 1.5.1 2021-07-13 [1] CRAN (R 4.0.2) #> survival 3.2-11 2021-04-26 [1] CRAN (R 4.0.2) #> TH.data 1.0-10 2019-01-21 [1] CRAN (R 4.0.2) #> tibble 3.1.3 2021-07-23 [1] CRAN (R 4.0.2) #> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.0.2) #> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.0.2) #> withr 2.4.2 2021-04-18 [1] CRAN (R 4.0.2) #> xfun 0.25 2021-08-06 [1] CRAN (R 4.0.2) #> xtable 1.8-4 2019-04-21 [1] CRAN (R 4.0.0) #> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.0) #> zoo 1.8-9 2021-03-09 [1] CRAN (R 4.0.2) #> #> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library ```