Research question: Does domicile has an effect on voting?
Hypothesis: Those who live in big cities are more likely to vote than those who live in small cities.

fre domicil.
RECODE domicil (1 2=1)(3 thru 5=0) into domicil_dummy.
VARIABLE LABELS domicil_dummy ‘Big city or outskirts vs not big city’.
VALUE LABELS domicil_dummy 1’Big city or outskirts’ 0’Not big city’.
fre domicil domicil_dummy.

fre vote.
RECODE vote (1 =1)(2=0) into vote_dummy.
VARIABLE LABELS vote_dummy ‘Voted last national election 2 categories’.
VALUE LABELS vote_dummy 1’Voted’ 0’Not voted’.
fre vote vote_dummy.

LOGISTIC REGRESSION vote_dummy WITH domicil_dummy.

1-Voted
0-Not voted
0-Not big city
1-Big city or outskirts

b0: the log odds for the category 1 of the dependent variable when the independent variable’s category is 0

b0: The log odds of voting among people living in small cities are 0.927.

b1: how much larger or smaller the log odds becomes as the independent variable increases by 1 unit.

b1: The log odds of voting among people living in big cities or outskirts are by 0.333 higher than among people living in small cities.

b0+b1: the log odds for category 1 of the dependent variable when the independent variable’s category is 1.

b0+b1: The log odds of voting among people living in big cities or outskirts is 1,26 (0,927+0,333=1,26).

Exp(b1): The odds of voting among people living in big cities or outskirts are 1.395 times as high as among people living in small cities.

Exp(b0): The odds of voting among people living in small cities are 2.527.

Exp(b0+b1)=Exp(b0)*Exp(b1)= the odds of voting among people living in big cities are (2,527*1,395).

Conclusion: The results support the hypothesis stating that “Those who live in big cities are more likely to vote than those who live in small cities.” (p<0,05 and Exp(b1)=1.395).

Another example

Hypothesis: Place of living has an influence on voting. More people from big cities vote in comparison to not big cities. (I turned off the weighting.)

weights off.
FREQUENCIES vote.
RECODE vote (1=1) (2 thru 3=0) INTO vote_dummy.
VARIABLE LABELS vote_dummy ‘voted last election dummy’.
VALUE LABELS vote_dummy 0’no’ 1’yes’.
FREQUENCIES vote vote_dummy.

fre domicil.
RECODE domicil (1 2=1) (3 thru 5=0) INTO domicil_dummy.
VARIABLE LABELS domicil_dummy ‘domicil dummy’.
VALUE LABELS domicil_dummy 1’big city’ 0’not a big city’.
FREQUENCIES domicil domicil_dummy.

LOGISTIC REGRESSION vote_dummy WITH domicil_dummy.

1-Voted
0-Not voted
0-Not big city
1-Big city or outskirts

b1: The log odds of voting for people who live in a big city is by 0.725 higher than for small city residents.
b0+b1: The log odds of voting for residents of big city is 1.126. (b0+b1=0,401+0,725=1,126)
Exp(b1): The odds for belonging to category one of the dependent variable, which is voting, is 1,494 times as high when a person lives in a big city as a person does not live in a big city.
The odds of voting among people living in a big city are 49.4% higher than among those not living in a big city. (1.494-1)*100=49,4%

Exp(b0): The odds of voting for people living in a small city are 2.064.

Exp(b0+b1)=Exp(b0)*Exp(b1)=The odds of voting for people living in a big city are 3,558 (b0*b1=1.494*2,064).

Conclusion: Yes, the results support the hypothesis, because the p-value is lower than 0,05 and the Exp(b1) shows that people living in big cities are more likely to vote than people living in small cities. (Exp(b1)=1,494)

UP