8
1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple Linear Regression 6 Creating and Importing Data 8

Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

Embed Size (px)

Citation preview

Page 1: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

1

Using SPSS, Chapter 10:

Correlation & Regression

• Chapter 10.1 - Correlation 2

• Chapter 10.2 - Regression 4

• Chapter 10.4 - Multiple Linear Regression 6

• Creating and Importing Data 8

Page 2: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

2

Chapter 10.1 - Correlation

• In the Statistics Viewer choose Analyze → Correlate → Bivariate . . .

• This opens a Bivariate Correlations dialogue box.

• The results of this test are displayed in the Statistics Viewer.

Page 3: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

3

• Here, the correlation coefficient is r = 0.936. The two-tailed P -value is given as 0.000 (rounded to 3decimal places). Regardless of our significance level, this yields a significant linear correlation.

Page 4: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

4

Chapter 10.2 - Regression

• In the Statistics Viewer choose Analyze → Regression → Linear . . .

• This opens a Linear Regression dialogue box.

• The results of this test are displayed in the Statistics Viewer.

Page 5: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

5

• The only thing new here (that we didn’t get with the correlation function) is the regression equationwhere y is rate of chirps and x is the temperature:

y = 4.067x− 204.214

Page 6: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

6

Chapter 10.4 - Multiple Linear Regression

• Create/Open the sample data. Here we will try to predict household income (dependent variable - inthousands of dollars) from age (in years) and education level (1 to 5). Now we have two independentvariables.

• In the Statistics Viewer choose Analyze → Regression → Linear . . .

Page 7: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

7

• This opens a Linear Regression dialogue box.

• The results of this test are displayed in the Statistics Viewer.

The regression equation for income (in thousands of dollars) is

income = 2.261 · (age) + 9.252 · (education rank)− 49.553

Page 8: Using SPSS, Chapter 10: Correlation & Regression · 1 Using SPSS, Chapter 10: Correlation & Regression Chapter 10.1 - Correlation 2 Chapter 10.2 - Regression 4 Chapter 10.4 - Multiple

8

Creating and Importing Data

• There are two ways to get data into SPSS.

– You can enter the data by typing it directly into the data editor.

– You can open an existing data file by selecting the File tab, then Open , then Data... .

Then select the type of file from the list of options. If it is not already an SPSS (.sav) data file,you will be prompted to answer some questions. For example, if you open an Excel file it may askwhich worksheet and whether or not the first row contains labels.

• Make sure your data is formatted as described below.

– Rows = CasesEach row represents a case such as each respondent to a questionnaire.

– Columns = VariablesEach column represents a variable being tracked or measured. For example, the answers to a specificquestion on a questionnaire defines it’s own variable (column). As such, each row represents anindividual case for all variables.

– Cells contain valuesEach cell contains a single value of a variable for a case.

It is possible to enter data in the form of a frequency table but then you must do some alterationsbefore analyzing such data.

• Once you have the data opened in the data editor, click the Variable View tab at the bottom of thedata editor. In this view, each variable is now a row and you must make sure all your variables aredefined appropriately. The most important distinctions are

– TYPE : The most common types are

∗ Numeric: Used for quantitative data. These are numbers with no commas and a perioddelimiting the decimal places. SPSS will not allow you to enter non-numeric characters into acell of numeric type.

∗ Date: Used for dates or times from a menu of formats.

∗ String: Used for qualitative data. Avoid symbols such as *, -, +, ?, etc.

– Measure : There are three levels of measurement.

∗ Scale is for ratio or interval levels of measurement.

∗ Ordinal is for ordinal or ranked data.

∗ Nominal is for qualitative data.

– Values : If you have numeric values representing qualitative data such a 1=male and 0=female,you will probably want this to be labelled accordingly in graphs and outputs. Click on the cell inthe Values column for that variable and assign labels for each value.