Presentation is loading. Please wait.

Presentation is loading. Please wait.

When and why to use Logistic Regression?  The response variable has to be binary or ordinal.  Predictors can be continuous, discrete, or combinations.

Similar presentations


Presentation on theme: "When and why to use Logistic Regression?  The response variable has to be binary or ordinal.  Predictors can be continuous, discrete, or combinations."— Presentation transcript:

1

2 When and why to use Logistic Regression?  The response variable has to be binary or ordinal.  Predictors can be continuous, discrete, or combinations of variables.  Predictors do not have to be normally distributed  Predictors does not have to be linearly related.  estimated probabilities lie between 0 and 1.  Non-linear relationships between the response and predictors

3  A non-parametric method that requires no specific distribution of the errors.  Offers easy model-building or variable selection procedures.  Parameter estimates are obtained by maximum likelihood methods When and why to use Logistic Regression?

4 The Logistic Model If (p) is the probability of the event, then odds of the event is : The simple logistic model is based on a linear relationship between natural logarithm (ln) of the odds of an event and independent variables logit of y {

5 Using the laws of exponents and logs to express (p) in terms of L : and : The Logistic Model

6 L=ln(o) probability (s shaped curve) The Logistic Model

7

8 Basic interpretation of . When x 1 = x and x 2 = x +1, then the log odds changes by  amount which means that, the odds becomes exp(  ) times the original.

9 Basic interpretation of .

10 Data Form The data could be collected either : Individually ( binary data ) As a group (if there are more observations on each x value) In this case, it is sufficient to report the total number of ‘1’s at each x value.

11 Example 1: binary data agemastitisageMastitis 191261 201270 200271 201270 210270 211291 211300 221300 221310 220320 231

12 OR P(mastitis)=1 Example 1: binary data

13 For age 22 month

14 OR compares the odds of an event for two cows, one with and the one with With X values 1 unit apart :

15 Odds ratios range from 0 to positive infinity O R < 1 = (P) <.50, OR > 1 = ( p ) >.50. Odds ratios

16 Deviance Measure of deviation between the estimated and observed values analogous to SS residual for linear model

17 Example 2 : grouped data Age group Number in group Mastitis in group 1911 2032 2132 2232 2311 2611 2741 2911 3020 3110 3210

18 95% confidence limits 95% confidence interval around the odds ratio : ?

19 Summary of main points Logistic regression model is used to analyze the association between a binary outcome and one or many determinants. The determinants can be binary, categorical or continuous measurements The model is logit (p) = log[p / (1-p)] = a + bX where X is a factor, and a and b must be estimated

20 Thank you for your attention

21 About logit Logit this is the natural log of an odds ratio; often called a log odds even though it really is a log odds ratio. The logit scale is linear and functions much like a z- score scale. LOGITS ARE CONTINOUS, LIKE Z SCORES p = 0.50 logit = 0 p = 0.70 logit = 0.84 p = 0.30 logit = -0.84

22 More on odds ratios Gender difference in preference for sport. A group of 57 men and 167 women were asked to make preference for sport. The results are as follows: Question: Is there a gender effect on the preference ? GenderlikeDislikeALL Men233457 Women35132167 ALL58166224

23 O men = 0.403 / 0.597 = 0.676 O women = 0.209 / 0.791 = 0.265 GenderLikeDislikeAllP(like) Men2334570.403 Women351321670.209 All581662240.259 Meaning: the odds of preference in men is 2.55 times higher than in women OR = O men / O women = 0.676 / 0.265 = 2.55 More on odds ratios

24 OR > 1: the odds of preference is higher in men than in women OR < 1: the odds of preference is lower in men than in women OR = 1: the odds of preference in men is the same as in women Note : More on odds ratios


Download ppt "When and why to use Logistic Regression?  The response variable has to be binary or ordinal.  Predictors can be continuous, discrete, or combinations."

Similar presentations


Ads by Google