Logistic regression
-
Upload
drzahid-khan -
Category
Health & Medicine
-
view
740 -
download
0
description
Transcript of Logistic regression
![Page 1: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/1.jpg)
1
LOGISTIC REGRESSION
Senior Lecturer King Faisal University,KSA
By Dr Zahid Khan
![Page 2: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/2.jpg)
2
What is logistic regression?Logit for short, a specialized form of regressionused when the dependent variable is dichotomous and categorical while
the independent variable(s) could be any type.• Dependent variable is binary (yes/no, Male/Female ) outcome.
• Independent variables are continuous interval
• Examples:• Relation of weight and BP to 10 year risk of death
• Relation of CD4 count to 1 year risk of AIDS diagnosis
![Page 3: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/3.jpg)
3
Logistic Regression
• Form of regression that allows the prediction of discrete variables by a mix of continuous and discrete/nominal predictors.
• Addresses the same questions that discriminant function analysis and multiple regression do but with no distributional assumptions on the predictors (the predictors do not have to be normally distributed, linearly related or have equal variance in each group)
• Does not assume a linear relationship between DV and IV
![Page 4: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/4.jpg)
Why we use logistic ?
No assumptions about the distributions of the predictor variables.
Predictors do not have to be normally distributed
Does not have to be linearly related.
When equal variances , covariance doesn't exist across the groups.
Predictor variables is not parametric and there is no homoscedasticity. E.g variance of dependent and independent variables are not equal.
4
![Page 5: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/5.jpg)
Stage 1:Objectives Of logistic regression
Identify the independent variable that impact in the dependent variable
Establishing classification system based on the logistic model for determining the group membership
DECISION PROCESS
![Page 6: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/6.jpg)
Types of logistic regression
• BINARY LOGISTIC REGRESSION It is used when the dependent variable is dichotomous.
MULTINOMIAL LOGISTIC REGRESSION It is used when the dependent or outcomes variable has more than
two categories.
![Page 7: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/7.jpg)
Linear Regression
Independent Variable Dependent Variable
7
![Page 8: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/8.jpg)
8
Logistic Regression
Independent Variable Dependent Variable
![Page 9: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/9.jpg)
Binary logistic regression expression
Y = Dependent Variablesß˚ = Constantß1 = Coefficient of variable X1
X1 = Independent VariablesE = Error Term
BINARY
![Page 10: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/10.jpg)
SAMPLE SIZE
Very small samples have so much sampling errors.
Very large sample size decreases the chances of errors.
Logistic requires larger sample size than multiple regression.
Hosmer and Lamshow recommended sample size greater than 400.
![Page 11: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/11.jpg)
SAMPLE SIZE PER CATEGORY OF THE INDEPENDENT VARIABLE
The recommended sample size for each group is at least 10 observations per estimated parameters.
![Page 12: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/12.jpg)
Estimation of logistic regression model assessing overall fit
Logistic relationship describe earlier in both estimating the logistic model and establishing the relationship between the dependent and independent variables.
Result is a unique transformation of dependent variables which impacts not only the estimation process but also the resulting coefficients of independent variables.
![Page 13: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/13.jpg)
Transforming the dependent variable
S-shaped Range (0-1)
![Page 14: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/14.jpg)
Description of the dataThe data used to conduct logistic regression is from a survey of 30
homeowners conducted by an electricity company about an offer of roof solar panels with a 50% subsidy from the state government as part of the state’s environmental policy.
The variables are: •IVs: household income measured in units of a thousand dollars age of householder
monthly mortgagesize of family household
•DV: whether the householder would take or decline the offer. Take the offer was coded as 1 and decline the offer was coded as 0.
![Page 15: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/15.jpg)
WHAT IS THE RESEARCH QUESTION?
To determine whether household income and monthly mortgage will predict taking or declining the solar panel offer
Independent Variables: household income and monthly mortgage
Dependent Variables: Take the offer or decline the offer
![Page 16: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/16.jpg)
Two hypotheses to be tested
• There are two hypotheses to test in relation to the overall fit of the model:
H0: The model is a good fitting model
H1: The model is not a good fitting model (i.e. the predictors have a significant effect)
![Page 17: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/17.jpg)
How to perform logistic regression in spss
1) Click Analyze2) Select Regression3) Select Binary Logistic4) Select the dependent variable, the one which is a grouping
variable (0 and 1) and place it into the Dependent Box, in this case, take or decline offer
5) Enter the predictors (IVs) that you want to test into the Covariates Box. In this case, Household Income and Monthly Mortgage
6) Leave Enter as the default method
![Page 18: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/18.jpg)
Continuation of SPSS Steps
•7) If there is any categorical IV, click on Categorical button and enter it. There is none in this case.
•8) In the Options button, select Classification Plots, Hosmer-Lemeshow goodness-of-fit, Casewise Listing of residuals. Retain default entries for probability of stepwise, classification cutoff, and maximum iterations
•9) Continue, then, OK
![Page 19: Logistic regression](https://reader035.fdocuments.net/reader035/viewer/2022081809/554b43c0b4c905ff268b4e4d/html5/thumbnails/19.jpg)
20
Any Questions !!!
• Thank You