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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.