logistic regression

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/40

encourage image

There are no tags or description

Looks like no tags are added yet.

41 Terms

1
New cards

Why use logistic regression?

The DV is categorical (binary, multinomial, or ordinal) rather than continuous

2
New cards

Binary vs. multinomial vs. ordinal logistic regression

Binary: 2 outcomes (quit / didn't). Multinomial: 3+ unordered categories. Ordinal: 3+ ordered categories (e.g., Likert ratings).

3
New cards

Problem 1 with linear regression on a binary DV

Predicted values can fall below 0 or above 1, which are impossible probabilities

4
New cards

Two linear regression assumptions a binary DV violates

Normality of Y (Y is only 0 or 1) and constant variance (variance of a binary variable is p(1 - p), which changes with X)

5
New cards

Odds formula

p / (1 - p)

6
New cards

Odds for a 75% probability

.75 / .25 = 3 (3 to 1)

7
New cards

Range of odds

0 to +infinity

8
New cards

Odds = 1, > 1, < 1 means…

= 1: 50/50. > 1: event more likely than not. < 1: event less likely than not.

9
New cards

Logit

The natural log of the odds: ln[p / (1 - p)]

10
New cards

Range of the logit

-infinity to +infinity

11
New cards

Logit = 0, > 0, < 0 means…

= 0: p = .50. > 0: p > .50. < 0: p < .50.

12
New cards

Why predict the logit instead of p?

The logit is unbounded, so a straight-line equation can predict it without going outside possible values

13
New cards

Logarithm vs. exponentiation

They are inverses: log returns the exponent; exponentiation (e^x) undoes the log

14
New cards

Natural log base

e (approx. 2.718)

15
New cards

Logistic regression equation (logit form)

ln[p / (1 - p)] = b0 + b1X

16
New cards

Logistic regression equation (probability form)

p = 1 / (1 + e^-(b0 + b1X)), also written e^z / (1 + e^z)

17
New cards

Shape of the logistic function

S-shaped (sigmoid) curve bounded between 0 and 1

18
New cards

How are logistic regression weights estimated?

Maximum likelihood (minimizing the negative log-likelihood), not least squares

19
New cards

Logistic regression coefficient (b) means…

The change in the log odds (logit) of Y = 1 for a 1-unit increase in X; also the log of the odds ratio

20
New cards

Odds ratio (OR)

e^b: the factor by which the odds of Y = 1 are multiplied for a 1-unit increase in X; a ratio of two odds

21
New cards

Sign of b and size of OR

b > 0

22
New cards

Logit vs. odds ratio vs. coefficient

Logit = log of one odds. OR = ratio of two odds. Coefficient = log of the OR = difference between two logits.

23
New cards

Deck engagement example: b = 0.303. Odds ratio?

e^0.303 = 1.35: each 1-point increase in engagement multiplies the odds of retention by 1.35 (35% higher odds)

24
New cards

Converting an OR to a percent change in odds

(OR - 1) x 100. OR = .893 -> 10.7% lower odds; OR = 1.108 -> 10.8% higher odds

25
New cards

Wald statistic

Tests H0: b = 0 for one predictor (like a t-test); biased when b is large

26
New cards

Better alternative to the Wald test

Compare nested models with a likelihood-ratio (chi-square) test, adding one predictor at a time

27
New cards

Log-likelihood (LL)

Like the residual SS in linear regression: how much is unexplained after fitting; smaller -2LL (deviance) = better fit

28
New cards

Comparing two logistic models

The difference in their deviances (-2LL) is a chi-square with df = difference in number of predictors

29
New cards

Deck: null deviance 690.83, residual deviance 352.50

Drop of 338.3 on 1 df: engagement greatly improves fit

30
New cards

Hosmer-Lemeshow (HL) test

Overall goodness-of-fit test: groups cases (8-12 groups, often deciles) by predicted probability and compares observed vs. expected counts with chi-square

31
New cards

Interpreting the HL p-value

Small p (< .05) = poor fit. Large p (> .05) = good fit. (Opposite of most tests.)

32
New cards

Weaknesses of the HL test

Low power (esp. n < 30), ignores overfitting, arbitrary number of groups, results change with small changes in grouping

33
New cards

Multinomial logistic regression

For 3+ unordered DV categories; fits k - 1 binary models, each comparing one category to a reference category, each with its own intercept and coefficients

34
New cards

Relative risk ratio (RRR)

e^b in multinomial regression: how the odds of being in category k vs. the reference change per 1-unit increase in X

35
New cards

Multinomial deck example: IQ coefficient -0.113 for vocational vs. academic

Each extra IQ point lowers the odds of vocational vs. academic; OR = e^-0.113 = .893

36
New cards

Ordinal logistic regression

For ordered DV categories; models cumulative splits of the categories (proportional odds model, R: MASS::polr)

37
New cards

Cumulative splits for 4 ordered categories (0-3)

3 splits: 0 vs. 1,2,3; 0,1 vs. 2,3; 0,1,2 vs. 3

38
New cards

Proportional odds assumption

The predictor's effect (one b / odds ratio) is the same across every split; only the intercepts (thresholds, zeta) differ

39
New cards

Ordinal regression intercepts

Thresholds (zeta) on the underlying continuous scale separating adjacent categories

40
New cards

Ordinal deck example: age b = 0.103

OR = 1.108: each extra year multiplies the odds of being in a higher education level by 1.108 (10.8% higher)

41
New cards