currently I'm in my master(I'm still a beginner in r) and I've run into an error I can't figure out by myself. I've ran a moderation model (out0) and afterwards I centered it around 0, 10 and 20 and looked at their Simple Slopes. I want to do the same using the RockChalk package in r.
out0 = lm(msq2$TA ~ EA * NegAff + PA, data = msq2)
range(msq2$NegAff) #0:28
plotOut1 <- plotSlopes(out0,
plotx = "EA",
modx = "NegAff",
modxVals = seq(0, 20, 10), #we are centering from 0 to 20 in steps of 10
plotPoints = TRUE)
I did this with another dataset and that worked out fine. However, I get this message warning right now:
Error in model.frame.default(myfmla, dataOrig, na.action = na.action) :
invalid type (list) for variable 'msq2'
In addition: Warning message:
Using formula(x) is deprecated when x is a character vector of length > 1.
Consider formula(paste(x, collapse = " ")) instead.
Could someone please tell me where I'm making a mistake? I assume it is in the way I formulated modxVals but I used different values and that did not work