Open msonderegger opened 3 years ago
In case anyone else has this issue -- I think an equivalent manual workaround is to use marginal_effects
(which works), then take column means. For the example above:
marginal_effects(fm1, sleepstudy) %>% lapply(.,mean)
$dydx_Days
[1] 10.46729
Please specify whether your issue is about:
Thank you for the excellent package! I think there may be a bug in
(g)lmer
models with non-linear functions of predictors.Here is a minimal reproducible example:
The same error occurs if I use
splines::ns
in the model formula instead ofns
. The same issue happens usingstats::poly
instead ofsplines::ns
, but not usinglog(Days+1)
instead ofns(Days,2)
. Howeverns
,poly
, etc. functionality does work forlm
models inmargins
, which makes me think this may be a bug?Session info and traceback: