# How are interactions calculated in a visualization using the cat_plot function from the interactions package in R?

I have a multilevel model with one significant interaction and several covariates. I understand the results from the summary fairly well, but I'm a bit stumped by the output in the visualization. Here is the output from the model: I used the cat_plot function in the interactions package in R to create the visualization below. The generated values are not exactly what I would expect. The DV is a continuous variable, and the two variables involved in the interaction are categorical. To plot variables like this, I believe I was taught that I can plug in values for each of the variables in question and add up the coefficients, but I get a much larger value than what is indicated in the plot. For example, if I want to calculate the value of someone who received the intervention and was in middle school, I would add up .025 + .043 -.021. This gives me .047 for when intervention =1 and grade_level=middle. The value for this calculation in the plot is just above .02. I'm obviously missing something here or very misguided. Can anyone give me some insight into how the visualization is generated from the model output? TIA

cat_plot(intensity_lme_math_grade_inter_no_year , pred =Intervention  , modx = grade_level, geom = "line", vary.lty = TRUE, x.label="Intervention", y.label = "Score", legend.main="Grade Band") You would also have to add in the (Intercept) value to your calculation to get the type of estimate that you seek. The (Intercept) value holds the key here, as its value of 0.031 represents a situation in which Intervention = 0 and grade_level = "elementary". Yet the plot presents a value on the order of -0.025.
I suspect that the discrepancy has to do with how the plotting software is handling the data values associated with other predictors (the perc_ coefficients), each of which is a necessarily non-negative value with a negative regression coefficient. The software is presumably using some average over the data in your model or is otherwise centering some aspect of your data. Software-specific questions are off-topic here, so you might enquire of the package author if that's not clear from the manual.