I want to see the interaction of my model of my two groups S and NS. But the errors keeps coming out. I cannot find why. My code was as bellow.
lms= lm(RSFC_Agebyd_DAN ~ 1 + Age + d + RT + IO + CR + Age:d + Age:RT + Age:IO + Age:CR, data = S)
lmNS = lm(RSFC_Agebyd_DAN ~ 1 + Age + d + RT + IO + CR + Age:d + Age:RT + Age:IO + Age:CR, data = NS)
probe_interaction(lmS,pred=d, modx=Age)
probe_interaction(lmNS, pred=d, modx=Age)
The error message was like this:
Error: ! class must be a character vector, not a list. Backtrace:
- interactions::probe_interaction(lmNS, pred = d, modx = Age)
- interactions::sim_slopes(model = lmNS, modx = Age, pred = d)
- jtools:::summ.lm(...)
- jtools:::do_robust(model, robust, cluster, data, vcov)
- jtools::get_robust_se(...)
- jtools::stop_wrap(...)
- rlang (local)
<fn>
(class = <named list>)
The environment:
packageVersion("interactions") [1] ‘1.1.5’ packageVersion("jtools") [1] ‘2.2.1’
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin17.0 (64-bit)
RStudio 2021.09.2 Build 382 macOS Mojave version 10.14.6
Thank you in advance
I reinstalled R, Rstudio, packages, ... But nothing worked.