## This week you will perform a basic linear regression. * Please be aware of the very strict data requirement for running linear regression

Textbooks

1. OpenStax, Introductory Statistics. OpenStax. 19 September 2013. http://cnx.org/content/col11562/latest/

2. Tyrrell, S. 2009. SPSS: Stats practically short and simple (1st edition). bookboon.com. Ebooks and textbooks from Bookboon.com https://oerstatistics.wordpress.com/2016/03/05/spss-books/

Original Question:

This week you will perform a basic linear regression. * Please be aware of the very strict data requirement for running linear regression: your DV and IV both have to be continuous variables. (Most variables at interval/ratio level are continuous variables.) This rule is solid for DV: if your DV is a nominal or ordinal variable, you CANNOT use it as the DV for regression, not even when it is converted to a dummy variable (b/c the regression is no longer linear). It is a necessity that your DV is a “continuous” variable with interval/ratio level of measurement.

If your current DV won’t work for regression test, please choose a “continuous” variable from GSS data set as your temporary DV for the week in order to practice regression analysis. Some examples of “continuous” variables from GSS 2012 data: tvhours, hrs1, etc. You don’t have to include regression test in your final portfolio if your DV won’t work for regressing test. Keep in mind, regression is also a form of significance test. Your porfolio only needs ONE significance test (we have learned: independent sample t-test, dependent sample t-test, Chi-square, and regression.)

Creating dummy variables

If an IV is not continuous (like race, sex), you could make things work by creating dummy variables based on these variables. For example, based on variable “sex,” we can make a “male dummy variable” or a “female dummy variable.” Based on variable “race,” we can create a “white dummy variable” or “black dummy variable,” or “other dummy variable.”

By custom, we’ll name the dummy variable using the value we coded as 1. For example, if we denote “male” as 1, female as 0, we’ll name this dummy as “male dummy variable.” If we denote “white” as 1, then we’ll name this dummy as “white dummy variable.” This naming method helps readers/researchers remember/understand what dummy variables stand for in a study.

Here is a youtube video which shows the essential steps of creating dummy variables:https://www.youtube.com/watch?v=R0qc4rzr9ik

In this week’s forum discussion, you are required to run a linear regression using:

1. your DV (if your DV is not a continuous variable, pick one from the GSS 2012 data set as your temporary DV for the week so you can practice regression)

2. and two dummy variables created based on variable “sex” and “race” in the GSS 2012 data set.

SPSS command to run linear regression

Analyze – Regression – Linear

Output interpretation

The proper way to interpret linear regression is writing the regression equation. Here is an example:

DV: educ (highest year of school completed, a continuous variable at I/R level)

IV: male dummy variable (based on variable “sex”) and white dummy variable (based on variable “race”)

See equation below. We use * to mark the variable that is statistically significant.

Educ=13.031-.054male+.696white*

Here is the fun part: prediction of respondents’ highest year of school completed based on their race and sex.

Based on this equation:

A white male by average will have 13.673 years of education: 13.031-.054*1+.696*1=13.673

A nonwhite female by average will have 13.031 years of education: 13.031-.054*0+.696*0=13.031

Reply to the following response with 200 words minimum. (please make response as if having a conversation, respond directly to some of the statements in below post.)

Hello Class

This was quite the challenge for me. I think that I have mastered dummy variables though. I had to use them for both independent variables.

DV: Highest year of school completed

IV: Living with mother and father at the age of 16 and Black respondents

Black people who lived with both mother and father have an average 10.781 years of education.

10.901-.791*1+.671*1=10.781

Other races who lived with both mother and father have an average of 10.901 years of education.

10.901-.791*0+.671*0=10.901

Coefficientsa

Model Unstandardized Coefficients Standardized Coefficients t Sig.

B Std. Error Beta

1 (Constant) 10.901 .069 157.885 .000

Black .791 .037 .086 21.460 .000

MotherandFather .671 .028 .097 24.166 .000

a. Dependent Variable: Highest year of school completed