Regression of energy efficiency with building parameters

In this section, we will do a linear regression of the building's energy efficiency measure, heating load (Y1) as a function of the building parameters. It would be useful to do a preliminary descriptive analysis to find which building variables are statistically significant. For this, we will first create bivariate plots of Y1 and all the X variables. We will also compute the Spearman correlation between Y1 and all the X variables. The R script for performing these tasks is as follows:

>library(ggplot2) >library(gridExtra) >df <- read.csv("ENB2012_data.csv",header = T) >df <- df[,c(1:9)] >str(df) >df[,6] <- as.numeric(df[,6]) >df[,8] <- as.numeric(df[,8]) >attach(df) >bp1 <- ggplot(data ...

Get Learning Bayesian Models with R now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.