whiteside <- MASS::whiteside # no need to load the whole packagecur_dataset <-str_to_title(as.character(substitute(whiteside)))# ?whiteside
Mr Derek Whiteside of the UK Building Research Station recorded the weekly gas consumption and average external temperature at his own house in south-east England for two heating seasons, one of 26 weeks before, and one of 30 weeks after cavity-wall insulation was installed. The object of the exercise was to assess the effect of the insulation on gas consumption.
C <- whiteside %>%select(where(is.numeric)) %>%cov()# Covariance between Gas and Tempmu_n <- whiteside %>%select(where(is.numeric)) %>%colMeans()# mu_n # Mean vector