# Dummy Linear Regression

A dummy variable is a variable that can take two values, 1 and 0. Usually 1 represents the presence of an attribute and 0 the absence of it.

Our variables do not need to be recoded if they are already coded as 0 and 1. If this would not be the case then it is recommended to recode them using Transform > Recode into different variables, select the variable, name the new variable and recode the old values with the new values (0 and 1).

We want to examine the effect of importance of work on the power over life. Out hypothesis is that the level of importance that people give to work does not have an effect on how much power do they feel over their life. We check our data in the Variable View window and we see that this is an ordinal variable. We want to create a dummy linear regression, so we have to recode the variable into a dummy. We want to examine only two categories, so we merge some of the values of the original variable creating a dummy. You should always check how many cases each category have and preferably merge the less frequent categories.

First we check the Frequency table.

Here we see that most of our respondents marked that work is very important in their life. So, we create the dummy variable in such a way, that 1-very important, 0 – not very important

Old values: 1- very important; New value: 1 – very important

Old values: 2-4: not very important; New value: 0-not very important

We will name our new variable as v1_rec_imp_work and we will label it in the Variable View in the Values column.

After every recoding it is very important that you run a frequency and you should double check if the recoding was correct.

In the frequency table you can see that the same numbers appear in both the table. You compare the categories and the Totals. They are all the same, so the recoding was correct.

Now we can run the linear regression.

Our model is not statistically significant (p=0,061). Thus, we don’t know weather the importance of work has an effect or not on how much power people feel they have over their life.

The result supports our hypothesis.

## Exercise 1 – Multiple Linear Regression

We want to analyze if education, religion and age have an effect on how much power people feel over their life. In our previous example there was a significant effect of having a university degree on the power over life and now we would like to check wethear this relationship remains after involving other variables.

Hypothesis: Controlling for religion and age the positive effect of university degree remains significant on the power over life.

Dependent: power over life

Independents: education, religion, age

2,8% of the variability in the level of how much power do people feel over their life is explained by the education, religion and age. (p<0,001)

**Constant: when all the independent variable is 0 then this is the average of the dependent variable** **(7.003).**

In a hypothetical case where education, religion and age is 0, the level of power that people feel over their life is 7.003.

Controlled for religion and age, people who have a university degree gave 0.782 point higher on average for the level of how much power they feel they have over their life than those who do not have university degree. So, the ones who have a university degree feel more power over their life then those who do not have university degree (p<0,001).

So in our previous example the effect of education was … but after controlling for religion and age the effect is smaller but still significant.

Thus, the results support or refute the hypothesis?

Exercise:

State a hypothesis.

Run a linear regression.

Interpret b0 and b1 and the Sig. level.

Does the result support or refute your hypothesis?

Export the result (Coefficient Table only) into a WORD document and upload it to the Moodle with the syntax file. Both the files should start with your name: “Firstname-Lastname-dummy”

## Exercise 2 – Multiple Linear regression

We want to analyze if education, age, gender, living in Budapest or not have an effect on how much power people feel over their life.

The hypothesis: Controlling for age, gender, residence, the positive effect of university degree remains significant on the power over life.

Dependent variable: power over life

Independent variables: education, age, gender, residence (living in Budapest or not)

2,9% of the variability in the power over life is explained by the education, age, gender and by the fact that if the person currently lives in Budapest or not. (p<0,001)

If hypothetically the education, age, gender and current location would be 0 then people on average on a 1 to 10 scale, where 10 indicates absolute power over life, would give a 7.062 point.

Controlling for age, gender, resicency, those who have a university degree on average feel 0,793 points more power over their life than those who do not have (p<0,001). Thus, our result supports our hypothesis.

If someone gets one year older then he will feel 0,014 less power over his/her life then one year before (p<0,001).

Gender (p=0,356) and the fact the someone lives in Budapest or not (p=0,643) does not have an effect on how much power do they feel over their life.