Ive been asked to perform a multiple linear regression of one dependant variable with several independent variables two of which are categorical. One has 3 options and the other has 5. I'm familiar with the process for one categorical variable in which you can recode with several dummy variables then you get a regression with three slopes, but having two of these variables has really thrown me.

My only idea so far was resorting to having loads of dummy variables to code for each combination of options and it isn't going well.

What is the best way to handle this? Are there any good resources out there that demonstrate? (I'm using SPSS just encase that makes a difference)


  • 1
    $\begingroup$ In short, yes...you will need $k-1$ for a dummy variable for a categorical variable with $k$ distinct values. This holds for ALL of the categorical variables in your model. So, based on what you describe, you need 2 dummy variables for the first categorical variable and 4 dummy variables for the second. In SPSS, there is a way to define a variable as categorical, and the regression will generate these variables for you. $\endgroup$
    – Gregg H
    Apr 12 at 13:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.