Research field notebook · Genuine historical observations

New York air quality, 1973

Before fitting a regression to these measurements, investigate exactly what was measured and what wasn't.

Provenance: This exercise uses the historical datasets::airquality table supplied with R. Daily records cover May 1 through September 30, 1973. The primary source documentation attributes ozone readings to the New York State Department of Conservation and meteorological readings to the National Weather Service. The educational site does not host or relicense the data.

Data dictionary

R documents 153 daily observations and six variables. Units and collection sites differ; the records are not six simultaneous readings at one location.

VariableMeaning and originUnitMissing
OzoneMean ozone, 13:00–15:00, Roosevelt Islandparts per billion37
Solar.RSolar radiation, 08:00–12:00, Central Park, 4000–7700 Å bandLangleys7
WindAverage 07:00 and 10:00 wind speed, LaGuardia Airportmiles per hour0
TempMaximum daily temperature, LaGuardia Airportdegrees Fahrenheit0
MonthRecorded month, May through Septembercalendar month0
DayDay of monthcalendar day0

A reproducible investigation

  1. Question: How do ozone readings vary with temperature, wind, and solar radiation in these historical observations?
  2. Audit: Count missing values for every variable. Compare the 153 daily records with the rows retained after excluding missing model variables.
  3. Describe: Plot ozone against temperature and inspect possible outliers and seasonal patterns.
  4. Model: Compare temperature-only and multivariable regression fits on the same complete-case sample.
  5. Question the result: Explain why an observational regression coefficient cannot automatically be interpreted as a causal effect of changing the weather.

Questions to submit with an analysis

Report the original and analytic sample sizes, variable definitions with units, at least one visualization, the exact regression formula, a conditional interpretation of one coefficient, and two reasons the fitted association should not be described as a treatment effect. Include a reproducible script with any submitted report.

Sources and limitations

Official R datasets manual: airquality · Chambers, Cleveland, Kleiner & Tukey, Graphical Methods for Data Analysis (1983). These are historical environmental observations. They do not characterize present-day New York air quality.

Read the missing-data lesson → · Read the multivariable lesson →