11/1/2020

Overview of airquality data

  • This app analyzes the Airquality dataset in R. This looks at Ozone in parts per billion (PPB) measured over the course of five months at Roosevelt Island.
  • Potential predictors for air quality are solar radiation (measured in Langleys), Wind speed (miles per hour), Temperature (Farenheit), or month.
  • Using the "Graphed parameters" tab, the user can generate a graph of Ozone as the outcome and each of these predictors as the x-axis, color, point size, or point shape. Allowing data exploration.
  • Using the "Linear model predictors" tab, the user can then select which combination of predictors to use to generate a linear model, and observe the output coefficients.

Default ggplot graph

Default linear model coefficients code

ozoneIQR <- quantile(airquality$Ozone)[,c(2,4)]
airQualFilter <- airquality[airquality$Ozone > ozoneIQR[1] &
                              airquality$Ozone < ozoneIQR[2],]
fit <- lm(Ozone ~ .,airQualFilter)
lmCoef <- as.data.frame(cbind(names(coef(fit)),
             apply(summary(fit)$coefficients,2,signif,digits=2)))
colnames(lmCoef)[1] <- 'Predictors'
lmCoef

Default linear model coefficients output

##              Predictors Estimate Std. Error t value Pr(>|t|)
## (Intercept) (Intercept)      -19         17    -1.1     0.27
## Solar.R         Solar.R    0.016      0.016    0.98     0.33
## Wind               Wind       -1       0.45    -2.2    0.033
## Temp               Temp     0.92       0.21     4.4  6.3e-05
## Month             Month       -2       0.97    -2.1    0.045
## Day                 Day     0.22       0.16     1.4     0.17