0

emmeans can't evaluate averaging object

The problem is that emmeans gives an error when evaluating an averaging object form the MuMIn package, even when it says it should in this link I have been trying to debug this for a couple of days with no luck. All data and code is in this repo

first we load the needed r packages and the dataset

library(emmeans)
library(lme4)
#;-) Loading required package: Matrix
library(MuMIn)
library(doParallel)
#;-) Loading required package: foreach
#;-) Loading required package: iterators
#;-) Loading required package: parallel

Data <- readRDS("Data.rds")

If you dont want to download the data you can use this

Data <- structure(list(richness = c(25L, 24L, 14L, 13L, 11L, 16L, 10L, 
27L, 31L, 34L, 20L, 25L, 23L, 8L, 10L, 7L, 9L, 13L, 15L, 23L, 
22L, 20L, 22L, 15L, 35L, 18L, 15L, 36L, 29L, 35L, 32L, 24L, 22L, 
18L, 14L, 17L, 22L, 34L, 30L, 15L, 17L, 23L, 24L, 6L, 9L, 10L, 
8L, 4L, 5L, 21L, 24L, 17L, 11L, 13L, 13L, 11L, 25L, 20L, 21L, 
9L, 20L, 16L, 7L, 9L, 6L, 8L, 11L, 12L, 16L, 19L, 13L, 15L, 14L, 
22L, 8L, 6L, 23L, 17L, 27L, 31L, 12L, 12L, 15L, 15L, 10L, 13L, 
29L, 32L, 14L, 12L, 20L, 22L, 6L, 8L, 9L, 5L, 3L, 4L, 14L, 31L, 
19L, 11L, 13L, 17L, 12L, 21L, 16L, 21L, 24L, 15L, 14L, 10L, 10L, 
11L, 13L, 12L, 18L, 17L, 14L, 17L, 11L, 17L, 24L, 14L, 7L, 29L, 
27L, 31L, 37L, 17L, 17L, 14L, 12L, 26L, 21L, 27L, 19L, 17L, 11L, 
20L, 17L, 6L, 11L, 11L, 6L, 3L, 5L, 24L, 20L, 17L, 14L, 15L, 
12L, 11L, 21L, 21L, 18L, 11L, 26L, 15L, 10L, 9L, 8L, 9L, 13L, 
17L, 6L, 12L, 19L, 9L, 20L, 15L, 9L, 10L, 30L, 26L, 39L, 31L, 
18L, 20L, 16L, 11L, 27L, 22L, 29L, 21L, 17L, 14L, 27L, 17L, 5L, 
7L, 10L, 6L, 2L, 4L, 25L, 18L, 19L, 12L, 12L, 14L, 16L, 26L, 
15L, 24L, 11L, 26L, 21L, 10L, 8L, 7L, 8L, 10L, 14L, 8L, 10L, 
13L, 14L, 15L, 14L, 13L, 9L, 34L, 26L, 41L, 27L, 16L, 17L, 14L, 
26L, 18L, 29L, 17L, 19L, 13L, 22L, 19L, 8L, 7L, 8L, 7L, 2L, 5L
), aspect = c(200, 186, 138, 152, 158, 326, 332, 150, 151, 126, 
63, 110, 180, 302, 12, 164, 146, 32, 212, 152, 160, 124, 11, 
102, 60, 180, 129, 89, 92, 100, 260, 94, 100, 0, 0, 0, 0, 156, 
101, 0, 0, 0, 0, 82, 152, 164, 268, 116, 268, 200, 186, 138, 
152, 158, 326, 332, 150, 151, 126, 63, 110, 180, 302, 12, 164, 
146, 32, 212, 152, 160, 124, 11, 102, 60, 180, 129, 89, 92, 100, 
260, 94, 100, 0, 0, 0, 0, 156, 101, 0, 0, 0, 0, 82, 152, 164, 
268, 116, 268, 200, 186, 138, 152, 158, 326, 332, 150, 151, 126, 
63, 110, 180, 302, 12, 164, 146, 32, 212, 152, 160, 124, 11, 
102, 60, 180, 129, 89, 92, 100, 260, 94, 100, 0, 0, 0, 0, 156, 
101, 0, 0, 0, 0, 82, 152, 164, 268, 116, 268, 200, 186, 138, 
152, 158, 326, 332, 150, 151, 126, 63, 110, 180, 302, 12, 164, 
146, 32, 212, 152, 160, 124, 11, 102, 60, 180, 129, 89, 92, 100, 
260, 94, 100, 0, 0, 0, 0, 156, 101, 0, 0, 0, 0, 82, 152, 164, 
268, 116, 268, 200, 186, 138, 152, 158, 326, 332, 150, 151, 126, 
63, 110, 180, 302, 12, 164, 146, 32, 212, 152, 160, 124, 11, 
102, 60, 180, 129, 89, 92, 100, 260, 94, 100, 0, 0, 0, 156, 101, 
0, 0, 0, 0, 82, 152, 164, 268, 116, 268), elevation = c(59.639, 
60.455, 49.532, 50.521, 52.628, 41.467, 39.91, 52.057, 55.861, 
61.056, 60.571, 38.707, 40.645, 25.855, 32.852, 30.79, 26.7344, 
25.8817, 27.277, 63.331, 62.715, 72.395, 74.567, 70.733, 68.974, 
62.814, 62.708, 48.962, 49.978, 50.261, 49.805, 47.82, 46.711, 
3.256, 3.197, 3.109, 3.209, 59.102, 59.51, 3.024, 2.971, 2.953, 
3.106, 4.612, 2.43366667, 15.355, 2.091, 4.573, 4.563, 59.639, 
60.455, 49.532, 50.521, 52.628, 41.467, 39.91, 52.057, 55.861, 
61.056, 60.571, 38.707, 40.645, 25.855, 32.852, 30.79, 26.7344, 
25.8817, 27.277, 63.331, 62.715, 72.395, 74.567, 70.733, 68.974, 
62.814, 62.708, 48.962, 49.978, 50.261, 49.805, 47.82, 46.711, 
3.256, 3.197, 3.109, 3.209, 59.102, 59.51, 3.024, 2.971, 2.953, 
3.106, 4.612, 2.43366667, 15.355, 2.091, 4.573, 4.563, 59.639, 
60.455, 49.532, 50.521, 52.628, 41.467, 39.91, 52.057, 55.861, 
61.056, 60.571, 38.707, 40.645, 25.855, 32.852, 30.79, 26.7344, 
25.8817, 27.277, 63.331, 62.715, 72.395, 74.567, 70.733, 68.974, 
62.814, 62.708, 48.962, 49.978, 50.261, 49.805, 47.82, 46.711, 
3.256, 3.197, 3.109, 3.209, 59.102, 59.51, 3.024, 2.971, 2.953, 
3.106, 4.612, 2.43366667, 15.355, 2.091, 4.573, 4.563, 59.639, 
60.455, 49.532, 50.521, 52.628, 41.467, 39.91, 52.057, 55.861, 
61.056, 60.571, 38.707, 40.645, 25.855, 32.852, 30.79, 26.7344, 
25.8817, 27.277, 63.331, 62.715, 72.395, 74.567, 70.733, 68.974, 
62.814, 62.708, 48.962, 49.978, 50.261, 49.805, 47.82, 46.711, 
3.256, 3.197, 3.109, 3.209, 59.102, 59.51, 3.024, 2.971, 2.953, 
3.106, 4.612, 2.43366667, 15.355, 2.091, 4.573, 4.563, 59.639, 
60.455, 49.532, 50.521, 52.628, 41.467, 39.91, 52.057, 55.861, 
61.056, 60.571, 38.707, 40.645, 25.855, 32.852, 30.79, 26.7344, 
25.8817, 27.277, 63.331, 62.715, 72.395, 74.567, 70.733, 68.974, 
62.814, 62.708, 48.962, 49.978, 50.261, 49.805, 47.82, 46.711, 
3.197, 3.109, 3.209, 59.102, 59.51, 3.024, 2.971, 2.953, 3.106, 
4.612, 2.43366667, 15.355, 2.091, 4.573, 4.563), initial_habitat = c("Rangeland", 
"Rangeland", "Forest", "Forest", "Forest", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Forest", "Forest", "Forest", "Forest", "Forest", 
"Forest", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Meadow", "Meadow", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Meadow", "Meadow", "Meadow", "Meadow", "Forest", "Forest", "Forest", 
"Forest", "Forest", "Forest", "Rangeland", "Rangeland", "Forest", 
"Forest", "Forest", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Forest", 
"Forest", "Forest", "Forest", "Forest", "Forest", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Meadow", "Meadow", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Meadow", "Meadow", "Meadow", 
"Meadow", "Forest", "Forest", "Forest", "Forest", "Forest", "Forest", 
"Rangeland", "Rangeland", "Forest", "Forest", "Forest", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Forest", "Forest", "Forest", "Forest", 
"Forest", "Forest", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Meadow", "Meadow", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Meadow", "Meadow", "Meadow", "Meadow", "Forest", "Forest", "Forest", 
"Forest", "Forest", "Forest", "Rangeland", "Rangeland", "Forest", 
"Forest", "Forest", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Forest", 
"Forest", "Forest", "Forest", "Forest", "Forest", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Meadow", "Meadow", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Meadow", "Meadow", "Meadow", 
"Meadow", "Forest", "Forest", "Forest", "Forest", "Forest", "Forest", 
"Rangeland", "Rangeland", "Forest", "Forest", "Forest", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Forest", "Forest", "Forest", "Forest", 
"Forest", "Forest", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Rangeland", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Meadow", "Rangeland", "Rangeland", "Rangeland", "Rangeland", 
"Meadow", "Meadow", "Meadow", "Meadow", "Forest", "Forest", "Forest", 
"Forest", "Forest", "Forest"), year = c(0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 1, 1, 1, 1, 1, 1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, 2L, 1L, 1L, 2L, 1L, 
1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 
1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 
2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 
1L), levels = c("PermanentExclosure", "Control"), class = "factor"), 
    block_no = structure(c(3L, 3L, 4L, 4L, 4L, 5L, 5L, 6L, 6L, 
    7L, 7L, 8L, 8L, 9L, 9L, 9L, 10L, 10L, 10L, 1L, 1L, 11L, 11L, 
    12L, 12L, 2L, 2L, 13L, 13L, 14L, 14L, 15L, 15L, 16L, 16L, 
    17L, 17L, 18L, 18L, 19L, 19L, 20L, 20L, 21L, 21L, 21L, 22L, 
    22L, 22L, 3L, 3L, 4L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 
    8L, 9L, 9L, 9L, 10L, 10L, 10L, 1L, 1L, 11L, 11L, 12L, 12L, 
    2L, 2L, 13L, 13L, 14L, 14L, 15L, 15L, 16L, 16L, 17L, 17L, 
    18L, 18L, 19L, 19L, 20L, 20L, 21L, 21L, 21L, 22L, 22L, 22L, 
    3L, 3L, 4L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 
    9L, 10L, 10L, 10L, 1L, 1L, 11L, 11L, 12L, 12L, 2L, 2L, 13L, 
    13L, 14L, 14L, 15L, 15L, 16L, 16L, 17L, 17L, 18L, 18L, 19L, 
    19L, 20L, 20L, 21L, 21L, 21L, 22L, 22L, 22L, 3L, 3L, 4L, 
    4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 9L, 10L, 
    10L, 10L, 1L, 1L, 11L, 11L, 12L, 12L, 2L, 2L, 13L, 13L, 14L, 
    14L, 15L, 15L, 16L, 16L, 17L, 17L, 18L, 18L, 19L, 19L, 20L, 
    20L, 21L, 21L, 21L, 22L, 22L, 22L, 3L, 3L, 4L, 4L, 4L, 5L, 
    5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 9L, 10L, 10L, 10L, 1L, 
    1L, 11L, 11L, 12L, 12L, 2L, 2L, 13L, 13L, 14L, 14L, 15L, 
    15L, 16L, 17L, 17L, 18L, 18L, 19L, 19L, 20L, 20L, 21L, 21L, 
    21L, 22L, 22L, 22L), levels = c("5", "6", "13", "15", "28", 
    "36", "37", "42", "46", "47", "54", "55", "60", "61", "62", 
    "69", "70", "74", "85", "95", "96", "97"), class = "factor")), row.names = c(NA, 
-244L), class = c("tbl_df", "tbl", "data.frame"))

Now we fit a general model:

Model <- glmer(richness ~ aspect + elevation +
  initial_habitat +
  I(abs(year - 1)) +
  I((year - 1)^2) +
  slope +
  treatment:initial_habitat +
  year:initial_habitat +
  year:treatment +
  year:treatment:initial_habitat +
  (1 | block_no), family = poisson, data = Data, control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)))

And we make a model selection (skip this step since it takes a while, the “SelectRichness.rds” file is in this github)

options(na.action = "na.fail")

library(doParallel)
cl <- makeCluster(4)
registerDoParallel(cl)

clusterEvalQ(cl, library(lme4))
#;-) [[1]]
#;-) [1] "lme4"      "Matrix"    "stats"     "graphics"  "grDevices" "utils"    
#;-) [7] "datasets"  "methods"   "base"     
#;-) 
#;-) [[2]]
#;-) [1] "lme4"      "Matrix"    "stats"     "graphics"  "grDevices" "utils"    
#;-) [7] "datasets"  "methods"   "base"     
#;-) 
#;-) [[3]]
#;-) [1] "lme4"      "Matrix"    "stats"     "graphics"  "grDevices" "utils"    
#;-) [7] "datasets"  "methods"   "base"     
#;-) 
#;-) [[4]]
#;-) [1] "lme4"      "Matrix"    "stats"     "graphics"  "grDevices" "utils"    
#;-) [7] "datasets"  "methods"   "base"
clusterExport(cl, "Data")

Select <- MuMIn::pdredge(Model, extra = list(R2m = function(x) r.squaredGLMM(x)[1, 1], R2c = function(x) r.squaredGLMM(x)[1, 2]), fixed = ~ YEAR:Treatment, cluster = cl)

stopCluster(cl)

saveRDS(Select, "SelectRichness.rds")

And now we Select the best models, I will do this twice, since the outcome of the subset function will be used to show how the best model does not have issues and the averaged model from get.models which is the result I need is not working

Select <- readRDS("SelectRichness.rds")
Selected <- subset(Select, delta < 2)
SelectedList <- get.models(Select, delta < 2)

Working with the best model works

As specified above the goal is to find if the treatments do yieald differences by year 4, based on the model. So first we will show this with the best model

BestModel <- get.models(Selected, 1)[[1]]

noise.emm <- emmeans(BestModel, pairwise ~ year + initial_habitat + initial_habitat:year + year:treatment, at = list(year = 4), data = Data)

pairs(noise.emm, simple = "treatment") |>
  as.data.frame() |>
  dplyr::filter(p.value < 0.05) |>
  dplyr::arrange(initial_habitat, estimate) |>
  dplyr::select(-SE, -df, -z.ratio) |>
  knitr::kable()
contrast year initial_habitat estimate p.value
PermanentExclosure - Control 4 Forest -0.2193592 3.06e-05
PermanentExclosure - Control 4 Meadow -0.2193592 3.06e-05
PermanentExclosure - Control 4 Rangeland -0.2193592 3.06e-05

Working with the average model does not works

This does not work

AV <- model.avg(SelectedList, fit = TRUE)

noise.emm_av <- emmeans(AV, pairwise ~ year + initial_habitat + initial_habitat:year + year:treatment, at = list(year = 4), data = Data)
#;-) Error in (mth$objs[[1]])(object, trms, xlev, grid, ...): Unable to match model terms


Standard output and standard error
-- nothing to show --
Session info
sessioninfo::session_info()
#;-) ─ Session info ───────────────────────────────────────────────────────────────
#;-)  setting  value
#;-)  version  R version 4.2.2 Patched (2022-11-10 r83330)
#;-)  os       Ubuntu 20.04.5 LTS
#;-)  system   x86_64, linux-gnu
#;-)  ui       X11
#;-)  language en_US:en
#;-)  collate  en_US.UTF-8
#;-)  ctype    en_US.UTF-8
#;-)  tz       Europe/Copenhagen
#;-)  date     2023-02-21
#;-)  pandoc   2.19.2 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown)
#;-) 
#;-) ─ Packages ───────────────────────────────────────────────────────────────────
#;-)  package      * version  date (UTC) lib source
#;-)  boot           1.3-28   2021-05-03 [4] CRAN (R 4.0.5)
#;-)  cli            3.6.0    2023-01-09 [1] CRAN (R 4.2.2)
#;-)  coda           0.19-4   2020-09-30 [3] CRAN (R 4.0.2)
#;-)  codetools      0.2-19   2023-02-01 [4] CRAN (R 4.2.2)
#;-)  digest         0.6.31   2022-12-11 [1] CRAN (R 4.2.2)
#;-)  doParallel   * 1.0.17   2022-02-07 [1] CRAN (R 4.2.1)
#;-)  dplyr          1.1.0    2023-01-29 [1] CRAN (R 4.2.2)
#;-)  emmeans      * 1.8.4-1  2023-01-17 [1] CRAN (R 4.2.2)
#;-)  estimability   1.4.1    2022-08-05 [1] CRAN (R 4.2.1)
#;-)  evaluate       0.20     2023-01-17 [1] CRAN (R 4.2.2)
#;-)  fansi          1.0.4    2023-01-22 [3] CRAN (R 4.2.2)
#;-)  fastmap        1.1.0    2021-01-25 [3] CRAN (R 4.0.3)
#;-)  foreach      * 1.5.2    2022-02-02 [1] CRAN (R 4.2.1)
#;-)  fs             1.6.1    2023-02-06 [3] CRAN (R 4.2.2)
#;-)  generics       0.1.3    2022-07-05 [1] CRAN (R 4.2.1)
#;-)  glue           1.6.2    2022-02-24 [3] CRAN (R 4.1.2)
#;-)  htmltools      0.5.4    2022-12-07 [1] CRAN (R 4.2.2)
#;-)  iterators    * 1.0.14   2022-02-05 [1] CRAN (R 4.2.1)
#;-)  knitr          1.42     2023-01-25 [1] CRAN (R 4.2.2)
#;-)  lattice        0.20-45  2021-09-22 [4] CRAN (R 4.2.0)
#;-)  lifecycle      1.0.3    2022-10-07 [3] CRAN (R 4.2.1)
#;-)  lme4         * 1.1-31   2022-11-01 [1] CRAN (R 4.2.2)
#;-)  magrittr       2.0.3    2022-03-30 [3] CRAN (R 4.1.3)
#;-)  MASS           7.3-58.2 2023-01-23 [4] CRAN (R 4.2.2)
#;-)  Matrix       * 1.5-3    2022-11-11 [4] CRAN (R 4.2.2)
#;-)  minqa          1.2.5    2022-10-19 [3] CRAN (R 4.2.1)
#;-)  multcomp       1.4-20   2022-08-07 [1] CRAN (R 4.2.1)
#;-)  MuMIn        * 1.47.1   2022-09-01 [1] CRAN (R 4.2.2)
#;-)  mvtnorm        1.1-3    2021-10-08 [1] CRAN (R 4.2.1)
#;-)  nlme           3.1-162  2023-01-31 [4] CRAN (R 4.2.2)
#;-)  nloptr         2.0.3    2022-05-26 [3] CRAN (R 4.2.0)
#;-)  pillar         1.8.1    2022-08-19 [1] CRAN (R 4.2.1)
#;-)  pkgconfig      2.0.3    2019-09-22 [3] CRAN (R 4.0.0)
#;-)  purrr          1.0.1    2023-01-10 [1] CRAN (R 4.2.2)
#;-)  R.cache        0.16.0   2022-07-21 [1] CRAN (R 4.2.1)
#;-)  R.methodsS3    1.8.2    2022-06-13 [1] CRAN (R 4.2.1)
#;-)  R.oo           1.25.0   2022-06-12 [1] CRAN (R 4.2.1)
#;-)  R.utils        2.12.2   2022-11-11 [1] CRAN (R 4.2.2)
#;-)  R6             2.5.1    2021-08-19 [3] CRAN (R 4.1.1)
#;-)  Rcpp           1.0.10   2023-01-22 [3] CRAN (R 4.2.2)
#;-)  reprex         2.0.2    2022-08-17 [1] CRAN (R 4.2.2)
#;-)  rlang          1.0.6    2022-09-24 [1] CRAN (R 4.2.1)
#;-)  rmarkdown      2.20     2023-01-19 [1] CRAN (R 4.2.2)
#;-)  rstudioapi     0.14     2022-08-22 [1] CRAN (R 4.2.1)
#;-)  sandwich       3.0-2    2022-06-15 [1] CRAN (R 4.2.1)
#;-)  sessioninfo    1.2.2    2021-12-06 [3] CRAN (R 4.1.2)
#;-)  styler         1.8.1    2022-11-07 [1] CRAN (R 4.2.2)
#;-)  survival       3.5-3    2023-02-12 [4] CRAN (R 4.2.2)
#;-)  TH.data        1.1-1    2022-04-26 [1] CRAN (R 4.2.1)
#;-)  tibble         3.1.8    2022-07-22 [1] CRAN (R 4.2.1)
#;-)  tidyselect     1.2.0    2022-10-10 [1] CRAN (R 4.2.1)
#;-)  utf8           1.2.3    2023-01-31 [3] CRAN (R 4.2.2)
#;-)  vctrs          0.5.2    2023-01-23 [1] CRAN (R 4.2.2)
#;-)  withr          2.5.0    2022-03-03 [3] CRAN (R 4.1.3)
#;-)  xfun           0.37     2023-01-31 [1] CRAN (R 4.2.2)
#;-)  xtable         1.8-4    2019-04-21 [1] CRAN (R 4.2.0)
#;-)  yaml           2.3.7    2023-01-23 [3] CRAN (R 4.2.2)
#;-)  zoo            1.8-11   2022-09-17 [1] CRAN (R 4.2.1)
#;-) 
#;-)  [1] /home/au687614/R/x86_64-pc-linux-gnu-library/4.2
#;-)  [2] /usr/local/lib/R/site-library
#;-)  [3] /usr/lib/R/site-library
#;-)  [4] /usr/lib/R/library
#;-) 
#;-) ──────────────────────────────────────────────────────────────────────────────
Russ Lenth
  • 5,922
  • 2
  • 13
  • 21
Derek Corcoran
  • 3,930
  • 2
  • 25
  • 54
  • Hi, it would be better to provide some data in your post so that it is self-contained (links can be broken in the future) – bretauv Feb 21 '23 at 14:23
  • Thanks I will add it there – Derek Corcoran Feb 21 '23 at 14:30
  • I just realized I had not updated the files in the repo, now it is ready – Derek Corcoran Feb 21 '23 at 18:46
  • It might be worth closing this question, or at least linking to the issue https://github.com/rvlenth/emmeans/issues/402 ; I just spent a small chunk of time working through this before checking and seeing that you and Russ Lenth made a bunch more progress than I did ... – Ben Bolker Feb 24 '23 at 22:40
  • 1
    I’m voting to close this question because it's under active discussion elsewhere at https://github.com/rvlenth/emmeans/issues/402 – Ben Bolker Feb 24 '23 at 22:40
  • I also voted to close. People should refer to the GitHub discussion. – Russ Lenth Feb 28 '23 at 17:48

0 Answers0