rr-marginaleffects

Marginaleffects - obtaining contrasts and plotting predictions


Using marginaleffects, I was trying to

  1. obtain contrasts by "period"
  2. visualize the predictions by "period"
  3. visualize the predictions by "session"

And failed in all! Any help is appreciated.

Df in the end

library(lme4)
library(lmerTest)
library(marginaleffects)
library(dplyr)

import dat_long
dat_long$group <- as.factor(dat_long$group)
dat_long$period <- as.factor(dat_long$period)


dat_long <- dat_long %>% 
  mutate(group2 = group)


m222 <- lmer(money ~ session + period + group2 + (1 | id2) + (1 | session / date / period), data = dat_long ) 
summary(m222)

contrasts_periods <- comparisons(
  m222,
  variables = "period",
  include_random = FALSE,
  newdata = datagrid(
    period = c("p1", "p2", "p3", "p4")
  )
)
 

#2

    pred_period <- predictions(  m222,
                          newdata = datagrid(id2 = NA,
                                             period = c("p1", "p2", "p3", "p4"),
                                             include_random = FALSE))




    ggplot(pred, aes(x = period, y = predicted,
                     ymin = conf.low, ymax = conf.high))

  

#3


pred_session <- predictions(  m222,
                             newdata = datagrid(id2 = NA,
                                                session = seq(from = 16, to = 38, by = 1),
                                                include_random = FALSE))

error codes:

Error: Unable to compute predicted values with this model. You can
try to supply a different dataset to the newdata argument. If this does not work, you can file a report on the Github Issue Tracker:
https://github.com/vincentarelbundock/marginaleffects/issues

Error: Unable to compute predicted values with this model. You can try to supply a different dataset to the newdata argument. If this does not work, you can file a report on the Github Issue Tracker:
https://github.com/vincentarelbundock/marginaleffects/issues

This error was also raised: Invalid grouping factor specification, id2 In addition: Warning message: Some of the variable names are missing from the model data: include_random

df below:

dat_long  <- structure(list(money = c(22625, 23349, 18189, 16302, 12874, 17343, 
15912, 15300, 18762, 23506, 18290, 10296, 13172, 15288, 12462, 
16380, 14352, 15052, 14497, 16241, 14832, 14304, 15120, 3745, 
15012, 13916, 13056, 12432, 12441, 15762, 10660, 18150, 15496, 
16905, 14872, 16166, 15892, 18755, 16241, 16874, 15836, 15225, 
32190, 30450, 25200, 19840, 31800, 29892, 10416, 26520, 29029, 
28623, 26544, 16988, 22801, 19317, 30694, 20447, 26030, 22378, 
27267, 21760, 26334, 26896, 32085, 28914, 26892, 18683, 19468, 
16920, 17640, 20829, 17920, 17424, 20538, 21760, 14985, 13407, 
13624, 15470, 21252, 15129, 21336, 17760, 22908, 16940, 15860, 
17732, 18048, 16002, 18480, 20328, 22848, 19630, 17030, 24220, 
16074, 20234, 20413, 20448, 23715, 22010, 24000, 25245, 23088, 
16445, 22200, 24786, 20100, 17766, 20022, 22194, 16284, 23560, 
16638, 23345, 26788, 21462, 16786, 16362, 22176, 21600, 21744, 
21432, 19026, 22330, 20049, 19968, 18876, 20850, 19126, 18788, 
19650, 24320, 17100, 22785, 18875, 23520, 21252, 17766, 20304, 
19170, 17780, 19296, 15855, 16244, 19875, 18476, 16284, 17780, 
14279, 20562, 17556, 17568, 20700, 19750, 22401, 19625, 20264, 
18176, 19272, 24180, 21855, 22490, 22560, 19599, 20550, 17856, 
20670, 18768, 20385, 17856, 16891, 18081, 18755, 18796, 21450, 
18576, 16263, 18460, 16616, 16992, 17250, 18995, 21021, 20368, 
17536, 18626, 11742, 15872, 19684, 17250, 15616, 17176, 17653, 
17690, 19890, 18054, 17760, 17346, 17316, 17316, 16610, 15428, 
19950, 17424, 18720, 18029, 20724, 21574, 21632, 23584, 22059, 
17741, 19328, 21120, 18029, 20295, 21679, 19803, 16157, 20250, 
21870, 15052, 19782, 21528, 22275, 21285, 17787, 19635, 20768, 
19965, 19203, 21666, 23472, 22270, 21528, 14900, 14070, 15120, 
18306, 15707, 17810, 18630, 13552, 20691, 18375, 21376, 17732, 
16512, 16896, 22410, 22022, 27512, 18796, 26274, 19877, 24462, 
29722, 21823, 18834, 23856, 22491, 23055, 26568, 19096, 20944, 
21320, 21140, 20124, 17415, 15776, 20034, 20698, 19723, 19845, 
22139, 17272, 18720, 23616, 18144, 21312, 20150, 13560, 13560, 
15470, 19458, 18944, 19044, 16129, 18354, 23400, 20155, 18161, 
19881, 20002, 21060, 20436, 16637, 16968, 15656, 12870, 17767, 
17160, 17549, 15696, 18860, 22116, 14602, 20648, 20680, 17549, 
19184, 21756, 23718, 24742, 22848, 18511, 23230, 22987, 25480, 
26064, 18300, 18161, 18300, 17628, 18720, 24072, 23760, 21672, 
20060, 20280, 20482, 18620, 20160, 16764, 15990, 19328, 18125, 
18864, 12870, 13899, 16254, 16891, 14742, 16482, 16520, 14278, 
16074, 16610, 14848, 16002, 16675, 18850, 14964, 15738, 13254, 
18720, 17135, 21352, 17040, 14784, 20592, 19044, 20770, 18560, 
13800, 12996, 16256, 18476, 20572, 20445, 16576, 14319, 17408, 
16128, 16124, 16065, 14756, 12432, 15029, 21352, 17810, 19932, 
18495, 14720, 22914, 17063, 15645, 20735, 22960, 22925, 19845, 
15708, 21942, 27531, 20850, 22475, 22484, 22140, 15260, 21106, 
19817, 15360, 18480, 14586, 20433, 20838, 23881, 21679, 17612, 
19952, 17856, 23560, 19311, 19728, 18850, 18560, 20139, 15840, 
14824, 11210, 19728, 14784, 15065, 22638, 18216, 26219, 22797, 
37047, 20687, 22176, 19519, 18492, 13516, 18327, 15616, 16616, 
24928, 19840, 20838, 18460, 19176, 17825, 16950, 16786, 23254, 
20655, 19352, 22632, 19684, 15312, 16770, 17010, 16464, 17135, 
16568, 15494, 18327, 17136, 19221, 16166, 18944, 16541, 15622, 
13746, 19720, 16640, 16303, 17690, 15132, 14400, 14060, 14835, 
13320, 14322, 13860, 14796, 14946, 14790, 12600, 19460, 16940, 
15708, 18176, 16080, 18161, 14260, 18358, 14632, 16482, 19964, 
22218, 20139, 19040, 15368, 19880, 17286, 17388, 20424, 17400, 
16445, 18760, 16958, 13334, 10608, 5940, 23068, 20300, 20944, 
22046, 23256, 19418, 19456, 20328, 20536, 17343, 18161, 18070, 
22632, 21624, 22620, 23850, 21840, 20174, 18250, 20172, 15260, 
18120, 15038, 18445, 15048, 19456, 20328, 20536, 17343, 15594, 
14124, 12862, 16899, 17160, 15080, 12971, 16430, 13356, 12947, 
14430, 16764, 17136, 21965, 15729, 18000, 14304, 14214, 19470, 
17380, 14688, 17666, 16470, 17334, 14976, 14688, 26196, 25993, 
22704, 24639, 19352, 22188, 21924, 18271, 20240, 14874, 16320, 
13923, 26989, 24464, 24830, 20320, 21195, 20212, 17168, 18612, 
19454, 15510, 25277, 19872, 21033, 20808, 20824, 23250, 16002, 
18492, 18900, 20413, 17446, 20124, 24257, 19557, 23919, 25610, 
17490, 16157, 17545, 18370, 21357, 23058, 21888, 18796, 22388, 
18200, 19140, 21808, 19844, 19530, 21879, 22880, 19239, 22230, 
23166, 18871, 17480, 17199, 16874, 24206, 13224, 16905, 11322, 
17880, 19536, 13910, 15972, 17145, 16750, 16226, 15972, 14875, 
15128, 14756, 15972, 14875, 15128, 14756, 17112, 21312, 19126, 
17556, 20276, 17100, 18972, 15429, 17820, 17024, 16641, 17135, 
16714, 17324, 14125, 13080, 13189, 16000, 15006, 16740, 16092, 
17908, 14626, 14859, 15744, 15113, 17292, 13804, 14541, 15113, 
17292, 13804, 14541, 22308, 20736, 17958, 14976, 15410, 14762, 
14803, 18900, 17792, 19448, 16872, 17013, 14040, 14840, 16520, 
14224, 17908, 13462, 16874, 16675, 14715, 16263, 16440, 14317, 
17082, 13764, 17052, 18120, 17442, 12838, 2322, 14637, 14934, 
20066, 19520, 17880, 19304, 16422, 17526, 21420, 16254, 18090, 
14803, 14874, 16320, 13923, 19328, 20592, 17152, 21573, 19716, 
19800, 17792, 16896, 15128, 16899, 16510, 16375, 15488, 16974, 
15151, 17980, 15946, 20856, 21158, 17493, 19539, 19488, 21060, 
19840, 18352, 16974, 20034, 18997, 16758, 16046, 20034, 18997, 
16758, 16046, 18600, 19939, 18603, 15184, 20829, 19096, 19630, 
15012, 21384, 16750, 18029, 15410, 18724, 14580, 13420, 17664, 
16206, 1595, 16675, 17822, 16348, 19304, 17136, 17136, 15812, 
12648, 20961, 18544, 11748, 14763, 16758, 16046, 11748, 14763, 
11660, 17589, 19200, 19588, 20727, 10725, 13870, 17374, 12354, 
16214, 22101, 21080, 21525, 20125, 19434, 19800, 20125, 19434, 
19800, 21054, 19800, 24250, 20196, 21175, 24790, 18318, 24024, 
25004, 20083, 18144, 23976, 26660, 18688, 23520, 20304, 19832, 
19360, 18228, 18921, 20800, 21038, 19873, 22468, 17666, 13635
), session = c(34, 34, 34, 17, 17, 19, 19, 19, 21, 21, 21, 24, 
24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 33, 
33, 33, 33, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 18, 19, 
19, 19, 21, 21, 21, 23, 24, 24, 24, 24, 26, 26, 27, 27, 27, 34, 
34, 34, 36, 36, 38, 38, 38, 17, 17, 17, 18, 18, 18, 21, 21, 21, 
22, 22, 22, 23, 23, 23, 25, 25, 25, 25, 26, 26, 26, 27, 27, 27, 
37, 37, 37, 38, 38, 38, 38, 16, 16, 16, 18, 18, 18, 19, 19, 19, 
21, 21, 21, 23, 23, 23, 23, 25, 25, 26, 26, 26, 26, 32, 32, 32, 
32, 33, 33, 33, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 16, 
16, 16, 17, 17, 17, 21, 21, 21, 21, 23, 23, 25, 25, 25, 26, 26, 
32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 34, 35, 35, 38, 38, 38, 
17, 17, 17, 18, 18, 21, 21, 23, 23, 23, 23, 25, 25, 25, 26, 26, 
26, 26, 32, 32, 32, 34, 34, 34, 35, 35, 35, 35, 16, 19, 19, 16, 
16, 16, 17, 17, 19, 19, 21, 21, 21, 21, 22, 22, 22, 27, 27, 27, 
27, 32, 32, 32, 32, 33, 33, 33, 33, 35, 35, 35, 35, 36, 36, 36, 
36, 16, 16, 16, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 
23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 27, 32, 
32, 33, 33, 33, 34, 34, 35, 35, 35, 19, 19, 19, 23, 23, 23, 24, 
24, 24, 24, 25, 25, 25, 27, 27, 27, 27, 33, 33, 33, 37, 37, 23, 
23, 23, 38, 38, 16, 16, 16, 17, 17, 17, 18, 18, 18, 21, 21, 21, 
22, 22, 23, 23, 23, 24, 16, 18, 19, 19, 19, 20, 20, 20, 22, 23, 
24, 16, 16, 16, 18, 18, 18, 19, 19, 19, 22, 22, 22, 23, 23, 23, 
23, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 
32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 
38, 38, 38, 17, 17, 17, 18, 18, 18, 20, 20, 20, 21, 21, 21, 22, 
22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 35, 35, 35, 36, 36, 36, 
36, 37, 37, 16, 17, 17, 17, 18, 18, 18, 19, 19, 21, 23, 23, 23, 
25, 25, 25, 25, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 35, 35, 
35, 35, 36, 36, 36, 36, 38, 38, 38, 38, 16, 16, 16, 19, 19, 19, 
20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 25, 25, 35, 
35, 36, 36, 36, 36, 37, 37, 37, 23, 16, 16, 16, 19, 19, 19, 21, 
21, 21, 21, 31, 31, 31, 32, 32, 32, 32, 34, 34, 36, 36, 36, 16, 
16, 22, 22, 22, 22, 24, 24, 24, 24, 28, 28, 28, 34, 34, 34, 37, 
37, 37, 16, 16, 16, 21, 21, 21, 25, 25, 25, 25, 30, 30, 30, 30, 
31, 31, 31, 32, 32, 32, 36, 36, 36, 16, 16, 16, 20, 20, 34, 34, 
34, 35, 35, 17, 17, 17, 18, 21, 21, 21, 23, 23, 23, 23, 26, 26, 
26, 26, 27, 27, 29, 29, 29, 30, 30, 30, 30, 32, 32, 32, 33, 34, 
34, 34, 35, 35, 36, 36, 36, 17, 17, 17, 19, 19, 23, 23, 23, 26, 
26, 27, 27, 27, 29, 30, 30, 31, 31, 31, 32, 32, 32, 32, 34, 34, 
34, 35, 37, 37, 17, 17, 17, 21, 21, 21, 21, 23, 23, 23, 24, 24, 
24, 24, 25, 25, 25, 25, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 
30, 30, 31, 31, 31, 31, 33, 33, 33, 35, 35, 17, 17, 17, 18, 24, 
24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 33, 33, 33, 36, 18, 
18, 18, 20, 20, 20, 26, 26, 27, 27, 27, 28, 28, 28, 28, 31, 31, 
31, 33, 33, 33, 37, 37, 37, 18, 18, 18, 21, 21, 21, 21, 22, 22, 
22, 26, 26, 26, 26, 27, 27, 27, 29, 29, 29, 29, 30, 30, 30, 30, 
31, 31, 31, 31, 33, 33, 18, 18, 18, 19, 19, 19, 22, 22, 22, 24, 
24, 24, 24, 25, 25, 25, 25, 27, 27, 27, 27, 29, 29, 29, 29, 30, 
30, 30, 30, 32, 32, 32, 32, 34, 34, 34, 35, 35, 37, 37, 37, 22, 
22, 22, 22, 24, 24, 24, 24, 25, 25, 25, 25, 28, 28, 28, 28, 35, 
37, 37, 37, 19, 22, 22, 24, 24, 24, 25, 25, 25, 26, 26, 28, 28, 
28, 32, 32, 32, 33, 35, 36, 20, 20, 20, 23, 23, 23, 27, 27, 29, 
29, 29, 36, 36, 20, 28), period = structure(c(1L, 2L, 4L, 1L, 
2L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 
2L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 
2L, 3L, 4L, 1L, 2L, 3L, 1L, 1L, 2L, 3L, 2L, 3L, 4L, 4L, 1L, 2L, 
3L, 4L, 3L, 4L, 1L, 3L, 4L, 1L, 2L, 3L, 2L, 4L, 1L, 2L, 4L, 1L, 
2L, 3L, 1L, 2L, 3L, 2L, 3L, 4L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 
3L, 4L, 1L, 2L, 4L, 2L, 3L, 4L, 1L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10, 10, 10, 10, 10, 11, 11, 11, 11, 
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 
11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 
14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 
18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 
19, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 
23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 
25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 
27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 
28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 
29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 
30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 
31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 
31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
33, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 
35), date = c(34, 34, 34, 17, 17, 19, 19, 19, 21, 21, 21, 24, 
24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 33, 
33, 33, 33, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 18, 19, 
19, 19, 21, 21, 21, 23, 24, 24, 24, 24, 26, 26, 27, 27, 27, 34, 
34, 34, 36, 36, 38, 38, 38, 17, 17, 17, 18, 18, 18, 21, 21, 21, 
22, 22, 22, 23, 23, 23, 25, 25, 25, 25, 26, 26, 26, 27, 27, 27, 
37, 37, 37, 38, 38, 38, 38, 16, 16, 16, 18, 18, 18, 19, 19, 19, 
21, 21, 21, 23, 23, 23, 23, 25, 25, 26, 26, 26, 26, 32, 32, 32, 
32, 33, 33, 33, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 16, 
16, 16, 17, 17, 17, 21, 21, 21, 21, 23, 23, 25, 25, 25, 26, 26, 
32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 34, 35, 35, 38, 38, 38, 
17, 17, 17, 18, 18, 21, 21, 23, 23, 23, 23, 25, 25, 25, 26, 26, 
26, 26, 32, 32, 32, 34, 34, 34, 35, 35, 35, 35, 16, 19, 19, 16, 
16, 16, 17, 17, 19, 19, 21, 21, 21, 21, 22, 22, 22, 27, 27, 27, 
27, 32, 32, 32, 32, 33, 33, 33, 33, 35, 35, 35, 35, 36, 36, 36, 
36, 16, 16, 16, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 
23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 27, 32, 
32, 33, 33, 33, 34, 34, 35, 35, 35, 19, 19, 19, 23, 23, 23, 24, 
24, 24, 24, 25, 25, 25, 27, 27, 27, 27, 33, 33, 33, 37, 37, 23, 
23, 23, 38, 38, 16, 16, 16, 17, 17, 17, 18, 18, 18, 21, 21, 21, 
22, 22, 23, 23, 23, 24, 16, 18, 19, 19, 19, 20, 20, 20, 22, 23, 
24, 16, 16, 16, 18, 18, 18, 19, 19, 19, 22, 22, 22, 23, 23, 23, 
23, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 
32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 
38, 38, 38, 17, 17, 17, 18, 18, 18, 20, 20, 20, 21, 21, 21, 22, 
22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 35, 35, 35, 36, 36, 36, 
36, 37, 37, 16, 17, 17, 17, 18, 18, 18, 19, 19, 21, 23, 23, 23, 
25, 25, 25, 25, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 35, 35, 
35, 35, 36, 36, 36, 36, 38, 38, 38, 38, 16, 16, 16, 19, 19, 19, 
20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 25, 25, 35, 
35, 36, 36, 36, 36, 37, 37, 37, 23, 32, 32, 32, 38, 38, 38, 42, 
42, 42, 42, 62, 62, 62, 64, 64, 64, 64, 68, 68, 72, 72, 72, 32, 
32, 44, 44, 44, 44, 48, 48, 48, 48, 56, 56, 56, 68, 68, 68, 74, 
74, 74, 32, 32, 32, 42, 42, 42, 50, 50, 50, 50, 60, 60, 60, 60, 
62, 62, 62, 64, 64, 64, 72, 72, 72, 32, 32, 32, 40, 40, 68, 68, 
68, 70, 70, 34, 34, 34, 36, 42, 42, 42, 46, 46, 46, 46, 52, 52, 
52, 52, 54, 54, 58, 58, 58, 60, 60, 60, 60, 64, 64, 64, 66, 68, 
68, 68, 70, 70, 72, 72, 72, 34, 34, 34, 38, 38, 46, 46, 46, 52, 
52, 54, 54, 54, 58, 60, 60, 62, 62, 62, 64, 64, 64, 64, 68, 68, 
68, 70, 74, 74, 34, 34, 34, 42, 42, 42, 42, 46, 46, 46, 48, 48, 
48, 48, 50, 50, 50, 50, 56, 56, 56, 56, 58, 58, 58, 58, 60, 60, 
60, 60, 62, 62, 62, 62, 66, 66, 66, 70, 70, 34, 34, 34, 36, 48, 
48, 48, 48, 50, 50, 50, 50, 52, 52, 52, 52, 66, 66, 66, 72, 36, 
36, 36, 40, 40, 40, 52, 52, 54, 54, 54, 56, 56, 56, 56, 62, 62, 
62, 66, 66, 66, 74, 74, 74, 36, 36, 36, 42, 42, 42, 42, 44, 44, 
44, 52, 52, 52, 52, 54, 54, 54, 58, 58, 58, 58, 60, 60, 60, 60, 
62, 62, 62, 62, 66, 66, 36, 36, 36, 38, 38, 38, 44, 44, 44, 48, 
48, 48, 48, 50, 50, 50, 50, 54, 54, 54, 54, 58, 58, 58, 58, 60, 
60, 60, 60, 64, 64, 64, 64, 68, 68, 68, 70, 70, 74, 74, 74, 44, 
44, 44, 44, 48, 48, 48, 48, 50, 50, 50, 50, 56, 56, 56, 56, 70, 
74, 74, 74, 38, 44, 44, 48, 48, 48, 50, 50, 50, 52, 52, 56, 56, 
56, 64, 64, 64, 66, 70, 72, 40, 40, 40, 46, 46, 46, 54, 54, 58, 
58, 58, 72, 72, 40, 56)), row.names = c(NA, -834L), class = c("tbl_df", 
"tbl", "data.frame"))

Solution

  • This answer uses the development version (0.9.0.9043) of marginaleffects, which you can install by following the instructions here: https://vincentarelbundock.github.io/marginaleffects/

    Please note that the extra lme4-related arguments must be supplied to the predictions() function, and not to the datagrid() function as you do in your second example.

    Also, I strongly suggest you avoid include_random and use the default arguments supplied by the lme4 modelling package itself (via predict.merMod). In this case: re.form and allow.new.levels.

    library(lme4)
    library(lmerTest)
    library(marginaleffects)
    library(dplyr)
    
    dat_long$group <- as.factor(dat_long$group)
    dat_long$period <- as.factor(dat_long$period)
    dat_long <- dat_long %>% mutate(group2 = group)
    
    m222 <- lmer(money ~ session + period + group2 + (1 | id2) + (1 | session / date / period), data = dat_long ) 
    
    comparisons(
        m222,
        variables = "period",
        re.form = NA,
        newdata = datagrid(period = c("p1", "p2", "p3", "p4")))
    # 
    #    Term Contrast Estimate Std. Error      z   Pr(>|z|)   2.5 % 97.5 % session group2 id2     date
    #  period  p2 - p1   -361.6      260.0 -1.391  0.1643688  -871.3  148.1      23    int  16 37.90168
    #  period  p2 - p1   -361.6      260.0 -1.391  0.1643688  -871.3  148.1      23    int  16 37.90168
    #  period  p2 - p1   -361.6      260.0 -1.391  0.1643688  -871.3  148.1      23    int  16 37.90168
    #  period  p2 - p1   -361.6      260.0 -1.391  0.1643688  -871.3  148.1      23    int  16 37.90168
    #  period  p3 - p1   -745.6      260.0 -2.868  0.0041366 -1255.3 -236.0      23    int  16 37.90168
    #  period  p3 - p1   -745.6      260.0 -2.868  0.0041366 -1255.3 -236.0      23    int  16 37.90168
    #  period  p3 - p1   -745.6      260.0 -2.868  0.0041366 -1255.3 -236.0      23    int  16 37.90168
    #  period  p3 - p1   -745.6      260.0 -2.868  0.0041366 -1255.3 -236.0      23    int  16 37.90168
    #  period  p4 - p1  -1371.6      318.4 -4.308 1.6492e-05 -1995.6 -747.5      23    int  16 37.90168
    #  period  p4 - p1  -1371.6      318.4 -4.308 1.6492e-05 -1995.6 -747.5      23    int  16 37.90168
    #  period  p4 - p1  -1371.6      318.4 -4.308 1.6492e-05 -1995.6 -747.5      23    int  16 37.90168
    #  period  p4 - p1  -1371.6      318.4 -4.308 1.6492e-05 -1995.6 -747.5      23    int  16 37.90168
    # 
    # Prediction type:  response 
    # Columns: rowid, type, term, contrast, estimate, std.error, statistic, p.value, conf.low, conf.high, predicted, predicted_hi, predicted_lo, money, session, group2, id2, date, period
    
    predictions(
        m222,
        newdata = datagrid(
            id2 = NA,
            session = seq(from = 16, to = 38, by = 1)),
        re.form = NA,
        allow.new.levels = TRUE)
    # 
    #  Estimate Std. Error     z   Pr(>|z|) 2.5 % 97.5 % period group2     date id2 session
    #     19654      656.1 29.96 < 2.22e-16 18368  20940     p1    int 37.90168  NA      16
    #     19649      647.4 30.35 < 2.22e-16 18380  20917     p1    int 37.90168  NA      17
    #     19643      639.5 30.72 < 2.22e-16 18390  20896     p1    int 37.90168  NA      18
    #     19637      632.5 31.05 < 2.22e-16 18398  20877     p1    int 37.90168  NA      19
    #     19632      626.2 31.35 < 2.22e-16 18404  20859     p1    int 37.90168  NA      20
    #     19626      620.9 31.61 < 2.22e-16 18409  20843     p1    int 37.90168  NA      21
    #     19621      616.5 31.83 < 2.22e-16 18412  20829     p1    int 37.90168  NA      22
    #     19615      613.0 32.00 < 2.22e-16 18414  20817     p1    int 37.90168  NA      23
    #     19610      610.5 32.12 < 2.22e-16 18413  20806     p1    int 37.90168  NA      24
    #     19604      608.9 32.20 < 2.22e-16 18411  20798     p1    int 37.90168  NA      25
    #     19599      608.2 32.22 < 2.22e-16 18406  20791     p1    int 37.90168  NA      26
    #     19593      608.6 32.19 < 2.22e-16 18400  20786     p1    int 37.90168  NA      27
    #     19587      609.9 32.12 < 2.22e-16 18392  20783     p1    int 37.90168  NA      28
    #     19582      612.1 31.99 < 2.22e-16 18382  20782     p1    int 37.90168  NA      29
    #     19576      615.3 31.82 < 2.22e-16 18370  20782     p1    int 37.90168  NA      30
    #     19571      619.4 31.60 < 2.22e-16 18357  20785     p1    int 37.90168  NA      31
    #     19565      624.4 31.33 < 2.22e-16 18341  20789     p1    int 37.90168  NA      32
    #     19560      630.4 31.03 < 2.22e-16 18324  20795     p1    int 37.90168  NA      33
    #     19554      637.1 30.69 < 2.22e-16 18305  20803     p1    int 37.90168  NA      34
    #     19549      644.8 30.32 < 2.22e-16 18285  20812     p1    int 37.90168  NA      35
    #     19543      653.2 29.92 < 2.22e-16 18263  20823     p1    int 37.90168  NA      36
    #     19538      662.4 29.49 < 2.22e-16 18239  20836     p1    int 37.90168  NA      37
    #     19532      672.4 29.05 < 2.22e-16 18214  20850     p1    int 37.90168  NA      38
    # 
    # Prediction type:  response 
    # Columns: rowid, type, estimate, std.error, statistic, p.value, conf.low, conf.high, money, period, group2, date, id2, session