1 / 32

C. Logit model, logistic regression, and log-linear model A comparison

C. Logit model, logistic regression, and log-linear model A comparison. Leaving home. Models of counts: log-linear model. Leaving home. Leaving home. Leaving home. Model 3: Time and Sex (unsaturated log-linear model).  11 = exp[4.697] = 109.6  21 = exp[4.697 + 0.4291] = 168.4

leverett
Download Presentation

C. Logit model, logistic regression, and log-linear model A comparison

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C. Logit model, logistic regression, and log-linear model A comparison

  2. Leaving home Models of counts: log-linear model

  3. Leaving home

  4. Leaving home

  5. Leaving home Model 3: Time and Sex (unsaturated log-linear model) 11 = exp[4.697] = 109.6 21 = exp[4.697 + 0.4291] = 168.4 12 = exp[4.697 - 0.0982] = 99.4 22 = exp[4.697 + 0.4291 - 0.0982] = 152.8

  6. Leaving home

  7. Leaving home

  8. Leaving home • Model 4: TIME AND SEX AND TIME*SEX interaction 11 = exp[4.905 = 135 21 = exp[4.905 + 0.0576] = 143 12 = exp[4.905 - 0.6012] = 74 22 = exp[4.905 + 0.0576 - 0.6012 + 0.8201] = 178

  9. Log-linear and logit model

  10. Political attitudes Log-linear model: Select one variable as a dependent variable: response variable, e.g. does voting behaviour differ by sex Are females more likely to vote conservative than males? Logit model:

  11. Political attitudes Are females more likely to vote conservative than males? A = Party; B = Sex Effect coding (1) Males voting conservative rather than labour: Log-odds = logit Females voting conservative rather than labour:

  12. Political attitudes Are women more conservative than men? Do women vote more conservative than men? The odds ratio. If the odds ratio is positive, then the odds of voting conservative rather than labour is larger for women than men. In that case, women vote more conservative than men. Logit model: with x = 0, 1 with a = Log odds of reference category (males) and b = Log odds ratio (odds females / odds males)

  13. The logit model as a regression model

  14. Select a response variable  proportion • Dependent variable of logit model is the log of (odds of) being in one category rather than in another. • Number of observations in each subpopulation (males, females) is assumed to be fixed. • Intercept (a) = log odds of reference category • Slope (b) = log odds ratio

  15. Political attitudes Logit model: descriptive statistics Counts in terms of odds and odds ratio DATA Sex Party Male Female Total Conservative 279 352 631 Labour 335 291 626 Total 614 643 1257 Reference categories: Labour; Males F11 = 279 F21 = 335 = 279 * 335/279 = 279 / 0.8328 F12 = 352 = 279 * 352/279 = 279 1.2616 F22 = 291 = 279 * 352/279 * 291/352 = 279 * 1.2616 * [1/1.2096]

  16. Political attitudes

  17. Political attitudes Logistic regression SPSS Reference category: females (X = 1 for males and X = 0 for females) Variable Param S.E. Exp(param) SEX(1) .3732 .1133 1.4524 Constant -.1903 .0792 Females voting labour: 1/[1+exp[-(-0.1903)]] = 45%  291/626 (females ref.cat) Males voting labour: 1/[1+exp[-(-0.1903+0.3732)]] = 55%  335/626 Different parameter coding: X = -0.5 for males and X = 0.5 for females Variable Param S.E. Exp(param) SEX(1) -.3732 .1133 0.6885 Constant -.0037 .0567 Females voting labour: 1/[1+exp[-(-0.0037 + 0.5*(-0.3732))]] = 45%  291/626 Males voting labour: 1/[1+exp[-(-0.0037 - 0.5 * (-0.3732))]] = 55%  335/626

  18. Observation from a binomial distribution with parameter p and index m The logit model and the logistic regression Leaving parental home

  19. Leaving Home

  20. Leaving home

  21. Leaving home Relation logit and log-linear modelThe unsaturated model Log-linear model: With i effect of timing and j effect of sex Odds of leaving parental home late rather than early: females:

  22. Leaving home Relation logit and log-linear modelThe unsaturated model Odds of leaving parental home late rather than early: males:

  23. Leaving home Relation logit and log-linear modelThe saturated model Log-linear model: With i effect of timing and j effect of sex and ij the effect of interaction between timing and sex Odds of leaving parental home late rather than early: females (ref):

  24. Leaving home Relation logit and log-linear modelThe saturated model Odds of leaving parental home late rather than early: males:

  25. Leaving home Logit model: X=0 for males X=1 for females Logistic regression: probability of leaving home late

  26. Leaving home

  27. Leaving home Dummy coding: ref.cat: females, late Effect coding or marginal coding: females +1; males –1

  28. The logistic regression in SPSS Micro data and tabulated data

  29. SPSS: Micro-data • Micro-data: age at leaving home in months • Crosstabs: Number leaving home by reason (row) and sex (column) • Create variable: Age in years • Age = TRUNC[(month-1)/12] • Create variable: TIMING2 based on MONTH: • TIMING2 =1 (early) if month  240 & reason < 4 • TIMING2 =2 (late) if month > 240 & reason < 4 • For analysis: select cases that are NOT censored: SELECT CASES with reason < 4

  30. SPSS: tabulated data • Number of observations: WEIGHT cases (in data) • No difference between model for tabulated data and micro-data

  31. Leaving home The logistic regression in SPSS

  32. Related models • Poisson distribution: counts have Poisson distribution (total number not fixed) • Poisson regression • Log-linear model: model of count data (log of counts) • Binomial and multinomial distributions: counts follow multinomial distribution (total number is fixed) • Logit model: model of proportions [and odds (log of odds)] • Logistic regression • Log-rate model: log-linear model with OFFSET (constant term) Parameters of these models are related

More Related