Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "C. Logit model, logistic regression, and log-linear model A comparison."— Presentation transcript:

1

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

3 Leaving home Models of counts: log-linear model

4 Leaving home

5

6  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 Model 3: Time and Sex (unsaturated log-linear model) Leaving home

7

8

9 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 Leaving home

10 Log-linear and logit model

11 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: Political attitudes

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

13 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 a = and b = Log odds of reference category (males) Log odds ratio (odds females / odds males) with x = 0, 1 Political attitudes

14 The logit model as a regression model

15 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

16 DATA Sex Party Male Female Total Conservative279 352 631 Labour 335 291 626 Total 614 643 1257 Logit model: descriptive statistics Counts in terms of odds and odds ratio Reference categories: Labour; Males F 11 = 279 F 21 = 335 = 279 * 335/279 = 279 / 0.8328 F 12 = 352 = 279 * 352/279 = 279 1.2616 F 22 = 291 = 279 * 352/279 * 291/352 = 279 * 1.2616 * [1/1.2096] Political attitudes

17

18 Logistic regression SPSS 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 Reference category: females (X = 1 for males and X = 0 for females) 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 Political attitudes

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

20 Leaving Home

21 Leaving home

22 Relation logit and log-linear model The 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: Leaving home

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

24 Relation logit and log-linear model The 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): Leaving home

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

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

27

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

29 The logistic regression in SPSS Micro data and tabulated data

30 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

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

32 The logistic regression in SPSS Leaving home

33 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


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

Similar presentations


Ads by Google