# Simple question : Understanding an interaction - Gender as a moderator

#### Charlotte_

##### New Member
I wanted to see if gender has a moderating effect on the interaction between the age at divorce and trust in relationships. I centered the age at divorce and computed the product of the centered age and gender. Gender is coded 0 = man and 1 = woman. The sample size is 218. These are the results from the equation :

Constant : b = -0,59 st.error = 0,078 t = -0,761 p = 0,448
Gender : b = 0,121 st.error = 0,097 t = 1,242 p = 0,215
Age centered : b = -0,26 st.error = 0,014 t = -1,842 p = 0,067
Gender x age centered = b = 0,039 st. error = 0,017 t = 2,231 p = 0,027

So this indiciates that the interaction is significant. When I plot the age as the X and trust in relationships as Y, with markers set by gender, I get the following plot(see attachment). The blue line is for men, the green line for women. This looks like the slope for men is steeper than for woman. As I interpret from my coeffecients the slope for men (which is represented in the constant, because they are the reference category) is not significant. When I recode the variables as man = 1 and woman = 0 the coefficients for the reference category (woman) are : b = 0,061 st.error = 0,058 t = 1,060 p = 0,290
So the coefficients for the simple slope indicate that the slope for woman is steeper than for men, although both are not significant. But when you look at the plot, the slope for men looks more steep than for woman, right?
Did I do something wrong? Or am I interpreting this wrong?

Oh by the way : as you can see the factor on the Y-axis is named factor4. This really is the trust in relationships, I didn't mistake there

#### rogojel

##### TS Contributor
hi,
two quick observations:
1. It seems that your program considers gender to be a continuous variable. Just coding it as 1 and 0 is generally not enough, you need to tell the program that it is a discrete variable (a factor ).
2. Possibly because of this, your R-squared is very low, which would mean that practically the model does not explain the variability in your data.

I guess, you would need to re-run the regression with gender as a factor and see what comes out of it.
Hope this helps

#### Charlotte_

##### New Member
Thanx for your response rogojel. I use SPSS, I don't think there is a way to tell that there are discrete variables in the regression. In logistic regression there's a button for that, but I found nothing for a linear regression..

#### rogojel

##### TS Contributor
hi,
I don't know SPSS but in this case you should code Gender as a dummy variable e.g. using a variable called Female which is 1 for females and 0 for males.

I hope this helps