Audit the missing values
Open the script which uses is.na(), colSums(), and nobs() to see what is actually available.
Before fitting a regression to these measurements, investigate exactly what was measured and what wasn't.
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.R documents 153 daily observations and six variables. Units and collection sites differ; the records are not six simultaneous readings at one location.
| Variable | Meaning and origin | Unit | Missing |
|---|---|---|---|
| Ozone | Mean ozone, 13:00–15:00, Roosevelt Island | parts per billion | 37 |
| Solar.R | Solar radiation, 08:00–12:00, Central Park, 4000–7700 Å band | Langleys | 7 |
| Wind | Average 07:00 and 10:00 wind speed, LaGuardia Airport | miles per hour | 0 |
| Temp | Maximum daily temperature, LaGuardia Airport | degrees Fahrenheit | 0 |
| Month | Recorded month, May through September | calendar month | 0 |
| Day | Day of month | calendar day | 0 |
Open the script which uses is.na(), colSums(), and nobs() to see what is actually available.
Use a common complete-case subset to separate adding covariates from changing which days enter the model.
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.
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 →