# Control variables

The aim of including control variables in a logistic regression is eliminating alternative explanations. In the analysis, **the focus is on** how the effect of the original independent variable changes after including control variables. Does it remain or does it disappear?

Note: When interpreting coefficients of one variable of the regression we must add that this is true only when “everything else is held constant”. Holding variables constant means that we interpret the variable in question in the case when all other variables have the value of 0. For example in the 2nd step of the following example we introduce domicil into our model and then since we have more than 1 variable in the regression we interpret the effect of gender only for the 0 category of the newly introduced variable (domicile).

**Research question:** How does gender influence religiousness? Does it have an independent/individual effect?

weight by pspwght.

fre rlgblg.

RECODE rlgblg (1=1)(2=0) into rlgblg_2cat.

VARIABLE LABELS rlgblg_2cat ‘Belonging or not to particular religion or denomination?’.

VALUE LABELS rlgblg_2cat 1’yes’ 0’no’.

fre rlgblg rlgblg_2cat.

fre gndr.

RECODE gndr (1=1)(2=0) into gndr_2cat.

VARIABLE LABELS gndr_2cat ‘gender=male’.

VALUE LABELS gndr_2cat 1’male’ 0’female’.

fre gndr gndr_2cat.

fre domicil.

RECODE domicil (1 2=1)(3 thru 5=0) into domicil_2cat.

VARIABLE LABELS domicil_2cat ‘domicil=big city’.

VALUE LABELS domicil_2cat 1’big city or outskirts’ 0’not big city’.

fre domicil domicil_2cat.

LOGISTIC REGRESSION rlgblg_2cat WITH gndr_2cat domicil_2cat agea.

We will build our model in three steps: including one more independent variable at each step: Gender, Domicile, Age.

## 1.Step

The effect of gender on religiousness.

LOGISTIC REGRESSION rlgblg_2cat WITH gndr_2cat.

**b1:** Log odds of being religious when the independent variable is larger by 1 unit. In this case: When X changes from 0 to 1.

The log odds of being religious among men is by 0.454 lower than among women.

Log odds of being religious for males is -0,298. [b0+b1*X= 0.156+(-0.454)**1=-0.298]

**b0:** Log odds of being religious when the independent variable is 0

When X=0. The Log odds of being religious for females is 0.156.

b0+b1*X= 0.156+(-0.454)*0=0.156

**Exp(b1):** The odds of being religious among men are 0.635 times as low as among women. (0.635-1)*100= lower by 36.5 %

The odds of being religious when the independent variable increases by 1 unit. In this case: When the X changes from 0 to 1. (X refers to the category of the independent variable.)

**Exp(b0)**: The odds of being religious among women are 1.169.

## 2.Step

LOGISTIC REGRESSION rlgblg_2cat WITH gndr_2cat domicil_2cat.

**b1:** Log odds of being religious when one independent variable increases by 1 unit.

The log odds of being religious for males everything else held constant is by 0.486 lower, than for females. (So, holding everything else in constant means that all other independent variables included in the regression have the value of 0. In our case domicile is the only other variable so this interpretation is true for those belonging to the 0 category of the domicile = living in a small city.)**b2: **The log odds of being religious for big city residents everything else held constant is lower by 0.512, than for not big city residents.

**Exp(b1):** The odds of being religious for males everything else held constant is 0.615 times as low as for females. -> (0,615-1)*100=lower by 38.5%.

**Exp(b2):** The odds of being religious for big city residents everything else held constant is 0.599 times as low as for not big city residents.- >(0,599-1)*100= by 40.1% lower

**b0:** Log odds of being religious when both independent variables are 0

-> Log odds of being religious for females who do not live in big cities=

b0+b1**X1+b2**X2=0.310+(-0.486)*0+(-0.512)*0=0.310

**Exp(b0)**: The odds of being religious for females who do not live in big cities are 1,364.

## 3.Step

LOGISTIC REGRESSION rlgblg_2cat WITH gndr_2cat domicil_2cat agea.

**b1:** Log odds of being religious when one independent variable increases by 1 unit

The log odds of being religious for males everything else held constant is lower by 0.429, than for females**b2: **The log odds of being religious for big city residents everything else held constant is lower by 0.580, than for not big city residents**b3: **The log odds of being religious when being one year older everything else held constant is higher by 0.029.

**b0: **Log odds of being religious when all independent variables are 0

-> Log odds of being religious for females who do not live in big cities at age 0 =b0+b1*X1+b2*X2+b3*X3=-1.068+(-0.429)*0+(-0.580)*0+0.029*0 =-1.068

**Exp(b1):** The odds of being religious for males everything else held constant is 0.651 times as low as for females -> lower by 34.9%**Exp(b2):** The odds of being religious for big city residents everything else held constant is 0.560 times as low as for not big city residents -> by 44% lower**Exp(b3):** The odds of being religious when being one year older everything else held constant is 1.029 times as high for every life year-> higher by 2.9%

**Note: **Step by step you have to check how the effect size direction or significance level changes as we include more and more variables in the regression.

**Conclusion:** The effect of the original independent variable (gender) remains significant and the effect size does not change considerably. This means that gender has an individual effect on religiousness. (Individual effect means: its effect is independent of other factors.) (Note: Here you only have to check the effect of the b1 coefficient for your conclusions. So, you have to compare the effect of b1 in the first regression (1.step) to the effect of b1 in the second(2.step) and third regression (3.step).)

**Other examples (multiple independent variables) – Multivariate logistic regression**: