SlideShare a Scribd company logo
LOGISTIC REGRESSION
Presented by
Mr. Vijay Singh Rawat
Ms. Shweta
(Research Scholar)
Ph. D
Course work 2017-18
Lakshmibai National Institute of Physical Education, Gwalior, India
(Deemed to be University)
INTRODUCTION
• Logistic regression is a predictive analysis.
• Used in a situation when a researcher is interested to predict
the occurrence of any happenings.
Objective of Logistic Regression
• The objective of Logistic regression is to find the best fitting
model to describe the relationship between the dichotomous
characteristics of interest and a set of independent variables.
Continuous vs. Categorical variables
• Independent variables (x):
– Continuous: age, income, height- use numerical value.
– Categorical: gender, city, ethnicity – use dummies
• Dependent variable (y):
– continuous: consumption, time spend- use numerical value
– categorical: yes/ no
Examples of Binary Outcomes
• Should a bank give a person loan or not.
• What determines admittance into a school.
• Which consumers are more likely to buy a new product.
Uses of Logistic Regression
• Prediction of group membership
• It is also provides knowledge of the relationship and strength
among the variables.
• Casual relationship between one or more independent
variables and one binary dependent variables.
• Used to forecast the outcome event.
• Used to predict changes in probabilities.
Assumptions
• The relationship between the dependent and independent
variable may be linear or non-linear.
• The outcome variable must be coded as 0 and 1.
• The independent variable do not need to be metric.
• Independent variable linearly related to the log odds.
• It requires quit large sample size.
Key terms in Logistic Regression
• Dependent variable
– It is binary in nature.
• Independent variable
– Select the different variables that you expect to influence
the dependent variable.
• Hosmer-lemeshow test
– It is commonly used measure of goodness of fit.
• Odd ratio
– It is the ratio of the probability of success to the probability
of failure.
• Classification table
– In this table the observed values for the dependent outcome and
the predicted values are cross classified.
• Maximum likelihood
– Maximum likelihood is the method of finding the least possible
deviation between the observed and predicted values using the
concept of calculus specifically derivatives.
• Logit
– The logit is function which is equal to the log odds of a
variable. If p is a probability that Y=1(occurrence of an event),
then p/(1-p) is corresponding odds. The logit of probability p is
given by








p
p
pLogit
1
log)(
Predicting the Probability p
nn xbxbxbbZ  .........22110
•bo is the intercept and b1,b2,b3 are the slopes against independent
variables x1 , xn
Predicting p with Log(Odds)
zxbb
pˆ1
pˆ
log 110 






zxbb
ee
pˆ1
pˆ 10



z
z
xbb
xbb
e1
e
e1
e
pˆ
10
10



 

By knowing z the probability can be estimatedpˆ
Advantage of using Logit Function
3322110)1/( xbxbxbbppIn 
+-
0.5
p
1
z
0
Figure 1- Shape of the logistic function
Application in Sports Research
• Predicting successful free throw shot in basketball on the basis
of independent variables such as player’s height, accuracy, arm
strength and eye hand coordination etc.
• Predicting winning in football match on the basis of
independent variables like number of passes, number of
turnovers, penalty yardage, fouls committed etc.,
• Finding likelihood of a particular horse finishing first in a
specific race.
Logistic Regression with SPSS
Objective: Predicting success in basketball match
____________________________________________
Match Result Number of Offensive Free throws Blocks
Pass rebound throws
1 1 0 1 1 1
2 0 1 0 0 0
3 1 0 1 1 0
4 1 1 0 0 1
5 0 1 1 1 0
6 0 0 0 0 1
7 1 1 0 1 0
8 0 0 1 0 1
9 1 1 0 1 1
10 0 1 1 0 0
11 1 0 0 1 0
12 0 1 0 0 1
13 1 1 1 1 0
14 0 0 0 0 1
15 1 1 1 1 0
16 0 0 0 1 1
17 0 1 1 0 0
18 1 0 0 1 1
19 0 1 1 0 0
20 1 0 0 1 0
21 0 1 1 0 1
22 1 0 0 1 1
__________________________________________________________________
Dependent Variable
Independent Variable
Result in Basketball Match:
1: Win
0:Loose
No. of pass : 1 = lower 0 = higher
Offensive rebound : 1 = lower 0 = higher
Free throws : 1 = lower 0 = higher
Blocks : 1 = lower 0 = higher
 Team having average number of pass less than the opponent is coded as 1 and the other as 0.
 Similar coding for other variables
- An Illustration
14
SPSS Commands for the logistic regression
Step-1 Preparation of Data file
Fig 1 – screen showing variable view for the logistic regression analysis in SPSS
Fig 2- screen showing data file for the logistic regression analysis in SPSS
Step -2 Initiating command for logistic regression
Fig 3- screen showing of SPSS commands for logistic regression
Analyze Regression Binary logistic
Fig 4- screen showing selection of variables for logistic regression
Defining variables
1.Dependent box 2.Covariate box 3.Categorical covariate box
Step -3 Selecting variable for Analysis
Step -4 Selecting option for Computation
Fig 5- screen showing option for generating Hosmer-lemeshow goodness of fit and
confidence intervals
CONTINUE
THENOK
Step-5 Selecting method for entering independent
variable in logistic regression
A. Confirmatory study
B. Exploratory study
• Clicking the option ok to get the output
Step-6 Getting the output
The logistic regression in SPSS is run in two steps
• First step (block 0)
– It includes no predictors and just the intercept.
• Second step (block 1)
– It includes the variable in the analysis and coding of
independent and dependent variable..
INTERPRETATIONS OF FINDING
1. Case processing
summary
2. Dependent variable
encoding
3. Categorical variable
coding
Block 0
1. Classification
table(model without
predictors)
2. Variable in the
equation
3. Variable not in the
equation
Block 1
1. Omnibus tests of model
coefficients
2. Model summary
3. Homer –lemeshow test
4. Classification table
(model with predictors)
5. Variable in the equation
(with predictors)
A. CASE PROCESSING AND CODING SUMMARY
TABLE 1.1 -Case Processing Summary
Unweighted Casesa N Percent
Selected Cases
Included in Analysis 22 100.0
Missing Cases 0 .0
Total 22 100.0
Unselected Cases 0 .0
Total 22 100.0
a. If weight is in effect, see classification table for the total number of cases.
Table 1.1 shows the number of cases in each category
Table 1.2 shown coding of dependent variable
Table 1.2 -Dependent variable encoding
Original Value Internal Value
Losing 0
winning 1
Table 1.3-Categorical Variables Coding
frequency
Parameter coding
(1)
number of blocks
lower 12 1.000
higher 10 .000
offensive rebound
lower 12 1.000
higher 10 .000
free throws
lower 10 1.000
higher 12 .000
number of pass
lower 10 1.000
higher 12 .000
Table 1.3 shown coding of categorical variable
B. Analyzing Logistics model
Table 1.4 -Classification Table (model without predictor)
Observed Predicted
output Percentage
Correct
losing winning
Step 0
output
losing 0 11 .0
winning 0 11 100.0
Overall Percentage 50.0
a. Constant is included in the model.
b. The cut value is .500
Table 1.4 indicate that without independent variable, one simply guess that particular
team win match and it would be 50% correct of the time.
1. Block 0: logistic model without predictor
Table 1.5-Variables in the Equation
B S.E. Wald df Sig. Exp(B)
Step 0 Constant .000 .426 .000 1 1.000 1.000
Figure 1.6-Variables not in the Equation
Score df Sig.
Step 0
Variables
pass(1) .733 1 .392
rebound(1) 11.733 1 .001
f_throw(1) .733 1 .392
blocks(1) .000 1 1.000
Overall Statistics 11.942 4 .018
Table 1.5 shows that Wald statistics is not significant as its significance value is 1.00,
which is more then 0.05.
Table 1.6 indicates whether each independent variable may improve the model or not.
2. Block 1 logistics model with predictors
(testing significance of the model)
Table 1.7-Model Summary
Step -2 Log likelihood Cox & Snell R Square Nagelkerke R Square
1 16.895a .461 .615
a. Estimation terminated at iteration number 5 because parameter estimates changed by less than .001.
Table 1.7 shown -2 log likelihood statistics and variation in the dependent variable.
Table 1.8-Hosmer and Lemeshow Test
Step Chi-square df Sig.
1 6.834 8 .555
Table 1.8 testing goodness of fit of model with the help of chi-square value.
Table 1.9-Classification Tablea
Observed Predicted
output Percentage
Correct
losing winning
Step 1
output
losing 9 2 81.8
winning 1 10 90.9
Overall Percentage 86.4
a. The cut value is .500
Table 1.9 shows the observed and predicted values of the dependent variable.
Developing logistic model
Table 1.10-Variables in the Equation
B S.E. Wald df Sig. Exp(B)
Step 1a
pass(1) -.337 1.452 .054 1 .817 .714
rebound(1) 4.190 1.556 7.249 1 .007 65.990
f_throw(1) -.337 1.452 .054 1 .817 .714
blocks(1) .834 1.390 .360 1 .548 2.303
Constant -2.539 1.416 3.213 1 .073 .079
a. Variable(s) entered on step 1: pass, rebound, free throw, blocks.
Table 1.10 shows the value of regression coefficients (B), Wald statistics, its
significance, and odds ratio exp(B) for each variable in both the models.
Developing logistic model
Where p is the probability of winning the match.
Note-Only those variable that are found to be significant should be included in
the model but for describing the results comprehensively, other variable have been
included in this model.
Log p/1-p= -2.539 + 0.834 * blocks – 0.337 * free throw
+ 4.190 * offensive rebound -0.337*no. of pass
Explanation of odds ratio
In table 1.11, the exp(B) represents the odds ratio for all the
predictors. If the value of the odds ratio is large, its predictive
value is also large.
Since odds ratio = p/1-p = p= odds ratio/1+odds ratio
For offensive rebound, p= 65.99/1+65.99=0.985
This indicate that if a team’s average offensive rebound is more then
this, their probability of winning would be 0.985.
Interpretation of the logistic Regression model
Log p/1-p= -2.539 + 0.834 * 1 – 0.337 * 1+ 4.190 * 1 -0.337*0=2.148
Odds ratio= p/1-p=e2.148=8.5677
P= 8.5677/1+8.5677=0.8955
Thus, it may be concluded that the probability of the team A to win in the
match would be 0.8955.
s

More Related Content

What's hot

Logistic regression
Logistic regressionLogistic regression
Logistic regression
VARUN KUMAR
 
Binary Logistic Regression
Binary Logistic RegressionBinary Logistic Regression
Binary Logistic Regression
Seth Anandaram Jaipuria College
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
Dan Wellisch
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
Anirudha si
 
4.5. logistic regression
4.5. logistic regression4.5. logistic regression
4.5. logistic regression
A M
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
James Neill
 
Introduction to Generalized Linear Models
Introduction to Generalized Linear ModelsIntroduction to Generalized Linear Models
Introduction to Generalized Linear Models
richardchandler
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Teachers Mitraa
 
Multiple Regression Analysis (MRA)
Multiple Regression Analysis (MRA)Multiple Regression Analysis (MRA)
Multiple Regression Analysis (MRA)
Naveen Kumar Medapalli
 
Data Analysis and Statistics
Data Analysis and StatisticsData Analysis and Statistics
Data Analysis and Statistics
T.S. Lim
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Shameer P Hamsa
 
Poisson regression models for count data
Poisson regression models for count dataPoisson regression models for count data
Poisson regression models for count data
University of Southampton
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionsaba khan
 
Multiple Linear Regression
Multiple Linear RegressionMultiple Linear Regression
Multiple Linear Regression
Indus University
 
Multinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisMultinomial Logistic Regression Analysis
Multinomial Logistic Regression Analysis
HARISH Kumar H R
 
Statistical inference: Estimation
Statistical inference: EstimationStatistical inference: Estimation
Statistical inference: Estimation
Parag Shah
 
Confidence intervals
Confidence intervalsConfidence intervals
Confidence intervalsTanay Tandon
 
Diagnostic in poisson regression models
Diagnostic in poisson regression modelsDiagnostic in poisson regression models
Diagnostic in poisson regression models
University of Southampton
 

What's hot (20)

Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Binary Logistic Regression
Binary Logistic RegressionBinary Logistic Regression
Binary Logistic Regression
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
Multiple regression
Multiple regressionMultiple regression
Multiple regression
 
4.5. logistic regression
4.5. logistic regression4.5. logistic regression
4.5. logistic regression
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
 
Introduction to Generalized Linear Models
Introduction to Generalized Linear ModelsIntroduction to Generalized Linear Models
Introduction to Generalized Linear Models
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Multiple Regression Analysis (MRA)
Multiple Regression Analysis (MRA)Multiple Regression Analysis (MRA)
Multiple Regression Analysis (MRA)
 
Data Analysis and Statistics
Data Analysis and StatisticsData Analysis and Statistics
Data Analysis and Statistics
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Poisson regression models for count data
Poisson regression models for count dataPoisson regression models for count data
Poisson regression models for count data
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Multiple Linear Regression
Multiple Linear RegressionMultiple Linear Regression
Multiple Linear Regression
 
Survival analysis
Survival  analysisSurvival  analysis
Survival analysis
 
Multinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisMultinomial Logistic Regression Analysis
Multinomial Logistic Regression Analysis
 
Statistical inference: Estimation
Statistical inference: EstimationStatistical inference: Estimation
Statistical inference: Estimation
 
Confidence intervals
Confidence intervalsConfidence intervals
Confidence intervals
 
Diagnostic in poisson regression models
Diagnostic in poisson regression modelsDiagnostic in poisson regression models
Diagnostic in poisson regression models
 

Similar to Logistic regression with SPSS

7. logistics regression using spss
7. logistics regression using spss7. logistics regression using spss
7. logistics regression using spss
Dr Nisha Arora
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
TanyaWadhwani4
 
Applied statistics lecture_6
Applied statistics lecture_6Applied statistics lecture_6
Applied statistics lecture_6Daria Bogdanova
 
1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx
novabroom
 
1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx
jesusamckone
 
SIT095_Lecture_9_Logistic_Regression_Part_3.pptx
SIT095_Lecture_9_Logistic_Regression_Part_3.pptxSIT095_Lecture_9_Logistic_Regression_Part_3.pptx
SIT095_Lecture_9_Logistic_Regression_Part_3.pptx
dawitg2
 
analysis part 02.pptx
analysis part 02.pptxanalysis part 02.pptx
analysis part 02.pptx
efrembeyene4
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Srikant001p
 
Regression vs Neural Net
Regression vs Neural NetRegression vs Neural Net
Regression vs Neural Net
Ratul Alahy
 
01_SLR_final (1).pptx
01_SLR_final (1).pptx01_SLR_final (1).pptx
01_SLR_final (1).pptx
DR. MAQSOOD AHMAD
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
blondellchancy
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
priestmanmable
 
Introduction to Regression Analysis
Introduction to Regression AnalysisIntroduction to Regression Analysis
Introduction to Regression Analysis
Minha Hwang
 
30237--KK30237--KK EMBED Equa.docx
30237--KK30237--KK EMBED Equa.docx30237--KK30237--KK EMBED Equa.docx
30237--KK30237--KK EMBED Equa.docx
gilbertkpeters11344
 
Linear Regression and Logistic Regression in ML
Linear Regression and Logistic Regression in MLLinear Regression and Logistic Regression in ML
Linear Regression and Logistic Regression in ML
Kumud Arora
 
Stat342 ch1
Stat342 ch1Stat342 ch1
Stat342 ch1
merongmerong123
 
Data classification sammer
Data classification sammer Data classification sammer
Data classification sammer
Sammer Qader
 
TOPIC Bench-marking Testing1. Windows operating system (Microso.docx
TOPIC Bench-marking Testing1. Windows operating system (Microso.docxTOPIC Bench-marking Testing1. Windows operating system (Microso.docx
TOPIC Bench-marking Testing1. Windows operating system (Microso.docx
juliennehar
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis pptElkana Rorio
 

Similar to Logistic regression with SPSS (20)

7. logistics regression using spss
7. logistics regression using spss7. logistics regression using spss
7. logistics regression using spss
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
 
Applied statistics lecture_6
Applied statistics lecture_6Applied statistics lecture_6
Applied statistics lecture_6
 
1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx
 
1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx1Chapter 11 • Interval Estimation of a Populatio.docx
1Chapter 11 • Interval Estimation of a Populatio.docx
 
SIT095_Lecture_9_Logistic_Regression_Part_3.pptx
SIT095_Lecture_9_Logistic_Regression_Part_3.pptxSIT095_Lecture_9_Logistic_Regression_Part_3.pptx
SIT095_Lecture_9_Logistic_Regression_Part_3.pptx
 
analysis part 02.pptx
analysis part 02.pptxanalysis part 02.pptx
analysis part 02.pptx
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression vs Neural Net
Regression vs Neural NetRegression vs Neural Net
Regression vs Neural Net
 
01_SLR_final (1).pptx
01_SLR_final (1).pptx01_SLR_final (1).pptx
01_SLR_final (1).pptx
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
 
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
8. A 2 x 2 Experimental Design - Quality and Economy (x1 and x2.docx
 
Introduction to Regression Analysis
Introduction to Regression AnalysisIntroduction to Regression Analysis
Introduction to Regression Analysis
 
30237--KK30237--KK EMBED Equa.docx
30237--KK30237--KK EMBED Equa.docx30237--KK30237--KK EMBED Equa.docx
30237--KK30237--KK EMBED Equa.docx
 
Linear Regression and Logistic Regression in ML
Linear Regression and Logistic Regression in MLLinear Regression and Logistic Regression in ML
Linear Regression and Logistic Regression in ML
 
Stat342 ch1
Stat342 ch1Stat342 ch1
Stat342 ch1
 
Data classification sammer
Data classification sammer Data classification sammer
Data classification sammer
 
ANOVA.pptx
ANOVA.pptxANOVA.pptx
ANOVA.pptx
 
TOPIC Bench-marking Testing1. Windows operating system (Microso.docx
TOPIC Bench-marking Testing1. Windows operating system (Microso.docxTOPIC Bench-marking Testing1. Windows operating system (Microso.docx
TOPIC Bench-marking Testing1. Windows operating system (Microso.docx
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 

Recently uploaded

一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfUnleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Enterprise Wired
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 

Recently uploaded (20)

一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfUnleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdf
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 

Logistic regression with SPSS

  • 1. LOGISTIC REGRESSION Presented by Mr. Vijay Singh Rawat Ms. Shweta (Research Scholar) Ph. D Course work 2017-18 Lakshmibai National Institute of Physical Education, Gwalior, India (Deemed to be University)
  • 2. INTRODUCTION • Logistic regression is a predictive analysis. • Used in a situation when a researcher is interested to predict the occurrence of any happenings.
  • 3. Objective of Logistic Regression • The objective of Logistic regression is to find the best fitting model to describe the relationship between the dichotomous characteristics of interest and a set of independent variables.
  • 4. Continuous vs. Categorical variables • Independent variables (x): – Continuous: age, income, height- use numerical value. – Categorical: gender, city, ethnicity – use dummies • Dependent variable (y): – continuous: consumption, time spend- use numerical value – categorical: yes/ no
  • 5. Examples of Binary Outcomes • Should a bank give a person loan or not. • What determines admittance into a school. • Which consumers are more likely to buy a new product.
  • 6. Uses of Logistic Regression • Prediction of group membership • It is also provides knowledge of the relationship and strength among the variables. • Casual relationship between one or more independent variables and one binary dependent variables. • Used to forecast the outcome event. • Used to predict changes in probabilities.
  • 7. Assumptions • The relationship between the dependent and independent variable may be linear or non-linear. • The outcome variable must be coded as 0 and 1. • The independent variable do not need to be metric. • Independent variable linearly related to the log odds. • It requires quit large sample size.
  • 8. Key terms in Logistic Regression • Dependent variable – It is binary in nature. • Independent variable – Select the different variables that you expect to influence the dependent variable. • Hosmer-lemeshow test – It is commonly used measure of goodness of fit. • Odd ratio – It is the ratio of the probability of success to the probability of failure.
  • 9. • Classification table – In this table the observed values for the dependent outcome and the predicted values are cross classified. • Maximum likelihood – Maximum likelihood is the method of finding the least possible deviation between the observed and predicted values using the concept of calculus specifically derivatives. • Logit – The logit is function which is equal to the log odds of a variable. If p is a probability that Y=1(occurrence of an event), then p/(1-p) is corresponding odds. The logit of probability p is given by         p p pLogit 1 log)(
  • 10. Predicting the Probability p nn xbxbxbbZ  .........22110 •bo is the intercept and b1,b2,b3 are the slopes against independent variables x1 , xn
  • 11. Predicting p with Log(Odds) zxbb pˆ1 pˆ log 110        zxbb ee pˆ1 pˆ 10    z z xbb xbb e1 e e1 e pˆ 10 10       By knowing z the probability can be estimatedpˆ
  • 12. Advantage of using Logit Function 3322110)1/( xbxbxbbppIn  +- 0.5 p 1 z 0 Figure 1- Shape of the logistic function
  • 13. Application in Sports Research • Predicting successful free throw shot in basketball on the basis of independent variables such as player’s height, accuracy, arm strength and eye hand coordination etc. • Predicting winning in football match on the basis of independent variables like number of passes, number of turnovers, penalty yardage, fouls committed etc., • Finding likelihood of a particular horse finishing first in a specific race.
  • 14. Logistic Regression with SPSS Objective: Predicting success in basketball match ____________________________________________ Match Result Number of Offensive Free throws Blocks Pass rebound throws 1 1 0 1 1 1 2 0 1 0 0 0 3 1 0 1 1 0 4 1 1 0 0 1 5 0 1 1 1 0 6 0 0 0 0 1 7 1 1 0 1 0 8 0 0 1 0 1 9 1 1 0 1 1 10 0 1 1 0 0 11 1 0 0 1 0 12 0 1 0 0 1 13 1 1 1 1 0 14 0 0 0 0 1 15 1 1 1 1 0 16 0 0 0 1 1 17 0 1 1 0 0 18 1 0 0 1 1 19 0 1 1 0 0 20 1 0 0 1 0 21 0 1 1 0 1 22 1 0 0 1 1 __________________________________________________________________ Dependent Variable Independent Variable Result in Basketball Match: 1: Win 0:Loose No. of pass : 1 = lower 0 = higher Offensive rebound : 1 = lower 0 = higher Free throws : 1 = lower 0 = higher Blocks : 1 = lower 0 = higher  Team having average number of pass less than the opponent is coded as 1 and the other as 0.  Similar coding for other variables - An Illustration 14
  • 15. SPSS Commands for the logistic regression Step-1 Preparation of Data file Fig 1 – screen showing variable view for the logistic regression analysis in SPSS
  • 16. Fig 2- screen showing data file for the logistic regression analysis in SPSS
  • 17. Step -2 Initiating command for logistic regression Fig 3- screen showing of SPSS commands for logistic regression Analyze Regression Binary logistic
  • 18. Fig 4- screen showing selection of variables for logistic regression Defining variables 1.Dependent box 2.Covariate box 3.Categorical covariate box Step -3 Selecting variable for Analysis
  • 19. Step -4 Selecting option for Computation Fig 5- screen showing option for generating Hosmer-lemeshow goodness of fit and confidence intervals CONTINUE THENOK
  • 20. Step-5 Selecting method for entering independent variable in logistic regression A. Confirmatory study B. Exploratory study • Clicking the option ok to get the output Step-6 Getting the output
  • 21. The logistic regression in SPSS is run in two steps • First step (block 0) – It includes no predictors and just the intercept. • Second step (block 1) – It includes the variable in the analysis and coding of independent and dependent variable..
  • 22. INTERPRETATIONS OF FINDING 1. Case processing summary 2. Dependent variable encoding 3. Categorical variable coding Block 0 1. Classification table(model without predictors) 2. Variable in the equation 3. Variable not in the equation Block 1 1. Omnibus tests of model coefficients 2. Model summary 3. Homer –lemeshow test 4. Classification table (model with predictors) 5. Variable in the equation (with predictors)
  • 23. A. CASE PROCESSING AND CODING SUMMARY TABLE 1.1 -Case Processing Summary Unweighted Casesa N Percent Selected Cases Included in Analysis 22 100.0 Missing Cases 0 .0 Total 22 100.0 Unselected Cases 0 .0 Total 22 100.0 a. If weight is in effect, see classification table for the total number of cases. Table 1.1 shows the number of cases in each category
  • 24. Table 1.2 shown coding of dependent variable Table 1.2 -Dependent variable encoding Original Value Internal Value Losing 0 winning 1
  • 25. Table 1.3-Categorical Variables Coding frequency Parameter coding (1) number of blocks lower 12 1.000 higher 10 .000 offensive rebound lower 12 1.000 higher 10 .000 free throws lower 10 1.000 higher 12 .000 number of pass lower 10 1.000 higher 12 .000 Table 1.3 shown coding of categorical variable
  • 26. B. Analyzing Logistics model Table 1.4 -Classification Table (model without predictor) Observed Predicted output Percentage Correct losing winning Step 0 output losing 0 11 .0 winning 0 11 100.0 Overall Percentage 50.0 a. Constant is included in the model. b. The cut value is .500 Table 1.4 indicate that without independent variable, one simply guess that particular team win match and it would be 50% correct of the time. 1. Block 0: logistic model without predictor
  • 27. Table 1.5-Variables in the Equation B S.E. Wald df Sig. Exp(B) Step 0 Constant .000 .426 .000 1 1.000 1.000 Figure 1.6-Variables not in the Equation Score df Sig. Step 0 Variables pass(1) .733 1 .392 rebound(1) 11.733 1 .001 f_throw(1) .733 1 .392 blocks(1) .000 1 1.000 Overall Statistics 11.942 4 .018 Table 1.5 shows that Wald statistics is not significant as its significance value is 1.00, which is more then 0.05. Table 1.6 indicates whether each independent variable may improve the model or not.
  • 28. 2. Block 1 logistics model with predictors (testing significance of the model) Table 1.7-Model Summary Step -2 Log likelihood Cox & Snell R Square Nagelkerke R Square 1 16.895a .461 .615 a. Estimation terminated at iteration number 5 because parameter estimates changed by less than .001. Table 1.7 shown -2 log likelihood statistics and variation in the dependent variable. Table 1.8-Hosmer and Lemeshow Test Step Chi-square df Sig. 1 6.834 8 .555 Table 1.8 testing goodness of fit of model with the help of chi-square value.
  • 29. Table 1.9-Classification Tablea Observed Predicted output Percentage Correct losing winning Step 1 output losing 9 2 81.8 winning 1 10 90.9 Overall Percentage 86.4 a. The cut value is .500 Table 1.9 shows the observed and predicted values of the dependent variable.
  • 30. Developing logistic model Table 1.10-Variables in the Equation B S.E. Wald df Sig. Exp(B) Step 1a pass(1) -.337 1.452 .054 1 .817 .714 rebound(1) 4.190 1.556 7.249 1 .007 65.990 f_throw(1) -.337 1.452 .054 1 .817 .714 blocks(1) .834 1.390 .360 1 .548 2.303 Constant -2.539 1.416 3.213 1 .073 .079 a. Variable(s) entered on step 1: pass, rebound, free throw, blocks. Table 1.10 shows the value of regression coefficients (B), Wald statistics, its significance, and odds ratio exp(B) for each variable in both the models.
  • 31. Developing logistic model Where p is the probability of winning the match. Note-Only those variable that are found to be significant should be included in the model but for describing the results comprehensively, other variable have been included in this model. Log p/1-p= -2.539 + 0.834 * blocks – 0.337 * free throw + 4.190 * offensive rebound -0.337*no. of pass
  • 32. Explanation of odds ratio In table 1.11, the exp(B) represents the odds ratio for all the predictors. If the value of the odds ratio is large, its predictive value is also large. Since odds ratio = p/1-p = p= odds ratio/1+odds ratio For offensive rebound, p= 65.99/1+65.99=0.985 This indicate that if a team’s average offensive rebound is more then this, their probability of winning would be 0.985.
  • 33. Interpretation of the logistic Regression model Log p/1-p= -2.539 + 0.834 * 1 – 0.337 * 1+ 4.190 * 1 -0.337*0=2.148 Odds ratio= p/1-p=e2.148=8.5677 P= 8.5677/1+8.5677=0.8955 Thus, it may be concluded that the probability of the team A to win in the match would be 0.8955.
  • 34. s