Assignment 3 · Question 3 · Generalised estimating equations
Children's wheeze, age and maternal smoking
537 children in Steubenville, Ohio were checked for wheeze every year from age 7 to 10 as part of an air-pollution study. Repeated answers from the same child are correlated, so the assignment interpreted a logistic GEE fit with an exchangeable working correlation.
The marginal model
For child at age code (age − 9), with :
Design matrix for child 536, whose mother smoked (Q3b): intercept, age code, smoke.
Explore the fit
- Mother non-smoker
- Mother smoker
Hollow dots: observed rates with 95% Wilson intervals (350 children of non-smoking and 187 of smoking mothers, every child seen at each age). Lines and bands: GEE (exchangeable) fitted probabilities with pointwise 95% intervals from the robust covariance.
Why GEE: repeated measures are correlated
Each child is measured four times. The exchangeable working correlation assumes one common correlation α between any two visits; GEE estimates it as 0.3543 (scale φ = 0.9985).
Observed correlation
| 7 | 8 | 9 | 10 | |
|---|---|---|---|---|
| 7 | 1.00 | 0.35 | 0.31 | 0.33 |
| 8 | 0.35 | 1.00 | 0.44 | 0.33 |
| 9 | 0.31 | 0.44 | 1.00 | 0.38 |
| 10 | 0.33 | 0.33 | 0.38 | 1.00 |
Exchangeable working R(α)
| 7 | 8 | 9 | 10 | |
|---|---|---|---|---|
| 7 | 1.00 | 0.35 | 0.35 | 0.35 |
| 8 | 0.35 | 1.00 | 0.35 | 0.35 |
| 9 | 0.35 | 0.35 | 1.00 | 0.35 |
| 10 | 0.35 | 0.35 | 0.35 | 1.00 |
Same estimates, different uncertainty
(Intercept)
- Naive GLM
- −1.8837SE 0.0838 · p < 0.0001
- GEE, independence (robust)
- −1.8837SE 0.1142 · p < 0.0001
- GEE, exchangeable (robust)
- −1.8804SE 0.1139 · p < 0.0001
age
- Naive GLM
- −0.1134SE 0.0541 · p 0.0360
- GEE, independence (robust)
- −0.1134SE 0.0439 · p 0.0097
- GEE, exchangeable (robust)
- −0.1134SE 0.0439 · p 0.0097
smoke
- Naive GLM
- 0.2721SE 0.1235 · p 0.0275
- GEE, independence (robust)
- 0.2721SE 0.1780 · p 0.1263
- GEE, exchangeable (robust)
- 0.2651SE 0.1777 · p 0.1359
- Naive GLM
- GEE, independence (robust)
- GEE, exchangeable (robust)
Ignoring clustering makes the between-child smoking effect look significant (naive p = 0.0275); the robust GEE standard error is about 44% larger (p = 0.1359). For the within-child age effect the robust error is smaller.
Odds-ratio calculator
Child A
Child B
Odds ratio, A vs B
1.164
95% CI (0.812, 1.668) · SE 0.2139
P(wheeze): A / B
15.1% / 13.2%
Population-averaged probabilities
Defaults reproduce Q3(d): a 10-year-old with a smoking mother versus a 9-year-old with a non-smoking mother. Robust (sandwich) standard errors throughout.
What the 2023 analysis found
(c) Each extra year of age multiplies the odds of wheezing by 0.8928 (approximate SE 0.0392 by the delta method; 95% CI (0.819, 0.973)): wheeze becomes slightly less common as children grow.
(d) A 10-year-old with a smoking mother versus a 9-year-old with a non-smoking mother: odds ratio 1.1638, 95% CI (0.812, 1.668). The write-up's 1.164 used coefficients rounded to three decimals.
Added in 2026
Model checks and an optional AI explanation
Explain this output with AI
Optional · your own keySends 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 (10 numbers, no data rows)
- GEE coefficient (Intercept)
- -1.88 · robust SE 0.1139, p = 3.08e-61
- GEE coefficient age
- -0.1134 · robust SE 0.04386, p = 0.00973
- GEE coefficient smoke
- 0.2651 · robust SE 0.1777, p = 0.136
- Odds ratio per extra year of age
- 0.8928 · 95% CI (0.8193, 0.9729)
- Odds ratio, smoking vs non-smoking mother
- 1.304 · 95% CI (0.9201, 1.847)
- Working correlation alpha
- 0.354
- Naive GLM smoking SE (ignores clustering)
- 0.1235 · p = 0.0275
- Smoking coefficient under independence working correlation
- 0.2721 · robust SE 0.178, QIC 1829.49
- Smoking coefficient under exchangeable working correlation
- 0.2651 · robust SE 0.1777, QIC 1829.48
- Smoking coefficient under ar1 working correlation
- 0.2345 · robust SE 0.1812, QIC 1830.26
Plus the model description, data source and: GEE coefficients are population-averaged (marginal) effects. Maternal smoking was observed, not assigned: 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": "Children's wheeze by age and maternal smoking (repeated yearly measurements)",
"model": "Logistic GEE, exchangeable working correlation, robust (sandwich) standard errors",
"data": "Ohio children's wheeze data (geepack::ohio), ages 7 to 10",
"sample_size": "537 children, 2148 child-year observations",
"quantities": [
{
"label": "GEE coefficient (Intercept)",
"value": -1.88,
"note": "robust SE 0.1139, p = 3.08e-61"
},
{
"label": "GEE coefficient age",
"value": -0.1134,
"note": "robust SE 0.04386, p = 0.00973"
},
{
"label": "GEE coefficient smoke",
"value": 0.2651,
"note": "robust SE 0.1777, p = 0.136"
},
{
"label": "Odds ratio per extra year of age",
"value": 0.8928,
"note": "95% CI (0.8193, 0.9729)"
},
{
"label": "Odds ratio, smoking vs non-smoking mother",
"value": 1.304,
"note": "95% CI (0.9201, 1.847)"
},
{
"label": "Working correlation alpha",
"value": 0.354
},
{
"label": "Naive GLM smoking SE (ignores clustering)",
"value": 0.1235,
"note": "p = 0.0275"
},
{
"label": "Smoking coefficient under independence working correlation",
"value": 0.2721,
"note": "robust SE 0.178, QIC 1829.49"
},
{
"label": "Smoking coefficient under exchangeable working correlation",
"value": 0.2651,
"note": "robust SE 0.1777, QIC 1829.48"
},
{
"label": "Smoking coefficient under ar1 working correlation",
"value": 0.2345,
"note": "robust SE 0.1812, QIC 1830.26"
}
],
"context": [
"GEE coefficients are population-averaged (marginal) effects.",
"Maternal smoking was observed, not assigned: associations, not causal effects.",
"Original analysis: 2023 coursework, refitted in 2026."
]
}