interactions icon indicating copy to clipboard operation
interactions copied to clipboard

Unable to plot interaction of plm output

Open soominoh1 opened this issue 5 years ago • 1 comments

Hello. I'm trying to plot the interaction of a plm output, but it keeps giving me the following error. I've tried uninstalling and reinstalling R and the packages therein, but to no avail. Would you be so kind as to help figure out what is happening? Your help is much appreciated. Thank you!

Model run: plm(data = data, formula = y ~ x1 + x2 + x1*x2, model = "within", index = c("grp", "year")))

Error: ~does not appear to be a one- or two-sided formula. y does not appear to be a one- or two-sided formula. x1 + x2 + x1 * x2 does not appear to be a one- or two-sided formula. Backtrace:

  1. interactions::interact_plot(...)
  2. jtools::get_data(model, warn = TRUE, ...)
  3. jtools:::get_lhs(formula)

soominoh1 avatar Nov 23 '20 10:11 soominoh1

I will look into this. Generating predictions from such models can be a little more complicated than it appears and I don't want to give bad results.

jacob-long avatar Apr 18 '22 04:04 jacob-long