# How to do a moderation analysis with dichotomous IV, continuous MV and continuous DV

I’m trying to do my data analysis (SPSS) for my thesis and I’ve been stuck for days. My supervisors also don’t know what test is best or they don’t respond to emails.

I have 1 continuous MV (sleep score), 1 dichotomous IV (2 different samples), and 1 continuous DV (school test score).

I wanted to compare the two samples sleep score on their school test score. My supervisor told me to do a moderation analysis with sleep score as my moderator. I could not figure out how to do a moderation analysis with a continuous MV and a dichotomous IV. So I switched the variables because I’m at the point where changing my aim seems like a good idea.

I was using moderation analysis because my supervisor told me it was better than 2 analysis for each group independently.

Can someone please explain how to do a moderation analysis with 1 continuous IV, 1 dichotomous MV, and 1 continuous variable? Or what test to use if I were run analysis for each sample independently.

## 1 Answer

You can use moderated multiple linear regression. In the regression equation, you enter your continuous MV (possibly centered in case the variable does not have a meaningful zero point), dichotomous IV (categories dummy-coded with values 0 and 1) and a product variable MV*IV (possibly centering MV prior to computing the product variable) as predictor variables. The regression slope coefficient for the product (interaction) term tells you whether your groups differ in the slopes of the regression of the DV on the continuous MV (i.e., whether there is moderation/an interaction). See

Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences (3rd ed.). Lawrence Erlbaum Associates Publishers.

https://statistics.laerd.com/spss-tutorials/dichotomous-moderator-analysis-using-spss-statistics.php