1/40
Looks like no tags are added yet.
Dummy variable
Coded 1 if in a category, 0 if not. Lets a categorical variable enter a regression.
Why include a categorical variable
(1) Explain more variation. (2) Avoid omitted variable bias.
Income vs. education by gender (slide 4): (a) same education
Parallel lines; ignoring gender gives the same slope (no bias) but leaves much variation unexplained.
Income vs. education by gender (slide 4): (b) women more educated
Ignoring gender makes the pooled slope negative even though education raises income in both groups → omitted variable bias.
Additive dummy model
Y = α + βX + γD. D = 0: Y = α + βX. D = 1: Y = (α + γ) + βX. Parallel lines; γ = vertical gap.
Interpret a dummy coefficient γ
"Holding X constant, [group] has on average γ more/less Y than [baseline group]."
Baseline (reference) category
The group coded 0 on all dummies; every dummy coefficient is a comparison with it.
Changing the dummy coding
γ changes sign, not size; fitted lines identical.
m − 1 rule
A factor with m categories needs m − 1 dummies.
Dummy variable trap
Including all m dummies + intercept → dummies always sum to 1 = intercept → perfect collinearity → no unique solution (NA).
Davis additive: sexM = −0.499, p = 0.299
"Holding reported weight constant, men's measured weight is on average 0.50 kg lower than women's." H₀: γ = 0; p > 0.05 → fail to reject: no evidence of a sex difference.
Prestige additive model coefficients
Intercept −0.62; income 0.001013; education 3.673; prof 6.04 (p = 0.12); wc −2.74 (p = 0.28). Blue collar = baseline.
Prestige group intercepts
Blue collar −0.62; professional −0.62 + 6.04 = 5.42; white collar −0.62 − 2.74 = −3.36. Same slopes → parallel planes.
Interpret prof = 6.04
"Holding income and education constant, professional occupations have on average 6.04 more prestige points than blue-collar occupations."
Incremental F-test formula
F = [(R²full − R²reduced)/q] ÷ [(1 − R²full)/(n − k − 1)] = [(RSSred − RSSfull)/q] ÷ [RSSfull/(n − k − 1)]. q = terms tested; df from the full model.
Prestige type: R² 0.835 vs. 0.814, n = 98, k = 4, q = 2
F = (0.021/2) ÷ (0.165/93) = 0.0105/0.00177 ≈ 5.87, p = 0.004 → reject H₀: γ_prof = γ_wc = 0; occupation type matters.
Why both dummies not significant but joint F is
Each t-test only compares one group with the baseline; the joint F-test asks whether the factor matters at all (and doesn't depend on the baseline).
One coefficient vs. several
One → t-test (or F with q = 1, F = t²). Several (factor dummies, set of interactions) → incremental F-test.
Interaction (definition)
The effect of one X depends on the value of another. Visual signature: non-parallel lines. Works both ways.
Interaction vs. correlation
Correlation: Xs related to each other (women have more education). Interaction: one X changes the effect of another on Y. Either can occur without the other.
Interaction model
Y = α + βX + γD + δ(X·D). D = 0: Y = α + βX. D = 1: Y = (α + γ) + (β + δ)X. δ = difference in slopes.
Testing interaction
H₀: δ = 0 (same slope for both groups, parallel lines). Hₐ: δ ≠ 0.
Meaning of β and γ in an interaction model
β = slope for the baseline group only. γ = group gap only at X = 0 (often meaningless).
Principle of marginality
Test/interpret interactions first; if significant, don't interpret main effects alone (describe group by group); always keep main effects when an interaction is included; if the interaction isn't significant, drop it.
Davis interaction: repwt:sexM = −0.008, p = 0.832
Women's slope 0.977; men's 0.977 − 0.008 = 0.969. Fail to reject H₀: δ = 0 → no interaction, parallel lines → use additive model.
Reading interaction output
Rows without a colon = baseline group. Rows with a colon = difference from baseline. Add them for each group's slope.
Prestige income slopes by type
Blue collar 0.00352; professional 0.00352 − 0.00290 = 0.00062; white collar 0.00352 − 0.00207 = 0.00145. Per $1,000: 3.5, 0.6, 1.5 points.
Prestige education slopes by type
Blue collar 1.71; professional 1.71 + 1.39 = 3.10; white collar 1.71 + 4.29 = 6.00.
Anova (Type II): income:type F = 11.92, p < 0.001
Effect of income on prestige differs by occupation type (holding education constant). Don't interpret the income main effect alone.
Anova (Type II): type:education F = 2.99, p = 0.056
Only weak evidence (not significant at 5%) that the education effect differs by type.
Type-II tests
Each term tested in models that leave out its own higher-order interactions but keep everything else. Respects marginality. Read interaction rows first.
Effect plot: non-parallel lines
Shows the interaction. Prestige: income line steepest for blue collar, flattest for professional.
Dropping non-significant terms
Risky: "no evidence of an effect" ≠ "evidence of no effect"; may remove a confounder → bias.
Keeping significant terms
Risky: multiple testing → false positives; large n → trivial effects significant.
Adjusted R²
1 − [(n − 1)/(n − s)] × RSS/TSS; s = parameters incl. intercept. Penalizes extra parameters; choose the highest. Prestige: additive 0.828 vs. interaction 0.863 → keep interactions.
One-way ANOVA
A regression with only dummy regressors for one factor. Compares group means.
ANOVA parameters
α = mean of the baseline group; γⱼ = mean of group j − baseline mean.
ANOVA H₀
μ₁ = μ₂ = μ₃ ⟺ γ₁ = γ₂ = 0; tested with the F-test.
Duncan ANOVA (logit prestige): SS type 95.55 (df 2), residual 38.60 (df 42)
F = 47.78/0.919 = 51.98, p < 0.001 → means differ. R² = 95.55/134.15 = 0.71.
Duncan ANOVA coefficients
Intercept −1.48 = blue-collar mean logit (≈ 18.5%). prof 3.11 → e^3.11 ≈ 22× the odds of a "good" rating vs. blue collar. wc 0.89 (p = 0.051).
Why logit Duncan prestige before ANOVA
Prestige is a 0–100 percentage pushing against both limits → skew (blue collar near bottom, professional near top) and unequal spread. Logit removes the bounds → more symmetric, equal spreads.