SlideShare a Scribd company logo
Logistic Regression Using SPSS
Presented by Nasser Hasan - Statistical Supporting Unit
7/8/2020
nasser.hasan@miami.edu
Overview
• Brief introduction of Logistic Regression.
• Logistic Regression Analysis Using SPSS.
Logistic Regression Using SPSS
Overview
Logistic Regression
- Logistic regression is used to predict a categorical (usually
dichotomous) variable from a set of predictor variables.
- For a logistic regression, the predicted dependent variable is a function
of the probability that a particular subject will be in one of the
categories.
Logistic Regression Using SPSS
Overview
Logistic Regression - Examples
- A researcher wants to understand whether exam performance (passed
or failed) can be predicted based on revision time, test anxiety and
lecture attendance.
- A researcher wants to understand whether drug use (yes or no) can be
predicted based on prior criminal convictions, drug use amongst friends,
income, age and gender.
Logistic Regression Using SPSS
Overview
Logistic Regression - Assumption
1. Your dependent variable should be measured on a dichotomous scale.
2. You have one or more independent variables, which can be either
continuous or categorical.
3. You should have independence of observations and the dependent
variable should have mutually exclusive and exhaustive categories.
Logistic Regression Using SPSS
Overview
Logistic Regression - Assumption
4. There needs to be a linear relationship between any continuous
independent variables and the logit transformation of the dependent
variable. à Box-Tidwell Test
Logistic Regression Using SPSS
Overview
Box-Tidwell Test
- We include in the model the interactions between the continuous
predictors and their logs.
- If the interaction term is statistically significant, the original continuous
independent variable is not linearly related to the logit of the dependent
variable.
- Don’t worry about the significant interaction if the sample sizes are
large.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
Dataset
Please download the dataset using this link:
https://miami.box.com/s/cb1tytyzogqe1vs7eu4fdqj7m9ewtwzo
And open it in SPSS
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
Dataset
1) The dependent variable, heart_disease , which is whether the
participant has heart disease;
2) The independent variable, age , which is the participant's age in years;
3) The independent variable, weight , which is the participant's weight
(technically, it is their 'mass’);
4) The independent variable, gender , which has two categories: "Male"
and "Female";
5) The independent variable, VO2max , which is the maximal aerobic
capacity.
6) The case identifier, caseno , which is used for easy elimination of cases
(e.g., participants) that might occur when checking outliers.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
Click Transform > Compute Variable:
- We want to compute the logs of any continuous independent variable,
in our case: age, weight, and VO2 max.
- For Age variable:
Type LN_age in target variable and LN(age) in Numeric Expression
- Repeat the same procedure for the other two variables.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
Click Analyze > Regression > Binary Logistic
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
In the Logistic Regression Window
- Move your DV into the DV box, and all of your IVs in the covariates box.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
For Box-Tidwell test
- Add the interaction term between each continues IV and its log.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
In the Logistic Regression Window: Click on Categorical
- Transfer the categorical independent variable, gender, from
the Covariates: box to the Categorical Covariates: box, as shown below,
and then change the reference category to be the first, then click on
change:
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
In the Logistic Regression Window: Click on Options
- Check the appropriate statistics and plots needed for the analysis as
shown below:
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output for Box-Tedwell Test
- If all of them are not significant, redo the analysis with the interaction
terms:
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
Redo the analysis: Click Analyze > Regression > Binary Logistic
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
Remove interaction terms from covariates:
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output
This part of the output tells you about the cases that were included and excluded from the
analysis, the coding of the dependent variable, and coding of any categorical variables listed on
the categorical subcommand.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 0
This part of the output describes a “null model”, which is model with no predictors and just the
intercept. This is why you will see all of the variables that you put into the model in the table
titled “Variables not in the Equation”.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
The section contains what is frequently the most interesting part of the output: the overall test of
the model (in the “Omnibus Tests of Model Coefficients” table) and the coefficients and odds
ratios (in the “Variables in the Equation” table).
The overall model is statistically significant, χ2(4) = 27.40, p < .05.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
This table contains the Cox & Snell R Square and Nagelkerke R Square values, which are both
methods of calculating the explained variation. These values are sometimes referred to
as pseudo R2 values (and will have lower values than in multiple regression). However, they are
interpreted in the same manner, but with more caution. Therefore, the explained variation in the
dependent variable based on our model ranges from 24.0% to 33.0%, depending on whether you
reference the Cox & Snell R2 or Nagelkerke R2 methods, respectively.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
The Hosmer-Lemeshow tests the null hypothesis that predictions made by the model fit perfectly
with observed group memberships. A chi-square statistic is computed comparing the observed
frequencies with those expected under the linear model. A nonsignificant chi-square indicates
that the data fit the model well.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
Logistic regression estimates the probability of an event (in this case, having heart disease)
occurring. If the estimated probability of the event occurring is greater than or equal to 0.5 (better
than even chance), SPSS Statistics classifies the event as occurring (e.g., heart disease being
present). If the probability is less than 0.5, SPSS Statistics classifies the event as not occurring
(e.g., no heart disease). It is very common to use binomial logistic regression to predict whether
cases can be correctly classified (i.e., predicted) from the independent variables. Therefore, it
becomes necessary to have a method to assess the effectiveness of the predicted classification
against the actual classification.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
- With the independent variables added, the model now correctly classifies 71.0% of cases
overall (see "Overall Percentage" row) à Percentage accuracy in classification.
- 45.7% of participants who had heart disease were also predicted by the model to have heart
disease (see the "Percentage Correct" column in the "Yes" row of the observed categories). à
Sensitivity
- 84.6% of participants who did not have heart disease were correctly predicted by the model not
to have heart disease (see the "Percentage Correct" column in the "No" row of the observed
categories). à Specificity
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
- The positive predictive value is the percentage of correctly predicted cases with the
observed characteristic compared to the total number of cases predicted as having the
characteristic. In our case, this is 100 x (16 ÷ (10 + 16)) which is 61.5%. That is, of all cases
predicted as having heart disease, 61.5% were correctly predicted.
- The negative predictive value is the percentage of correctly predicted cases without the
observed characteristic compared to the total number of cases predicted as not having the
characteristic. In our case, this is 100 x (55 ÷ (55 + 19)) which is 74.3%. That is, of all cases
predicted as not having heart disease, 74.3% were correctly predicted.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
- The Wald test ("Wald" column) is used to determine statistical significance for each of the
independent variables. The statistical significance of the test is found in the "Sig." column.
From these results you can see that age (p = .003), gender (p = .021) and VO2max (p = .039)
added significantly to the model/prediction, but weight (p = .799) did not add significantly to
the model.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
SPSS output – Block 1
- You can use the information in the "Variables in the Equation" table to predict the probability of
an event occurring based on a one-unit change in an independent variable when all other
independent variables are kept constant. For example, the table shows that the odds of
having heart disease ("yes" category) is 7.026 times greater for males as opposed to females.
Logistic Regression Using SPSS
Performing the Analysis Using SPSS
APA style write-up
- A logistic regression was performed to ascertain the effects of age, weight, gender and
VO2max on the likelihood that participants have heart disease. The logistic regression model
was statistically significant, χ2(4) = 27.402, p < .0005. The model explained 33.0%
(Nagelkerke R2) of the variance in heart disease and correctly classified 71.0% of cases.
Males were 7.02 times more likely to exhibit heart disease than females. Increasing age was
associated with an increased likelihood of exhibiting heart disease, However, increasing
VO2max was associated with a reduction in the likelihood of exhibiting heart disease.
Multiple Regression Using SPSS
Presented by Nasser Hasan - Statistical Supporting Unit
6/3/2020
Thanks for Listening and Attending!
Any Questions?
Can you please give us a minute to fill this survey as it will help
us to evaluate our performance and take your feedback into
consideration for future webinars:
https://umiami.qualtrics.com/jfe/form/SV_a9N5Xta6OlybEeV

More Related Content

Similar to Logistic-Regression-Webinar.pdf

Chapter 5 anova analysis
Chapter 5 anova analysisChapter 5 anova analysis
Chapter 5 anova analysis
MOHAMED AHMED AIDEED
 
Advice On Statistical Analysis For Circulation Research
Advice On Statistical Analysis For Circulation ResearchAdvice On Statistical Analysis For Circulation Research
Advice On Statistical Analysis For Circulation Research
Nancy Ideker
 
Edison S Statistics
Edison S StatisticsEdison S Statistics
Edison S Statistics
teresa_soto
 
A review of statistics
A review of statisticsA review of statistics
A review of statistics
edisonre
 
Edisons Statistics
Edisons StatisticsEdisons Statistics
Edisons Statistics
teresa_soto
 
BOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACRO
BOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACROBOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACRO
BOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACRO
Anthony Kilili
 
Applied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSSApplied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSS
Gökhan Ayrancıoğlu
 
spss.pptx
spss.pptxspss.pptx
spss.pptx
saraso888
 
Factor analysis using spss 2005
Factor analysis using spss 2005Factor analysis using spss 2005
Factor analysis using spss 2005
jamescupello
 
L1 statistics
L1 statisticsL1 statistics
L1 statistics
dapdai
 
Data analysis and working on spss
Data analysis and working on spssData analysis and working on spss
Data analysis and working on spss
Dr. Senthilvel Vasudevan
 
one-way-rm-anova-DE300.pdf
one-way-rm-anova-DE300.pdfone-way-rm-anova-DE300.pdf
one-way-rm-anova-DE300.pdf
luizsilva460739
 
Iso 9001 22000
Iso 9001 22000Iso 9001 22000
Iso 9001 22000
jintrajom
 
SAS Notes
SAS NotesSAS Notes
SAS Notes
Yanli Liu
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Konpal Darakshan
 
Ms iso 9001
Ms iso 9001Ms iso 9001
Ms iso 9001
denritafu
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
Anirudha si
 
Iso 9001 quality management systems
Iso 9001 quality management systemsIso 9001 quality management systems
Iso 9001 quality management systems
jomsatgec
 
Iso 9001 benefits
Iso 9001 benefitsIso 9001 benefits
Iso 9001 benefits
porikgefus
 
Your Paper was well written, however; I need you to follow the f
Your Paper was well written, however; I need you to follow the fYour Paper was well written, however; I need you to follow the f
Your Paper was well written, however; I need you to follow the f
rochellscroop
 

Similar to Logistic-Regression-Webinar.pdf (20)

Chapter 5 anova analysis
Chapter 5 anova analysisChapter 5 anova analysis
Chapter 5 anova analysis
 
Advice On Statistical Analysis For Circulation Research
Advice On Statistical Analysis For Circulation ResearchAdvice On Statistical Analysis For Circulation Research
Advice On Statistical Analysis For Circulation Research
 
Edison S Statistics
Edison S StatisticsEdison S Statistics
Edison S Statistics
 
A review of statistics
A review of statisticsA review of statistics
A review of statistics
 
Edisons Statistics
Edisons StatisticsEdisons Statistics
Edisons Statistics
 
BOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACRO
BOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACROBOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACRO
BOOTSTRAPPING TO EVALUATE RESPONSE MODELS: A SAS® MACRO
 
Applied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSSApplied Statistical Methods - Question & Answer on SPSS
Applied Statistical Methods - Question & Answer on SPSS
 
spss.pptx
spss.pptxspss.pptx
spss.pptx
 
Factor analysis using spss 2005
Factor analysis using spss 2005Factor analysis using spss 2005
Factor analysis using spss 2005
 
L1 statistics
L1 statisticsL1 statistics
L1 statistics
 
Data analysis and working on spss
Data analysis and working on spssData analysis and working on spss
Data analysis and working on spss
 
one-way-rm-anova-DE300.pdf
one-way-rm-anova-DE300.pdfone-way-rm-anova-DE300.pdf
one-way-rm-anova-DE300.pdf
 
Iso 9001 22000
Iso 9001 22000Iso 9001 22000
Iso 9001 22000
 
SAS Notes
SAS NotesSAS Notes
SAS Notes
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Ms iso 9001
Ms iso 9001Ms iso 9001
Ms iso 9001
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
Iso 9001 quality management systems
Iso 9001 quality management systemsIso 9001 quality management systems
Iso 9001 quality management systems
 
Iso 9001 benefits
Iso 9001 benefitsIso 9001 benefits
Iso 9001 benefits
 
Your Paper was well written, however; I need you to follow the f
Your Paper was well written, however; I need you to follow the fYour Paper was well written, however; I need you to follow the f
Your Paper was well written, however; I need you to follow the f
 

Recently uploaded

Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
nuttdpt
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Fernanda Palhano
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 
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
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
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
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
aqzctr7x
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
74nqk8xf
 

Recently uploaded (20)

Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB文凭证书)圣芭芭拉分校毕业证如何办理
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
 
University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 
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
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
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...
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
 

Logistic-Regression-Webinar.pdf

  • 1. Logistic Regression Using SPSS Presented by Nasser Hasan - Statistical Supporting Unit 7/8/2020 nasser.hasan@miami.edu
  • 2. Overview • Brief introduction of Logistic Regression. • Logistic Regression Analysis Using SPSS.
  • 3. Logistic Regression Using SPSS Overview Logistic Regression - Logistic regression is used to predict a categorical (usually dichotomous) variable from a set of predictor variables. - For a logistic regression, the predicted dependent variable is a function of the probability that a particular subject will be in one of the categories.
  • 4. Logistic Regression Using SPSS Overview Logistic Regression - Examples - A researcher wants to understand whether exam performance (passed or failed) can be predicted based on revision time, test anxiety and lecture attendance. - A researcher wants to understand whether drug use (yes or no) can be predicted based on prior criminal convictions, drug use amongst friends, income, age and gender.
  • 5. Logistic Regression Using SPSS Overview Logistic Regression - Assumption 1. Your dependent variable should be measured on a dichotomous scale. 2. You have one or more independent variables, which can be either continuous or categorical. 3. You should have independence of observations and the dependent variable should have mutually exclusive and exhaustive categories.
  • 6. Logistic Regression Using SPSS Overview Logistic Regression - Assumption 4. There needs to be a linear relationship between any continuous independent variables and the logit transformation of the dependent variable. à Box-Tidwell Test
  • 7. Logistic Regression Using SPSS Overview Box-Tidwell Test - We include in the model the interactions between the continuous predictors and their logs. - If the interaction term is statistically significant, the original continuous independent variable is not linearly related to the logit of the dependent variable. - Don’t worry about the significant interaction if the sample sizes are large.
  • 8. Logistic Regression Using SPSS Performing the Analysis Using SPSS Dataset Please download the dataset using this link: https://miami.box.com/s/cb1tytyzogqe1vs7eu4fdqj7m9ewtwzo And open it in SPSS
  • 9. Logistic Regression Using SPSS Performing the Analysis Using SPSS Dataset 1) The dependent variable, heart_disease , which is whether the participant has heart disease; 2) The independent variable, age , which is the participant's age in years; 3) The independent variable, weight , which is the participant's weight (technically, it is their 'mass’); 4) The independent variable, gender , which has two categories: "Male" and "Female"; 5) The independent variable, VO2max , which is the maximal aerobic capacity. 6) The case identifier, caseno , which is used for easy elimination of cases (e.g., participants) that might occur when checking outliers.
  • 10. Logistic Regression Using SPSS Performing the Analysis Using SPSS Click Transform > Compute Variable: - We want to compute the logs of any continuous independent variable, in our case: age, weight, and VO2 max. - For Age variable: Type LN_age in target variable and LN(age) in Numeric Expression - Repeat the same procedure for the other two variables.
  • 11. Logistic Regression Using SPSS Performing the Analysis Using SPSS Click Analyze > Regression > Binary Logistic
  • 12. Logistic Regression Using SPSS Performing the Analysis Using SPSS In the Logistic Regression Window - Move your DV into the DV box, and all of your IVs in the covariates box.
  • 13. Logistic Regression Using SPSS Performing the Analysis Using SPSS For Box-Tidwell test - Add the interaction term between each continues IV and its log.
  • 14. Logistic Regression Using SPSS Performing the Analysis Using SPSS In the Logistic Regression Window: Click on Categorical - Transfer the categorical independent variable, gender, from the Covariates: box to the Categorical Covariates: box, as shown below, and then change the reference category to be the first, then click on change:
  • 15. Logistic Regression Using SPSS Performing the Analysis Using SPSS In the Logistic Regression Window: Click on Options - Check the appropriate statistics and plots needed for the analysis as shown below:
  • 16. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output for Box-Tedwell Test - If all of them are not significant, redo the analysis with the interaction terms:
  • 17. Logistic Regression Using SPSS Performing the Analysis Using SPSS Redo the analysis: Click Analyze > Regression > Binary Logistic
  • 18. Logistic Regression Using SPSS Performing the Analysis Using SPSS Remove interaction terms from covariates:
  • 19. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output This part of the output tells you about the cases that were included and excluded from the analysis, the coding of the dependent variable, and coding of any categorical variables listed on the categorical subcommand.
  • 20. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 0 This part of the output describes a “null model”, which is model with no predictors and just the intercept. This is why you will see all of the variables that you put into the model in the table titled “Variables not in the Equation”.
  • 21. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 The section contains what is frequently the most interesting part of the output: the overall test of the model (in the “Omnibus Tests of Model Coefficients” table) and the coefficients and odds ratios (in the “Variables in the Equation” table). The overall model is statistically significant, χ2(4) = 27.40, p < .05.
  • 22. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 This table contains the Cox & Snell R Square and Nagelkerke R Square values, which are both methods of calculating the explained variation. These values are sometimes referred to as pseudo R2 values (and will have lower values than in multiple regression). However, they are interpreted in the same manner, but with more caution. Therefore, the explained variation in the dependent variable based on our model ranges from 24.0% to 33.0%, depending on whether you reference the Cox & Snell R2 or Nagelkerke R2 methods, respectively.
  • 23. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 The Hosmer-Lemeshow tests the null hypothesis that predictions made by the model fit perfectly with observed group memberships. A chi-square statistic is computed comparing the observed frequencies with those expected under the linear model. A nonsignificant chi-square indicates that the data fit the model well.
  • 24. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 Logistic regression estimates the probability of an event (in this case, having heart disease) occurring. If the estimated probability of the event occurring is greater than or equal to 0.5 (better than even chance), SPSS Statistics classifies the event as occurring (e.g., heart disease being present). If the probability is less than 0.5, SPSS Statistics classifies the event as not occurring (e.g., no heart disease). It is very common to use binomial logistic regression to predict whether cases can be correctly classified (i.e., predicted) from the independent variables. Therefore, it becomes necessary to have a method to assess the effectiveness of the predicted classification against the actual classification.
  • 25. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 - With the independent variables added, the model now correctly classifies 71.0% of cases overall (see "Overall Percentage" row) à Percentage accuracy in classification. - 45.7% of participants who had heart disease were also predicted by the model to have heart disease (see the "Percentage Correct" column in the "Yes" row of the observed categories). à Sensitivity - 84.6% of participants who did not have heart disease were correctly predicted by the model not to have heart disease (see the "Percentage Correct" column in the "No" row of the observed categories). à Specificity
  • 26. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 - The positive predictive value is the percentage of correctly predicted cases with the observed characteristic compared to the total number of cases predicted as having the characteristic. In our case, this is 100 x (16 ÷ (10 + 16)) which is 61.5%. That is, of all cases predicted as having heart disease, 61.5% were correctly predicted. - The negative predictive value is the percentage of correctly predicted cases without the observed characteristic compared to the total number of cases predicted as not having the characteristic. In our case, this is 100 x (55 ÷ (55 + 19)) which is 74.3%. That is, of all cases predicted as not having heart disease, 74.3% were correctly predicted.
  • 27. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 - The Wald test ("Wald" column) is used to determine statistical significance for each of the independent variables. The statistical significance of the test is found in the "Sig." column. From these results you can see that age (p = .003), gender (p = .021) and VO2max (p = .039) added significantly to the model/prediction, but weight (p = .799) did not add significantly to the model.
  • 28. Logistic Regression Using SPSS Performing the Analysis Using SPSS SPSS output – Block 1 - You can use the information in the "Variables in the Equation" table to predict the probability of an event occurring based on a one-unit change in an independent variable when all other independent variables are kept constant. For example, the table shows that the odds of having heart disease ("yes" category) is 7.026 times greater for males as opposed to females.
  • 29. Logistic Regression Using SPSS Performing the Analysis Using SPSS APA style write-up - A logistic regression was performed to ascertain the effects of age, weight, gender and VO2max on the likelihood that participants have heart disease. The logistic regression model was statistically significant, χ2(4) = 27.402, p < .0005. The model explained 33.0% (Nagelkerke R2) of the variance in heart disease and correctly classified 71.0% of cases. Males were 7.02 times more likely to exhibit heart disease than females. Increasing age was associated with an increased likelihood of exhibiting heart disease, However, increasing VO2max was associated with a reduction in the likelihood of exhibiting heart disease.
  • 30. Multiple Regression Using SPSS Presented by Nasser Hasan - Statistical Supporting Unit 6/3/2020 Thanks for Listening and Attending! Any Questions? Can you please give us a minute to fill this survey as it will help us to evaluate our performance and take your feedback into consideration for future webinars: https://umiami.qualtrics.com/jfe/form/SV_a9N5Xta6OlybEeV