Docsity

Lab 10: Simple Linear Regression - Lecture Slides | STAT 404, Lab Reports of Statistics

Toggle sidebar
bg1
1/10/2009
1
Lab 10: Simple Linear
Regression
Chapter 15
April 9, 2009
Introduction to Regression
Regression is the foundation to most statistical
procedures (structural equation modeling –
SEM, path analysis, logistic regression, multi-
level modeling, factorial designs, etc.)
Entire books and courses are devoted to just
regression (Stat 404)
Regression usually requires that both the
dependent and independent variables are
continuous; however, there are exceptions
(contrast coding, dummy variables, etc.)
Recap of what we’ve covered:
Independent
Variable
Dependent
Variable
Statistical Test
Categorical Categorical Chi-Square
Categorical Continuous T-test or ANOVA
Continuous Continuous Simple & Multiple
Regression
Continuous Categorical Logistic
Regression
Introduction continued
Simple vs. Multiple Regression
Simple = 1 independent variable
Multiple = 2 or more independent variables
Regression based on the concept of
“
least
Regression
based
on
the
concept
of
least
squares” or “ordinary least squares”
Given a dataset, we want to predict how two
variables are related by plotting a “regression
line” or “best fit line”
Introduction continued
We want to then see how well the line fits the
data by looking at the differences, which is
called the Ordinary Least Squares (OLS)
method
Want the differences between the line and each
data point to be as small as possible
If all of the positive and negative differences
were added up, they equal zero – MUST
SQUARE THEM BEFORE WE ADD THEM
Thus, we want the least squares (added up
called the Sum of Squares)
Introduction continued
The equation of a line is y= mx+ b
m= slope – tells how the 2 variables, x and yare related; can
be positive or negative, strong or weak
b= intercept
In statistics, the equation looks like this:
y= b0+ b1x +
ε
The slope is represented by a small “b” for
unstandardized coefficients or a “β” (beta) for
standardized coefficients; the intercept is b0(b-not)
εis the error or residual – the difference between the
actual and predicted score
pf3
pf4

Partial preview of the text

Download Lab 10: Simple Linear Regression - Lecture Slides | STAT 404 and more Lab Reports Statistics in PDF only on Docsity!

Lab 10: Simple Linear

Regression

Chapter 15 April 9, 2009

Introduction to Regression

„ Regression is the foundation to most statistical

procedures (structural equation modeling –

SEM, path analysis, logistic regression, multi-

level modeling, factorial designs, etc.)

„ Entire books and courses are devoted to just

regression (Stat 404)

„ Regression usually requires that both the

dependent and independent variables are

continuous ; however, there are exceptions

(contrast coding, dummy variables, etc.)

Recap of what we’ve covered:

Independent Variable

Dependent Variable

Statistical Test

Categorical Categorical Chi-Square

Categorical Continuous T-test or ANOVA

Continuous Continuous Simple & Multiple Regression Continuous Categorical Logistic Regression

Introduction continued

„ Simple vs. Multiple Regression

‰ Simple = 1 independent variable ‰ Multiple = 2 or more independent variables

„ Regression based on the concept ofRegression based on the concept of “leastleast

squares” or “ordinary least squares”

„ Given a dataset, we want to predict how two

variables are related by plotting a “regression

line” or “best fit line”

Introduction continued

„ We want to then see how well the line fits the

data by looking at the differences, which is

called the Ordinary Least Squares (OLS)

method

„ Want the differences between the line and each

data point to be as small as possible

„ If all of the positive and negative differences

were added up, they equal zero – MUST

SQUARE THEM BEFORE WE ADD THEM

„ Thus, we want the least squares (added up

called the Sum of Squares )

Introduction continued

„ The equation of a line is y = m x + b ‰ m = slope – tells how the 2 variables, x and y are related; can be positive or negative, strong or weak ‰ b = intercept „ In statistics, the equation looks like this: y = b 0 + b 1 x + ε „ The slope is represented by a small “b” for unstandardized coefficients or a “β” (beta) for standardized coefficients; the intercept is b 0 (b-not) „ ε is the error or residual – the difference between the actual and predicted score

Introduction continued

„ Turn to pg. 179:

‰ EXAM = intercept + coefficient*ANXIETY + error

„ NOTE: In simple linear regression, the

interceptintercept is the overall average score of theis the overall average score of the

dependent variable

‰ In the above equation, the intercept is the overall average EXAM score ‰ Also, the standardized beta coefficient is equal to the Pearson’s correlation coefficient ( r )

Introduction continued

„ The whole idea is to be able to predict an

individuals’ EXAM score given just their

ANXIETY level

‰ To get this, we need to know the intercept andg , p slope, i. e. the overall average and the coefficient, to get the predicted EXAM score

„ Pretend you are given intercept = 64.247 and

the unstandardized b-coefficient = 2.

EXAM = 64.247 + 2.818*ANXIETY

Introduction continued

„ Somebody who scored a 1.5 on the anxiety

scale is predicted to get: 64.247 + 2.818*(1.5)

= 68.47 points on the exam

„ Somebody who scored 7.0 on the anxiety

scale is predicted to get: 64.247 + 2.818*(7.0)

= 83.97 points on the exam, and so on…

„ Note that the intercept is 64.247, how close is

that to the actual mean (79.82)?

‰ Remember, regression gives estimates , not exact figures – this is why we include an error term

Regression Example

„ Start SPSS and open anxiety.sav

„ Do Step 4 on pg. 183

„ Do Analyze – Regression – Linear

„ DD o StSt ep 5 5 on pg. 184 184

‰ Put exam in the top box for “dependent” and put anxiety in the big box called “independent”

„ Click OK

Regression Example Output

„ “ r ” is the correlation coefficient (correlation

between ANXIETY and EXAM)

„ “R^2 ” is how much variance in EXAM scores is

being explained by ANXIETY Rbeing explained by ANXIETY, R 2 = 238 =.

23.8%, which is moderately large

„ Ignore “Adjusted R Square” for now – this

figure is debated – I’ll give you a different

formula in the next lab for calculating a more

accurate adjusted R square

Regression Example Output

„ The ANOVA table is given because you

calculated the sum of squares using ordinary

least squares method

„ The F-value is significant F (1, 71) = 22.19, p

„ This tells us that our model does a good job

predicting the outcome variable EXAM

„ In the coefficients table, the “B” is the

unstandardized coefficient – tells us that the

overall average EXAM score is 64.

Curve Estimation Output

„ The predicted exam scores increase then decrease again, giving evidence that there is indeed a quadratic relationship between anxiety and exam scores

„ The Regression Equation is:

Exam = 30.38 + 18.93(anxiety) – 1.52(anxiety)^2

„ How You Report it:

“For every one unit increase in anxiety score, we expect to see a corresponding 17.41(18.93-1.52) point increase in exam score. The effect of anxiety on exam score is highly significant ( p < .001).”

For next week (4-16-09):

„ Do Assignment 8

„ Preview Chapter 16: Multiple Regressionp p g