I need to carry out a hierarchical multiple regression. My data consists of one continuous dependent variable, 2 continuous predictor variables and a categorical IV with 3 levels.I need to assess whether an interaction effect occurs between each of the continuous predictor variables and the categorical IV in predicting my DV. I have read that it is necessary to dummy code k-1 variables with k being the number of levels in the categorical variable, is this correct in my case? If so then I would have 2 binary dummy variables.

To create the interaction term do I then multiply my predictor variable x dummyvariable1 x dummyvariable2 and enter this term in the model? Or do I create 2 interaction terms: 1 created by multiplying my predictor x dummyvariable 1 and another by multiplying my predictor x dummyvariable2 and then enter both of these terms in the model simultaneously? I am an undergrad psychology student so I don't have a great knowledge of stats and have struggled to find an answer to this question in my reading that I can understand. I will be using SPSS. Any help would be really appreciated, even if you could direct me to some reading. Thanks!


2 Answers 2


You can definitely do that. you can introduce your categorical variable as a factorial one. If you have decided to use R programming this following code would be fine:


Then, you can interact the new categorical variable with other independent ones. You also could find examples centered around your problem in Modern Applied Statistics with S-PLUS by Venables and Ripley. However, if you are not willing to use R, you can still read its examples about regression which are beneficial for figuring out how to solve your problem.


With regard to the following: "In social sciences textbooks (e.g., Cohen, Cohen, West, and Aiken), hierarchical regression refers to a simple OLS regression in which predictors are entered in some order (presumably based on theory) and then increments in explained variance and changes in regression coefficients are evaluated."

I suppose it's ANCOVA with a factor variable and two covariates with interactions between factor and both covariates in R it would be:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.