A pollution data set. See Chapter 12 in Regression and Other Stories.

Source: McDonald, G.C. and Schwing, R.C. (1973) 'Instabilities of regression estimates relating air pollution to mortality', Technometrics, vol.15, 463-482. See data/pollution.txt for the explanation of the variables.


Load packages

library("rprojroot")
root<-has_file(".ROS-Examples-root")$make_fix_file()

Load data

pollution <- read.csv(root("Pollution/data","pollution.csv"))
head(pollution)
  prec jant jult ovr65 popn educ hous dens nonw wwdrk poor hc nox so2 humid
1   36   27   71   8.1 3.34 11.4 81.5 3243  8.8  42.6 11.7 21  15  59    59
2   35   23   72  11.1 3.14 11.0 78.8 4281  3.5  50.7 14.4  8  10  39    57
3   44   29   74  10.4 3.21  9.8 81.6 4260  0.8  39.4 12.4  6   6  33    54
4   47   45   79   6.5 3.41 11.1 77.5 3125 27.1  50.2 20.6 18   8  24    56
5   43   35   77   7.6 3.44  9.6 84.6 6441 24.4  43.7 14.3 43  38 206    55
6   53   45   80   7.7 3.45 10.2 66.8 3325 38.5  43.1 25.5 30  32  72    54
      mort
1  921.870
2  997.875
3  962.354
4  982.291
5 1071.289
6 1030.380
LS0tCnRpdGxlOiAiUmVncmVzc2lvbiBhbmQgT3RoZXIgU3RvcmllczogUG9sbHV0aW9uIgphdXRob3I6ICJBbmRyZXcgR2VsbWFuLCBKZW5uaWZlciBIaWxsLCBBa2kgVmVodGFyaSIKZGF0ZTogImByIGZvcm1hdChTeXMuRGF0ZSgpKWAiCm91dHB1dDoKICBodG1sX2RvY3VtZW50OgogICAgdGhlbWU6IHJlYWRhYmxlCiAgICB0b2M6IHRydWUKICAgIHRvY19kZXB0aDogMgogICAgdG9jX2Zsb2F0OiB0cnVlCiAgICBjb2RlX2Rvd25sb2FkOiB0cnVlCi0tLQpBIHBvbGx1dGlvbiBkYXRhIHNldC4gU2VlIENoYXB0ZXIgMTIgaW4gUmVncmVzc2lvbiBhbmQgT3RoZXIKU3Rvcmllcy4KClNvdXJjZTogTWNEb25hbGQsIEcuQy4gYW5kIFNjaHdpbmcsIFIuQy4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