0
$\begingroup$

I have the equation $$ y = \beta_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \beta_5 x_5 + \beta_6 x_6 + \beta_7 x_7 + \beta_8 x_8 + \beta_9 x_9 + \varepsilon $$

The dependent variable is weight of child at birth, and independent variables are Age, BMI, Social Class and different types of Vitamin intake.

Clearly there are 2 categorical variables (bmi and social) which I have used SPSS to create dummy variables for. I therefore now have 7 dummy variables (By leaving one out for each).

Must I now include interactions? Im not sure what this means and how this would be incorporated in the model. Do i multiply each dummy variable by every other dummy variable in the model?

$\endgroup$
5
  • $\begingroup$ Add self-study tag for assignments. $\endgroup$ Commented Apr 13, 2017 at 23:48
  • $\begingroup$ Are you asking when to include interaction terms in a model (in general), or are you asking whether you must include interaction terms because two of the independent variables are categorical (as in your specific case)? $\endgroup$ Commented Apr 14, 2017 at 6:55
  • $\begingroup$ Yes Im looking for both of those answers! I dont know whether for my data, I need to use interactions for the multiple regression? $\endgroup$
    – Btzzzz
    Commented Apr 14, 2017 at 14:14
  • $\begingroup$ Do you have a scientific hypothesis that the effect of BMI (which is a continuous variable by the way) varies by social class? $\endgroup$
    – mdewey
    Commented Apr 14, 2017 at 16:23
  • $\begingroup$ No i have no hypotheses! And BMI is categorical in this case - 1 for underweight, 2 for normal, 3 for overweight and 4 for obese.. $\endgroup$
    – Btzzzz
    Commented Apr 14, 2017 at 16:51

1 Answer 1

1
$\begingroup$

Use GLM module instead of Regression module. SPSS Regression, just like proc reg of SAS, does not handle categorical variable in a friendly way.

Go to Analyze > General Linear Model > Univariate:

enter image description here

Put your outcome in the dependent variable slot, categorical variables into fixed factor slot, continuous variables into covariate slot. Then click "Model."

enter image description here

First, click "Custom" to specify your model. Hold down Ctrl and click on the variables from the list, and transfer them over as "main effect" (you can change that in the middle drop down menu):

enter image description here

And then, specify them as "interaction" by choosing interaction at the drop down menu and then carry over the variables you wish to interact to the right:

enter image description here

Then, click "Continue" and then go into "Option", ask for parameter estimates or you will not get any regression coefficients reported in the output:

enter image description here

Click "Continue" and then "OK". You should be able to get what you are trying to get.


For the technical part now... you can you compute the interaction by hand as well. For two categorical variables with j and k levels, you'll need (j-1)*(k-1) interaction terms. Which can be hard to compute when there are many levels. GLM can automate this process.

$\endgroup$

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.