SlideShare a Scribd company logo
Logistic regression
Dr. Khaled Mahmoud Abd Elaziz
Lecturer of public health and preventive
medicine, Faculty of Medicine-
Ain Shams University
Logistic regression is very similar to linear
regression.
When we use logistic regression?
We use it when we have a (binary outcome) of
interest and a number of explanatory
variables.
Outcome:
e.g. the presence of absence of a
symptom, presence or absence of a disease
Logistic regression is very similar to linear
regression.
When we use logistic regression?
We use it when we have a (binary outcome) of
interest and a number of explanatory
variables.
Outcome:
e.g. the presence of absence of a
symptom, presence or absence of a disease
From the equation of the logistic
regression model we can do:
1-we can determine which explanatory
variables can influence the outcome.
Which means which variables had the
highest OR or the risk in production of
the outcome
(1= has the disease 0= doesn’t have the
disease)
From the equation of the logistic
regression model we can do:
2- we can use an individual
values of the explanatory
variables to evaluate he or she
will have a particular outcome
we start the logistic regression model by
creating a binary variable to represent
the outcome (Dependant variable) (1=
has the disease 0=doesn’t have the
disease)
We take the probability P of an individual
has the highest coded category (has
the disease) as the dependant variable.
We use the logit logistic transformation in
the regression equation
The logit is the natural logarithm of the odds ratio of
‘disease’
Logit (P)= ln P/ 1-p
The logistic regression equation
Logit (p)= a + b1X1+ b2X2 + b3X3 +……… + biXi
X= Explanatory variables
P= estimated value of true probability that an
individual with a particular set of values for X has
the disease. P corresponds to the proportion with
the disease, it has underlying binominal
distribution
b= estimated logistic regression coefficients
The exponential of a particular coefficient for
example eb1 is an estimated of the odds ratio.
For a particular value of X1 the estimated
odds of the disease while adjusting for all
other X’s in the equation.
As the logistic regression is fitted on a log
scale the effects of X’s are multiplicative on
the odds of the disease . This means that
their combined effect is the product of their
separate effects.
This is unlike linear regression where the
effects of X’s on the dependant variables
are additive.
Plain English:
1-Take the significant variables in the
univariate analysis
2-Set the P value that you will take those
variables to be put in the models e.g. 0.05 or
0.1
3-if all variables in the univariate analysis are
insignificant ? Don’t bother doing logisitic
regression. There is no question here about
those variables for prediction of the disease
Plain English:
4- the idea of doing a logisitic regression we have
two many variables that are significant with the
outcome we are looking for and we want to know
which is more stronger in prediction of the disease
outcome
5- we look in the output of the statistical program for
Odds ratio and CI, significance of the variable,
manipulate to select of the best combination of
explanatory variables
Plain English:
4- the idea of doing a logisitic regression we have
two many variables that are significant with the
outcome we are looking for and we want to know
which is more stronger in prediction of the disease
outcome
Mathematical model that describes the relationship
between an outcome with one or more explanatory
variables
5- we look in the output of the statistical program for
Odds ratio and CI, significance of the
variable, manipulate to select of the best
combination of explanatory variables
Example:
A study was done to test the relationship
between HHV8 infection and sexual
behavior of men, were asked about histories
of sexually transmitted diseases in the past (
gonorrhea, syphilis, HSV2, and HIV)
The explanatory variables were the presence
of each of the four infection coded as 0 if the
patient has no history or 1 if the patient had
a history of that infection and the patient age
in years
Dependant outcome HHV8 infection
Parameter
estimate
P OR 95% CI
Intercept -2.2242 0.006
Gonorrhea 0.5093 0.243 1.664 0.71-3.91
Syphilis 1.1924 0.093 3.295 0.82-13.8
HSV2 0.7910 0.0410 2.206 1.03-4.71
HIV 1.6357 0.0067 5.133 1.57-
16.73
Age 0.0062 0.76 1.006 0.97-1.05
Example:
Chi square for covariate= 24.5 P=0.002
Indicating at least one of the covariates
is significantly associated with HHV-8
serostatus.
HSV-2 positively associated with HHV8
infection P=0.04
HIV is positively associated with HHV 8
infection P=0.007
Those with a history of HSV-2 having 2.21
times odds of being HHV-8 positive
compared to those with negative history
after adjusting for other infections
Those with a history of HIV having 5.1 times
odds of being HHV-8 positive compared to
those with negative history after adjusting
for other infections
Multiplicative effect of the model suggests a
man who is both HSV2 and HIV seropositive
is estimated to have 2.206 X 5.133 = 11.3
times the odds of HHV 8 infection compared
to a man negative for both after adjusting for
the other two infections.
In this example gonorrhea had a significant
chi-square but when entered in the model it
was not significant
(no indication of independent relationship
between a history of gonorrhea and HHV8
seropositivity)
There is no significant relationship
between HHV8 seropositivity and
age, the odds ratio indicates that the
estimated odds of HHV8 seropositivity
increases by 0.6% for each additional
year of age.
What is the probability of 51 year old man has
HHV8 infection if he has gonorrhea positive
and HSV2 positive but doesn’t have the two
other diseases (Syphilis and HIV)?
Add up the regression coefficients
Constant +b1 +b2 +b3X age
-2.2242 + 0.5093+0.7910+ (0.0062X51)=
-0.6077
probability of this person=
P= ez / 1+ ez
P= e (-0.6077)/ 1+ e (-0.6077) =0.35
THANK YOU

More Related Content

What's hot

4.5. logistic regression
4.5. logistic regression4.5. logistic regression
4.5. logistic regression
A M
 
Binary Logistic Regression
Binary Logistic RegressionBinary Logistic Regression
Binary Logistic Regression
Seth Anandaram Jaipuria College
 
Multiple Regression and Logistic Regression
Multiple Regression and Logistic RegressionMultiple Regression and Logistic Regression
Multiple Regression and Logistic Regression
Kaushik Rajan
 
Linear models for data science
Linear models for data scienceLinear models for data science
Linear models for data science
Brad Klingenberg
 
ML - Multiple Linear Regression
ML - Multiple Linear RegressionML - Multiple Linear Regression
ML - Multiple Linear Regression
Andrew Ferlitsch
 
Simple linear regression (final)
Simple linear regression (final)Simple linear regression (final)
Simple linear regression (final)Harsh Upadhyay
 
Ordinal Logistic Regression
Ordinal Logistic RegressionOrdinal Logistic Regression
Ordinal Logistic Regression
Al-Ahmadgaid Asaad
 
What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...
Smarten Augmented Analytics
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
Anirudha si
 
Introduction to correlation and regression analysis
Introduction to correlation and regression analysisIntroduction to correlation and regression analysis
Introduction to correlation and regression analysis
Farzad Javidanrad
 
Logistic regression (blyth 2006) (simplified)
Logistic regression (blyth 2006) (simplified)Logistic regression (blyth 2006) (simplified)
Logistic regression (blyth 2006) (simplified)
MikeBlyth
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metrics
ankit_ppt
 
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 regression  Logistic regression
Logistic regression
Learnbay Datascience
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
James Neill
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
Avjinder (Avi) Kaler
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
Teachers Mitraa
 
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
 
Logistic regression analysis
Logistic regression analysisLogistic regression analysis
Logistic regression analysis
Dhritiman Chakrabarti
 

What's hot (20)

4.5. logistic regression
4.5. logistic regression4.5. logistic regression
4.5. logistic regression
 
Binary Logistic Regression
Binary Logistic RegressionBinary Logistic Regression
Binary Logistic Regression
 
Multiple Regression and Logistic Regression
Multiple Regression and Logistic RegressionMultiple Regression and Logistic Regression
Multiple Regression and Logistic Regression
 
Linear models for data science
Linear models for data scienceLinear models for data science
Linear models for data science
 
ML - Multiple Linear Regression
ML - Multiple Linear RegressionML - Multiple Linear Regression
ML - Multiple Linear Regression
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Simple linear regression (final)
Simple linear regression (final)Simple linear regression (final)
Simple linear regression (final)
 
Ordinal Logistic Regression
Ordinal Logistic RegressionOrdinal Logistic Regression
Ordinal Logistic Regression
 
What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
Introduction to correlation and regression analysis
Introduction to correlation and regression analysisIntroduction to correlation and regression analysis
Introduction to correlation and regression analysis
 
Logistic regression (blyth 2006) (simplified)
Logistic regression (blyth 2006) (simplified)Logistic regression (blyth 2006) (simplified)
Logistic regression (blyth 2006) (simplified)
 
Ml3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metricsMl3 logistic regression-and_classification_error_metrics
Ml3 logistic regression-and_classification_error_metrics
 
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 regression  Logistic regression
Logistic regression
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Logistic regression analysis
Logistic regression analysisLogistic regression analysis
Logistic regression analysis
 

Similar to Logistic regression

Frequency Measures Used in EpidemiologyIntroductionIn e.docx
 Frequency Measures Used in EpidemiologyIntroductionIn e.docx Frequency Measures Used in EpidemiologyIntroductionIn e.docx
Frequency Measures Used in EpidemiologyIntroductionIn e.docx
MARRY7
 
Association and causation
Association and causationAssociation and causation
Association and causationdrravimr
 
You have just finished a health education in-service to the communit.docx
You have just finished a health education in-service to the communit.docxYou have just finished a health education in-service to the communit.docx
You have just finished a health education in-service to the communit.docx
briancrawford30935
 
Statistics tests and Probablity
Statistics tests and ProbablityStatistics tests and Probablity
Statistics tests and ProbablityAbdul Wasay Baloch
 
10-Interpretation& Causality by Mehdi Ehtesham
10-Interpretation& Causality  by Mehdi Ehtesham10-Interpretation& Causality  by Mehdi Ehtesham
10-Interpretation& Causality by Mehdi Ehtesham
ResearchGuru
 
A statistical model for undecidable viral detection
A statistical model for undecidable viral detectionA statistical model for undecidable viral detection
A statistical model for undecidable viral detectionUltraUploader
 
measures of association.pptx
measures of association.pptxmeasures of association.pptx
measures of association.pptx
Ayon Gupta
 
Let X  = (X1,...,Xn) be the blood pressure (measured in .docx
Let X  = (X1,...,Xn) be the blood pressure (measured in .docxLet X  = (X1,...,Xn) be the blood pressure (measured in .docx
Let X  = (X1,...,Xn) be the blood pressure (measured in .docx
washingtonrosy
 
Association & causation m
Association & causation mAssociation & causation m
Association & causation m
Manjesh Goswami
 
Descriptive epidemiology
Descriptive epidemiologyDescriptive epidemiology
Descriptive epidemiology
Dalia El-Shafei
 
J023089094
J023089094J023089094
J023089094
inventionjournals
 
On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...
On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...
On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...
Crescent University Abeokuta
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
mehrasa nikandish
 
Lecture of epidemiology
Lecture of epidemiologyLecture of epidemiology
Lecture of epidemiology
Amany El-seoud
 
Analytic StudiesThere are basically two types of studies experi.docx
Analytic StudiesThere are basically two types of studies experi.docxAnalytic StudiesThere are basically two types of studies experi.docx
Analytic StudiesThere are basically two types of studies experi.docx
rossskuddershamus
 
Inferential Statistics - DAY 4 - B.Ed - AIOU
Inferential Statistics - DAY 4 - B.Ed - AIOUInferential Statistics - DAY 4 - B.Ed - AIOU
Inferential Statistics - DAY 4 - B.Ed - AIOU
EqraBaig
 
3335wGA RSV Prediction
3335wGA RSV Prediction3335wGA RSV Prediction
3335wGA RSV PredictionTimothy Decker
 

Similar to Logistic regression (20)

Frequency Measures Used in EpidemiologyIntroductionIn e.docx
 Frequency Measures Used in EpidemiologyIntroductionIn e.docx Frequency Measures Used in EpidemiologyIntroductionIn e.docx
Frequency Measures Used in EpidemiologyIntroductionIn e.docx
 
Association and causation
Association and causationAssociation and causation
Association and causation
 
You have just finished a health education in-service to the communit.docx
You have just finished a health education in-service to the communit.docxYou have just finished a health education in-service to the communit.docx
You have just finished a health education in-service to the communit.docx
 
Statistics tests and Probablity
Statistics tests and ProbablityStatistics tests and Probablity
Statistics tests and Probablity
 
Russo Madrid Medicine Oct07
Russo Madrid Medicine Oct07Russo Madrid Medicine Oct07
Russo Madrid Medicine Oct07
 
10-Interpretation& Causality by Mehdi Ehtesham
10-Interpretation& Causality  by Mehdi Ehtesham10-Interpretation& Causality  by Mehdi Ehtesham
10-Interpretation& Causality by Mehdi Ehtesham
 
A statistical model for undecidable viral detection
A statistical model for undecidable viral detectionA statistical model for undecidable viral detection
A statistical model for undecidable viral detection
 
measures of association.pptx
measures of association.pptxmeasures of association.pptx
measures of association.pptx
 
Let X  = (X1,...,Xn) be the blood pressure (measured in .docx
Let X  = (X1,...,Xn) be the blood pressure (measured in .docxLet X  = (X1,...,Xn) be the blood pressure (measured in .docx
Let X  = (X1,...,Xn) be the blood pressure (measured in .docx
 
Association & causation m
Association & causation mAssociation & causation m
Association & causation m
 
Descriptive epidemiology
Descriptive epidemiologyDescriptive epidemiology
Descriptive epidemiology
 
epid2-1
epid2-1epid2-1
epid2-1
 
J023089094
J023089094J023089094
J023089094
 
On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...
On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...
On a Sequential Probit Model of Infant Mortality in Nigeria, by K.T. Amzat an...
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Lecture of epidemiology
Lecture of epidemiologyLecture of epidemiology
Lecture of epidemiology
 
Epidemiology Depuk sir_ 1,2,3 chapter,OK
Epidemiology Depuk sir_ 1,2,3 chapter,OKEpidemiology Depuk sir_ 1,2,3 chapter,OK
Epidemiology Depuk sir_ 1,2,3 chapter,OK
 
Analytic StudiesThere are basically two types of studies experi.docx
Analytic StudiesThere are basically two types of studies experi.docxAnalytic StudiesThere are basically two types of studies experi.docx
Analytic StudiesThere are basically two types of studies experi.docx
 
Inferential Statistics - DAY 4 - B.Ed - AIOU
Inferential Statistics - DAY 4 - B.Ed - AIOUInferential Statistics - DAY 4 - B.Ed - AIOU
Inferential Statistics - DAY 4 - B.Ed - AIOU
 
3335wGA RSV Prediction
3335wGA RSV Prediction3335wGA RSV Prediction
3335wGA RSV Prediction
 

More from Khaled Abd Elaziz

Challenges to geriatric care khaled
Challenges to geriatric care khaled Challenges to geriatric care khaled
Challenges to geriatric care khaled
Khaled Abd Elaziz
 
MDA can it be stopped
MDA can it be stopped MDA can it be stopped
MDA can it be stopped
Khaled Abd Elaziz
 
Trachoma
Trachoma Trachoma
Yaws
YawsYaws
Obesity epidemic and carbohydrates
Obesity epidemic and carbohydrates Obesity epidemic and carbohydrates
Obesity epidemic and carbohydrates
Khaled Abd Elaziz
 
Olive oil
Olive oilOlive oil
Filaria 2018 modified
Filaria 2018 modifiedFilaria 2018 modified
Filaria 2018 modified
Khaled Abd Elaziz
 
Smoking behavioral counseling1
Smoking behavioral counseling1Smoking behavioral counseling1
Smoking behavioral counseling1
Khaled Abd Elaziz
 
Zika
ZikaZika
Lymphatic Filariasis in Eastern Mediternean Region
Lymphatic Filariasis in Eastern Mediternean RegionLymphatic Filariasis in Eastern Mediternean Region
Lymphatic Filariasis in Eastern Mediternean Region
Khaled Abd Elaziz
 
Effectiveness of four years mass drug administration in elimination of lympha...
Effectiveness of four years mass drug administration in elimination of lympha...Effectiveness of four years mass drug administration in elimination of lympha...
Effectiveness of four years mass drug administration in elimination of lympha...
Khaled Abd Elaziz
 
Ebola virus epidemic in west Africa
Ebola virus epidemic in west AfricaEbola virus epidemic in west Africa
Ebola virus epidemic in west Africa
Khaled Abd Elaziz
 
Topics in Probabillity
Topics in ProbabillityTopics in Probabillity
Topics in Probabillity
Khaled Abd Elaziz
 
Traveler's health
Traveler's healthTraveler's health
Traveler's health
Khaled Abd Elaziz
 
Passive smoking and children
Passive smoking and childrenPassive smoking and children
Passive smoking and children
Khaled Abd Elaziz
 
Reseach on domestic violence in egypt
Reseach on domestic violence in egyptReseach on domestic violence in egypt
Reseach on domestic violence in egypt
Khaled Abd Elaziz
 
Hepatitis c in arab world and na khaled
Hepatitis c in arab world and na khaledHepatitis c in arab world and na khaled
Hepatitis c in arab world and na khaledKhaled Abd Elaziz
 

More from Khaled Abd Elaziz (18)

Challenges to geriatric care khaled
Challenges to geriatric care khaled Challenges to geriatric care khaled
Challenges to geriatric care khaled
 
MDA can it be stopped
MDA can it be stopped MDA can it be stopped
MDA can it be stopped
 
Trachoma
Trachoma Trachoma
Trachoma
 
Yaws
YawsYaws
Yaws
 
Obesity epidemic and carbohydrates
Obesity epidemic and carbohydrates Obesity epidemic and carbohydrates
Obesity epidemic and carbohydrates
 
Olive oil
Olive oilOlive oil
Olive oil
 
Filaria 2018 modified
Filaria 2018 modifiedFilaria 2018 modified
Filaria 2018 modified
 
Smoking behavioral counseling1
Smoking behavioral counseling1Smoking behavioral counseling1
Smoking behavioral counseling1
 
Zika
ZikaZika
Zika
 
Lymphatic Filariasis in Eastern Mediternean Region
Lymphatic Filariasis in Eastern Mediternean RegionLymphatic Filariasis in Eastern Mediternean Region
Lymphatic Filariasis in Eastern Mediternean Region
 
Effectiveness of four years mass drug administration in elimination of lympha...
Effectiveness of four years mass drug administration in elimination of lympha...Effectiveness of four years mass drug administration in elimination of lympha...
Effectiveness of four years mass drug administration in elimination of lympha...
 
Ebola virus epidemic in west Africa
Ebola virus epidemic in west AfricaEbola virus epidemic in west Africa
Ebola virus epidemic in west Africa
 
Topics in Probabillity
Topics in ProbabillityTopics in Probabillity
Topics in Probabillity
 
Traveler's health
Traveler's healthTraveler's health
Traveler's health
 
Passive smoking and children
Passive smoking and childrenPassive smoking and children
Passive smoking and children
 
Reseach on domestic violence in egypt
Reseach on domestic violence in egyptReseach on domestic violence in egypt
Reseach on domestic violence in egypt
 
School violence
School violenceSchool violence
School violence
 
Hepatitis c in arab world and na khaled
Hepatitis c in arab world and na khaledHepatitis c in arab world and na khaled
Hepatitis c in arab world and na khaled
 

Recently uploaded

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
 
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
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
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
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
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
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
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
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
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
 
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
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
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
 

Recently uploaded (20)

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...
 
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
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
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...
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
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
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
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
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
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...
 
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
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
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...
 

Logistic regression

  • 1. Logistic regression Dr. Khaled Mahmoud Abd Elaziz Lecturer of public health and preventive medicine, Faculty of Medicine- Ain Shams University
  • 2. Logistic regression is very similar to linear regression. When we use logistic regression? We use it when we have a (binary outcome) of interest and a number of explanatory variables. Outcome: e.g. the presence of absence of a symptom, presence or absence of a disease
  • 3. Logistic regression is very similar to linear regression. When we use logistic regression? We use it when we have a (binary outcome) of interest and a number of explanatory variables. Outcome: e.g. the presence of absence of a symptom, presence or absence of a disease
  • 4. From the equation of the logistic regression model we can do: 1-we can determine which explanatory variables can influence the outcome. Which means which variables had the highest OR or the risk in production of the outcome (1= has the disease 0= doesn’t have the disease)
  • 5. From the equation of the logistic regression model we can do: 2- we can use an individual values of the explanatory variables to evaluate he or she will have a particular outcome
  • 6. we start the logistic regression model by creating a binary variable to represent the outcome (Dependant variable) (1= has the disease 0=doesn’t have the disease) We take the probability P of an individual has the highest coded category (has the disease) as the dependant variable. We use the logit logistic transformation in the regression equation
  • 7. The logit is the natural logarithm of the odds ratio of ‘disease’ Logit (P)= ln P/ 1-p The logistic regression equation Logit (p)= a + b1X1+ b2X2 + b3X3 +……… + biXi X= Explanatory variables P= estimated value of true probability that an individual with a particular set of values for X has the disease. P corresponds to the proportion with the disease, it has underlying binominal distribution b= estimated logistic regression coefficients The exponential of a particular coefficient for example eb1 is an estimated of the odds ratio.
  • 8. For a particular value of X1 the estimated odds of the disease while adjusting for all other X’s in the equation. As the logistic regression is fitted on a log scale the effects of X’s are multiplicative on the odds of the disease . This means that their combined effect is the product of their separate effects. This is unlike linear regression where the effects of X’s on the dependant variables are additive.
  • 9. Plain English: 1-Take the significant variables in the univariate analysis 2-Set the P value that you will take those variables to be put in the models e.g. 0.05 or 0.1 3-if all variables in the univariate analysis are insignificant ? Don’t bother doing logisitic regression. There is no question here about those variables for prediction of the disease
  • 10. Plain English: 4- the idea of doing a logisitic regression we have two many variables that are significant with the outcome we are looking for and we want to know which is more stronger in prediction of the disease outcome 5- we look in the output of the statistical program for Odds ratio and CI, significance of the variable, manipulate to select of the best combination of explanatory variables
  • 11. Plain English: 4- the idea of doing a logisitic regression we have two many variables that are significant with the outcome we are looking for and we want to know which is more stronger in prediction of the disease outcome Mathematical model that describes the relationship between an outcome with one or more explanatory variables 5- we look in the output of the statistical program for Odds ratio and CI, significance of the variable, manipulate to select of the best combination of explanatory variables
  • 12. Example: A study was done to test the relationship between HHV8 infection and sexual behavior of men, were asked about histories of sexually transmitted diseases in the past ( gonorrhea, syphilis, HSV2, and HIV) The explanatory variables were the presence of each of the four infection coded as 0 if the patient has no history or 1 if the patient had a history of that infection and the patient age in years
  • 13. Dependant outcome HHV8 infection Parameter estimate P OR 95% CI Intercept -2.2242 0.006 Gonorrhea 0.5093 0.243 1.664 0.71-3.91 Syphilis 1.1924 0.093 3.295 0.82-13.8 HSV2 0.7910 0.0410 2.206 1.03-4.71 HIV 1.6357 0.0067 5.133 1.57- 16.73 Age 0.0062 0.76 1.006 0.97-1.05
  • 14. Example: Chi square for covariate= 24.5 P=0.002 Indicating at least one of the covariates is significantly associated with HHV-8 serostatus. HSV-2 positively associated with HHV8 infection P=0.04 HIV is positively associated with HHV 8 infection P=0.007
  • 15. Those with a history of HSV-2 having 2.21 times odds of being HHV-8 positive compared to those with negative history after adjusting for other infections Those with a history of HIV having 5.1 times odds of being HHV-8 positive compared to those with negative history after adjusting for other infections
  • 16. Multiplicative effect of the model suggests a man who is both HSV2 and HIV seropositive is estimated to have 2.206 X 5.133 = 11.3 times the odds of HHV 8 infection compared to a man negative for both after adjusting for the other two infections. In this example gonorrhea had a significant chi-square but when entered in the model it was not significant (no indication of independent relationship between a history of gonorrhea and HHV8 seropositivity)
  • 17. There is no significant relationship between HHV8 seropositivity and age, the odds ratio indicates that the estimated odds of HHV8 seropositivity increases by 0.6% for each additional year of age.
  • 18. What is the probability of 51 year old man has HHV8 infection if he has gonorrhea positive and HSV2 positive but doesn’t have the two other diseases (Syphilis and HIV)? Add up the regression coefficients Constant +b1 +b2 +b3X age -2.2242 + 0.5093+0.7910+ (0.0062X51)= -0.6077
  • 19. probability of this person= P= ez / 1+ ez P= e (-0.6077)/ 1+ e (-0.6077) =0.35