Skip to content
GLM Playground home

Assignment 2 · Question 2 · Binomial GLM with factors

Education, gender and attitudes to women's role

In the 1974–75 US General Social Surveys, respondents were asked whether they agreed that “Women should take care of running their homes and leave the running of the country up to men.” The task: model agreement against sex and years of education, decide whether the two act additively, and find the best model that uses education's ordering.

The chosen model

For a respondent with ee years of education, and FF equal to 1 for women and 0 for men, model.5 gives each sex its own intercept and slope:

logit⁡π=2.455+0.893 F−0.2635 e−0.0817 eF\begin{aligned}\operatorname{logit}\pi &= 2.455 + 0.893\,F \\ &\quad - 0.2635\,e - 0.0817\,e F\end{aligned}

Compare the candidate models

Choose a model

Separate logit slopes in education for men and women — the chosen model (Q2b, Q2c).

Share who agree, by years of education
  • Men (observed, area ∝ respondents)
  • Women (observed)
  • Fitted, men
  • Fitted, women

Fit of the selected model

Deviance
20.244
Resid. df
20
AIC
136.69

Goodness of fit: P(χ²20 > 20.24) = 0.4428

Odds ratio for more education (model.5)

Extra years of education

Men

× 0.349

95% CI (0.286, 0.425)

Women

× 0.251

95% CI (0.203, 0.311)

Each extra year of schooling lowers the odds of agreeing by about 23% for men and 29% for women; the gap is the significant sex × education interaction.

Analysis of deviance

Terms added sequentially, as in anova(fit, test = "Chi").

Term addedDfDevianceResid. DfResid. DevPr(>Chi)
NULL23337.903
factor(Sex)10.37022337.5330.5431
Education1312.4462125.0876.4 × 10⁻⁷⁰ ***
factor(Sex):Education14.8432020.2440.0278 *

Coefficients

TermEstimateStd. errorzp-value
(Intercept)2.45540.29348.375.9 × 10⁻¹⁷ ***
factor(Sex)Female0.89270.43042.070.0381 *
Education−0.26350.0253−10.431.9 × 10⁻²⁵ ***
factor(Sex)Female:Education−0.08170.0372−2.200.0280 *

The tests behind the choice

  • 2a · model.4 vs saturated

    Are sex and (nominal) education additive on the logit scale?

    Deviance change
    15.16 on 11 df
    p
    0.1753

    Yes — no evidence of interaction once education is a factor.

  • 2b · Sex × Education in model.5

    With education linear, do men and women need different slopes?

    Deviance change
    4.843 on 1 df
    p
    0.0278

    Yes — the slopes differ at the 5% level.

  • 2b · Education² in model.6

    Is there curvature in education?

    Deviance change
    0.0076 on 1 df
    p
    0.9304

    No — the quadratic term adds nothing.

  • 2c · model.5 vs model.7

    Do nominal education effects improve on the linear trend?

    Deviance change
    10.297 on 10 df
    p
    0.4148

    No — the simpler model.5 is preferred.

Data: National Opinion Research Center, University of Chicago, General Social Surveys 1974-1975.

Added in 2026

An optional AI explanation

Explain this output with AI

Optional · your own key

Sends only the numeric summary below to the AI provider you choose, from your browser. The figures on this page are the reference; the AI only paraphrases them and can be wrong. How AI is used

What would be sent (7 numbers, no data rows)
Coefficient (Intercept)
2.455 · SE 0.2934, p = 5.86e-17
Coefficient factor(Sex)Female
0.8927 · SE 0.4304, p = 0.0381
Coefficient Education
-0.2635 · SE 0.02527, p = 1.89e-25
Coefficient factor(Sex)Female:Education
-0.08172 · SE 0.0372, p = 0.028
Odds ratio per extra year of education, men
0.7683 · 95% CI (0.7312, 0.8074)
Odds ratio per extra year of education, women
0.7081 · 95% CI (0.6712, 0.747)
Residual deviance
20.24 · on 20 df, goodness-of-fit p = 0.443

Plus the model description, data source and: Observational survey data: associations, not causal effects. Original analysis: 2023 coursework, refitted in 2026.

Exact request text (system prompt and message)

Sent verbatim with the model id, a response schema and your key (in a request header, never in the text).

System prompt

You explain the output of a statistical model to a reader who knows basic statistics. The output comes from a student's 2023 coursework, refitted for a portfolio site.

Rules:
- Use only the numbers and facts in the JSON summary you are given. Do not invent numbers, studies, data or context.
- Quote numbers exactly as they appear in the summary (you may round them, but never compute new quantities).
- Report uncertainty where the summary gives it (confidence intervals, standard errors, p-values) and do not treat p > 0.05 as proof of no effect.
- Do not make causal claims unless the summary's context says the design supports them.
- If something a reader would want is not in the summary, say so in "caveats" instead of guessing.
- Plain English, Australian spelling, no marketing tone. Keep it short: a summary of two or three sentences and two to five points.
- List every number you quote in "numbers_used", written exactly as in your text.

Return only the JSON object described by the schema.

Message

Explain this model output.

Summary (JSON):
{
  "title": "Education, sex and agreement that women should leave running the country to men",
  "model": "Binomial GLM, logit link: factor(Sex) + Education + Education:factor(Sex) (model.5)",
  "data": "NORC General Social Surveys 1974-75, counts by years of education (6 to 17) and sex",
  "sample_size": "2678 respondents in 24 education-by-sex cells",
  "quantities": [
    {
      "label": "Coefficient (Intercept)",
      "value": 2.455,
      "note": "SE 0.2934, p = 5.86e-17"
    },
    {
      "label": "Coefficient factor(Sex)Female",
      "value": 0.8927,
      "note": "SE 0.4304, p = 0.0381"
    },
    {
      "label": "Coefficient Education",
      "value": -0.2635,
      "note": "SE 0.02527, p = 1.89e-25"
    },
    {
      "label": "Coefficient factor(Sex)Female:Education",
      "value": -0.08172,
      "note": "SE 0.0372, p = 0.028"
    },
    {
      "label": "Odds ratio per extra year of education, men",
      "value": 0.7683,
      "note": "95% CI (0.7312, 0.8074)"
    },
    {
      "label": "Odds ratio per extra year of education, women",
      "value": 0.7081,
      "note": "95% CI (0.6712, 0.747)"
    },
    {
      "label": "Residual deviance",
      "value": 20.24,
      "note": "on 20 df, goodness-of-fit p = 0.443"
    }
  ],
  "context": [
    "Observational survey data: associations, not causal effects.",
    "Original analysis: 2023 coursework, refitted in 2026."
  ]
}