Interpreting coefficients in a regression model for a two-level categorical IV I'm running a moderated mediation analysis in SPSS. However, I face some difficulties interpreting the results. I have one independent variable which has two levels (emotional and rational). Since I can only choose one x-variable, I chose "rational" (dummy coded). I know the coefficient for the path from x to M1 (ad_affect) is -.0382 for the rational group. If I change the reference category and put "emotional" as x, the coefficient becomes .0382 but this can't be the solution, right?
So I'm wondering what is the correct coefficient for the emotional group, which I can write next to the path?

 A: In a regression model with a binary independent variable, the coefficient is just the difference between the means of the two levels. In fact: If you have a linear regression model with only a binary categorical variable, this is equivalent to a two-sample t-test assuming equal variances. Switching the reference level therefore just switches the sign of the coefficient but not its value. By changing the reference level, you basically just change the vantage point from which you calculate the difference.
Here is an example using a linear regression model with a binary predictor (I'm using R but the software doesn't matter):
library(visreg)

data("mtcars")

# Convert transmission to factor with "automatic" as reference level

mtcars$am <- factor(mtcars$am, levels = c(0, 1), labels = c("automatic", "manual"))

mod1 <- lm(mpg~disp + hp + wt + am, data = mtcars)

coef(mod1)

 (Intercept)         disp           hp           wt     ammanual 
34.209443370  0.002489354 -0.039323213 -3.046747000  2.159270737 

visreg(mod1, "am", xlab = "Transmission")

# Now relevel the transmission variable so that "manual" is the reference level

mtcars$am <- relevel(mtcars$am, ref = "manual")

mod2 <- lm(mpg~disp + hp + wt + am, data = mtcars)

coef(mod2)

 (Intercept)         disp           hp           wt  amautomatic 
36.368714107  0.002489354 -0.039323213 -3.046747000 -2.159270737

visreg(mod2, "am", xlab = "Transmission")

We can visualize the coefficient for the first (left) and second (right) model:

You see that the difference between the two levels stays the same. When "automatic" is the reference, the coefficient tells you how much larger/smaller the mean of the other level is. In this case, cars with a "manual" transmission have on average 2.16 more mpg (mileage per gallons) compared to cars with an "automatic" transmission.
When we change the reference level to "manual", the coefficient tells you how much larger/smaller the mean of the category "automatic" is. From the point of "manual", cars with an "automatic" transmission have a 2.16 lower mpg, hence the minus sign of the coefficient.
