Professional Documents
Culture Documents
APPLIED
Vitri Widyaningsih
Logistics regression
When to use logistics regression
Requirements for regression
Conducting regression with SPSS
Interpreting the result
Correlation
When to use correlation
Requirements for correlation
Conducting correlation with SPSS
Interpreting the result
Variable
Variable Scale
Simple Multiple
Non- Non-
Linear Linear
Linear Linear
LINEAR REGRESSION
Linear Regression Models
Relationship between one dependent variable and
explanatory variable(s)
Equation Used
Numerical (Continuous) Dependent (Response) Variable
1 or More Numerical or Categorical Independent (Explanatory) Variables
Yi 0 1X i i
Dependent Independent
(Response) (Explanatory) Variable
Variable (e.g., Years s. serocon.)
(e.g., CD+ c.)
Linear Equations
Y
Y = mX + b
Change
m = Slope in Y
Change in X
b = Y-intercept
X
1984-1994 T/Maker Co.
Linear Regression Assumptions
Linear association
Y
60
40
20
0 X
0 20 40 60
Thinking Challenge
How would you draw a line through the
points? How do you determine which line
fits best?
Y
60
40
20
0 X
0 20 40 60
Thinking Challenge
How would you draw a line through the
points? How do you determine which line
fits best?
Slope changed
Y
60
40
20
0 X
0 20 40 60
Intercept unchanged
Thinking Challenge
How would you draw a line through the
points? How do you determine which line
fits best?
Slope unchanged
Y
60
40
20
0 X
0 20 40 60
Intercept changed
Thinking Challenge
How would you draw a line through the
points? How do you determine which line
fits best?
Slope changed
Y
60
40
20
0 X
0 20 40 60
Intercept changed
Least Squares
1. Best Fit Means Difference Between Actual Y Values
& Predicted Y Values Are a Minimum. But Positive
Differences Off-Set Negative. So square errors!
n n
Yi Yi
2
2
i
i 1 i 1
Least Squares Graphically
n
LS minimizes i 1 2 3 4
2
2
2
2
2
i 1
Y Y2 0 1X 2 2
^4
^2
^1 ^3
Yi 0 1X i
X
Coefficient Equations
Sample Slope
SS xyyi 0xi 1xxi yi y
1
xi x
SS xx 2
Sample Y-intercept
0 y 1x
Best Linear Unbiased Estimator (BLUE)
= is an unbiased estimator of and
has the minimum variance among all unbiased
linear estimators
Interpretation of Coefficients
1 (Slope)
Estimated Y Changes by 1 for Each 1 Unit
Increase in X
If 1 = 2, then Y Is Expected to Increase by 2 for Each 1 Unit
Increase in X
0 (Y-Intercept)
Average Value of Y When X = 0
If 0 = 4, then Average Y Is Expected to Be 4 When X Is 0
EXAMPLE
CHECKING THE
ASSUMPTION
Linearity
Make scatter plot
Graphs legacy dialogs Scatter/Dot
Simple enter the variable youre going to plot in X and y axis
Analyzing data points for Linearity
Normal Distribution of Error
Make new variable of residuals
Analyze Regression Linear Save check for
residuals input the variable we are going to analyze
Run normality diagnostics for the Errors
(Standardized Reciduals)
Mean Distribution of Error = 0
Homoscedasticity
Run scatter plot of Standardized residuals (y) and
standardized predicted value (x) and check for the plot
The plot should look constant
CONDUCTING AND INTERPRETING
REGRESSION
Conducting Linear Regression in SPSS
Result
Result Interpretation 1 R Squared
Proportion of Variation in Y Explained by All X Variables
Taken Together
Equation Used
Categorical (Binary) Dependent (Response) Variable
1 or More Numerical or Categorical Independent (Explanatory) Variables
LP Model
1
Logit Model
0
41
Logistic Regression
logit ( ) ln 0 1 x pX p
1
where is the probability of the event.
example
1 = log[odds(x1 = 1)] - log[odds(x1 = 0)] =
1 = log(OR) of X1
LOGISTIC
REGRESSION IN SPSS
Check for coding
Result
Result Interpretation 1 Model Fit
Percentage Correct
Result Interpretation 2 Variable(s)
CORRELATIONS
Correlation
Relationship between one dependent variable and
explanatory variable (both continuous)
Normal
Distribution
Yes No
Transformed
Normal
Yes No
Distribution
X X Yi Y
n
i
SS xy
r i 1
X X Y Y
n n
2 2 SS xx SS yy
i i
i 1 i 1
Coefficient of Correlation Values
No
Correlation
Perfect Perfect
Negative No Positive
Correlation Correlation Correlation
X X
r=0
Y r = .89 Y
X X
Test of Coefficient of Correlation
1. Shows If There Is a Linear Relationship Between 2
Numerical Variables
2. Same Conclusion as Testing Population Slope 1
3. Hypotheses
H0: = 0 (No Correlation)
Ha: 0 (Correlation)
CONDUCTING AND INTERPRETING
CORRELATION
Test your knowledge
What are the differences between correlation and
regression?
What are the similarity between correlation and
regression?
What are the requirements for correlation?
What are the requirements for regression?
What is correlation coefficient?
Whats p value meaning in correlation coefficient
What is represented by 0 and 1 in linear regression?
What is represented by 0 and 1 in logistic regression?
References
THANK YOU