# Sustainable Building Tool by Energy Baseline: Case Study
## 4 Analysis and Results
### Univariate and Multivariate Linear Regression Models for EnBL  
To build a reliable linear regression model, the independent variables that may have a high correlation with the variable to be explained are first identified. Using RStudio software (V7), the correlation levels of the independent variables (temperature, humidity, radiation, and total occupancy) presented in Table 5 were obtained regarding the dependent variable (total final energy consumption). To ensure that the statistical forecasting model performed is valid [9], a series of statistical tests were carried out considering: The regression function is nonlinear; The error terms are not normally distributed; The error terms have non-constant variance; The error terms are not independent; The independent variables are not related to each other (for the multivariate case). Table 6 shows details of compliance with the different statistical assumptions, according to their test and graphical representation. Four univariate linear regression models were calculated with different variables (temperature, humidity, radiation, and total occupancy). In order to validate the results, Figure 8 graphically shows the relation between the variables and their statistical significance from highest to lowest (red asterisks, *** > *** > *). The variable with the highest correlation and statistical significance, which allows for the description of the Total Energy Consumption variable, is the independent variable Total Occupancy. However, this model has a somewhat low coefficient of determination. For this reason, the residuals method was applied in order to filter out some outliers and improve the coefficient of determination \(R2\), allowing an increase in the correlation level to \(R2=0.8503\). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Assumption** & **Test** & **Test Compliance** \\ \hline Linearity & Graph & Random distribution with respect to 0 \\ Normality & Shapiro–Wilks & \(p\) value \(\geq\) 0.05 \\ Homoscedasticity & Breusch–Pagan & \(p\) value \(\geq\) 0.05 \\ Independence & Durbin–Watson & \(p\) value \(\geq\) 0.05 \\ Multicollinearity & Variance Inflation Factor (VIF) & VIF \(\leq\) 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Assumptions and verification tests for regression models. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Month/Variable** & **Mean Temperature.** & **Average Humidity.** & **Average Radiation.** & **Occupancy** & **Total Consumption** \\  & [\({}^{\circ}\)C] & **[\%]** & **[W/m\({}^{2}\)]** & **[Horas]** & **[kWh]** \\ \hline Jan & 24.36 & 73.75 & 401.43 & 694.00 & 8157.39 \\ Feb & 24.79 & 74.98 & 391.62 & 3776.00 & 18,338.60 \\ Mar & 24.75 & 75.21 & 391.16 & 3893.50 & 19,270.85 \\ Apr & 26.16 & 72.55 & 394.59 & 3259.00 & 15,445.27 \\ May & 25.56 & 74.20 & 354.94 & 4223.00 & 18,875.69 \\ Jun & 24.32 & 79.25 & 363.57 & 2249.00 & 12,134.52 \\ Jul & 24.72 & 71.83 & 399.34 & 4188.00 & 20,270.80 \\ Aug & 25.29 & 65.39 & 453.03 & 5340.00 & 24,242.27 \\ Sept & 24.96 & 69.86 & 414.62 & 5711.50 & 22,723.39 \\ Oct & 23.62 & 77.72 & 402.03 & 6395.50 & 21,390.40 \\ Nov & 23.79 & 78.55 & 365.73 & 5424.80 & 17,109.19 \\ Dec & 24.31 & 76.44 & 364.82 & 1053.50 & 10,417.76 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Mean values of variables monitored in the building. The model was able to explain 85.03% of the data variability. Similarly, the \(p\) value of 0.0001 was analyzed for the F-statistic, which indicates that the linear correlation is statistically significant (0.0001 \(<\) 0.05). The confidence intervals of the model have significance levels of 2.5-97.5%, which is the range in which the univariate linear regression model can vary. The results of the global test (gvlma) confirm that all assumptions of the univariate linear regression model are verified. It is valid to use the linear regression model to quantify energy consumption as a function of the relevant independent variable (\"Total occupancy\").