RegVal2025: Predicted values in regression analysis with interactions
René Ziegler
(February 2025)
Data analysis often involves running moderated regression analyses to test for interactive effects of
(a) two or more continuous variables or
(b) one or more continuous variables with one or more categorical variables
on some dependent measure.
When an interaction is significant in a moderated regression analysis, it is important to understand what the interaction "looks like". In the case of analysis of variance (ANOVA), output from software programs easily delivers relevant means. However, such output is not readily available in the case of interactions involving one or more continuous independent (or predictor) variables. In fact, in such cases there are no “means”. Rather, what is of interest in these cases is the values predicted regarding the dependent variable by the regression model.
For this reason, years ago I have programmed a tool that calculates predicted values based on the results of a moderated regression analysis. As of February 2025, the tool is available in an updated version. The readme-file shows in detail how the program can be used (you also find it in the zip-file, see below).
Features of the tool:
- It can handle up to five independent variables.
- The five independent variables can be any mix of categorical and continuous variables (they can also be all continuous variables or all categorical variables).
- Each categorical variable can have up to five levels.
- The program is written for the case of a full factorial model, that is, the model contains all main effects and interactions.
- When the relevant information to calculate predicted values has been entered ('Data entry' Mode), an Excel file will be saved that contains both the entered data and the predicted values.
- Perhaps most important: Once this has been done, changes can be made in the Excel file, and predicted values can be recalculated by reading data from the Excel file ('Read data from file' Mode).
Given this last feature, the program may be helpful, for instance, in those cases in which the same regression equation (i.e., containing the same set of predictors) is tested repeatedly (e.g. with the final rather than a preliminary sample or with a different dependent variable).
To make use of it, you can download the zip-file by clicking on this LINK. You then need to first extract the files (i.e. unpack or unzip the file) onto your computer. In the folder, double-click “setup.exe”.
BEWARE: Probably the operating system of your computer says something like “Windows has protected your computer” because of an “unknown app”. You need to click on “Further information” where you get informed that the publisher of the app is unknown. Click on “Run anyway”. You will then be warned again that the publisher cannot be verified. Nonetheless, click “install”.
It may then also be that your virus protection software intervenes to make sure that the installation does not infect your computer with some virus. Whatever your virus protection software may suggest, you may savely install the program.
The reason for all these warnings is that it is normal nowadays that software publishers pay some certification authority to validate that the software or code is digitally signed. As of February 2025, such a digital identity verification process costs about 200 Euros (per year). I hope you can understand that I hesitate to invest such a non-trivial amount of money in a scientific tool available free of charge.
For two rather simple cases, you may also download one of two Excel files in which you can enter the necessary information and directly use the 'Read data from file' Mode of the tool. To do so, first click on the Excel file and save it on your computer. Also install the tool on your computer. Then open the Excel file, enter the necessary information, and run the read-from-file mode of the tool.
One Excel file is prepared for the case of one continuous independent variable and one categorical independent variable with two levels (2-way).
The other Excel file is prepared for the case of one continuous independent variable and two categorical independent variables each having two levels (3-way).
If you like, send me an e-mail as to your thoughts about and experience with the tool. In order to use the tool, save the zip-file on your computer and install it by running the setup file.
You may also be interested in the pages by Jeremy Dawson, Kristopher Preacher and David Kenny .
DISCLAIMER: I have aimed to assure that the computations done by the tool are correct. Nonetheless, I cannot accept any responsibility for any negative consequences that might result from it's use. I offer the tool to you 'as is'.