How much does the answer about ozone depend on what you do with the days it was not measured?
Capstone 5~40 minapplied New York air quality, 1973
The story
New York's daily air-quality readings from May to September 1973 have holes: ozone was not recorded on 37 of the 153 days, and solar radiation on 7. A city analyst wants to know how ozone rises with temperature and falls with wind, and has been quietly dropping every incomplete day.
Dropping rows is a decision with an assumption behind it. If the missing days are a random sample of all days, the answer survives; if ozone went unrecorded on, say, the hottest days, it does not. You will map the gaps, see what a test of "missing completely at random" can and cannot tell you, fit the model on complete days, refit it with multiple imputation, and put the two side by side. The deliverable is the sensitivity table and the paragraph that explains it.
Data: New York air quality, 1973 · R-datasets. Chambers JM, Cleveland WS, Kleiner B, Tukey PA (1983). Graphical Methods for Data Analysis. Wadsworth. Shipped with R as datasets::airquality.
See which columns are missing together and run Little's test. A small p-value says the gaps are not completely random. A large one does not say they are: the test cannot see gaps that depend on the missing value itself.
Which columns have gaps, do they occur together, and what does Little's test say?
Missing-data patterns is set up for airquality (sample) with all six readings. Press Run.
Read the missingness chart. Which columns have gaps, and are they missing on the same days?
Find Little's test. What does it say, and what could it never tell you?No test can show that data are missing at random. That part is an argument about how the data were collected.
Stage 2 · analyze · ~7 min
Fit it on complete days
The usual default: regress ozone on temperature, wind and solar radiation, dropping any day with a gap. Note how many days the model really uses.
How many of the 153 days does the complete-case model use, and what are its slopes?
Linear regression of Ozone on Temp, Wind and Solar.R is set up for you. Press Run.
Find how many days the model used, then read the slopes for Temp and Wind with their intervals.The model describes the days it used. If those differ from the days it dropped, so might the answer.
Stage 3 · analyze · ~13 min
Refit with multiple imputation
Multiple imputation fills each gap many times from the other columns, fits the same model on every completed copy and pools the results, so the intervals carry the uncertainty about the missing values.
How do the pooled slopes and intervals compare with the complete-case ones?
Open Multiple imputation by chained equations (MICE).
Choose airquality (sample). Set Outcome to Ozone, Predictors to Temp, Wind and Solar.R, and Variables to Month.
Press Run. Imputation fits the model many times, so it takes a little longer.
Read the pooled table. For each slope, compare the pooled estimate with the complete-case one beside it.When the two agree, the conclusion does not hinge on the gaps. When they differ, report both and say why.
Stage 4 · reports · ~10 min
Put both in a report
A sensitivity analysis only helps if the reader sees it. Build a report with the complete-case regression and the imputed one, and write the paragraph that says whether the conclusion depends on the gaps.
Open Reports and press New report.
Tick the regression and the imputation, then press Create report.
Add a Text item and write two sentences on whether the gaps change the conclusion.
Hints
Little's test can reject "missing completely at random", but a large p-value does not confirm it.
Count the rows the regression uses. That count is the population the complete-case answer describes.
In the MICE result, each pooled estimate sits beside its complete-case estimate. That pairing is the sensitivity table.
report
A sensitivity table with its paragraph
Report the complete-case and imputed slopes side by side, say how many days each uses, state what you assumed about why ozone is missing, and say whether the conclusion depends on that assumption.
What is missing
Complete-case model
Imputed model
Comparison
Assumption and limits
Rubric
Criterion
Points
Describes which columns are missing, how often and whether together.
1
Interprets Little's test correctly and does not treat a large p-value as proof of randomness.
2
States how many days the complete-case model uses.
1
Puts complete-case and pooled estimates side by side, with intervals.
2
Names the missing-at-random assumption imputation still makes.
2
Model answer
Show the model answer
What is missing. Ozone is missing on 37 of 153 days and solar radiation on 7; only 111 days have all four model columns. The pattern chart shows the gaps mostly fall on different days.
Little's test. Read its p-value from your run. Whatever it says, it compares only the observed values across patterns: it can reject "missing completely at random", but it cannot show the gaps are harmless, because it never sees the missing ozone readings.
Complete-case model. The regression uses 111 days. Ozone rises with temperature and falls with wind; quote the slopes and intervals from your run.
Imputed model. MICE refits the same model on many completed copies of the data and pools them, so it uses all 153 days. The pooled slopes sit close to the complete-case ones, with intervals that carry the extra uncertainty from the gaps (the fraction of missing information says how much).
Conclusion. The direction and rough size of the temperature and wind effects do not depend on how the gaps are handled. Both analyses assume the gaps can be predicted from the observed columns (missing at random); if ozone went unrecorded because of its own level, neither method would fix that.