I would like to plot on the same graph the interaction between my continuous predictor and my categorical moderator. I know how to do it when both are categorical (factor interaction), but don't really know how to do it when one is continuous and one is categorical.
If you're talking about an interaction in a general linear model (e.g., ANCOVA), and if your categorical moderator has a reasonably small number of levels, you can plot separate regression lines for each level of the moderator. If you want these on the same plot, superimpose them, code by color or line type, and provide a legend. One of your plot's axes will represent the continuous predictor (presumably the horizontal "$x$" axis), and the other will represent the dependent variable, which I'm assuming is continuous. If your categorical predictor (moderator) has more than four levels, that might get a little too busy for one plot, but I'm not aware of a better method for such circumstances that doesn't resort to separate plots for each level.
Just to address the following comment:
thanks! just to clarify, which graph plot exactly do I need to produce for this? Is it a scatter plot with regression line? If so, then I would need to produce 3 different graphs for the 3 different levels of my moderator...how do I put it on the same graph? Also just to clarify that the predicted values take into consideration the adjusted regression with covariates?
Here is how to do it in SPSS. I use the
Employee.sav data as example. Suppose we'd like to use salary as outcome, beginning salary as the continuous predictor and job category as the categorical predictor:
Go to Graph > Legacy > Scatter:
Choose just simple scatter plot is fine. Then, fill in the variables:
You'll then see the scatter plot. Double click on the scatter plot to open the chart editor. At the top, click the icon to "fit lines to subgroups." See pic below:
Now, whether you use the original salary variable as outcome or the predicted salary as outcome adjusted for the other third or more predictors is a matter of your purpose. The original salary will fit better as exploration, while the predicted salary will be more suitable as presenting your regression results.