Main Model Results
The final model (MOD2) included housing type, number of
people (NP), number of bedrooms (BDSP), and an
interaction term between NP and BDSP. This
structure accounts for how household size and available space interact
to influence electricity payments.
The log-linear model allows each coefficient to be interpreted as the approximate percentage change in electricity payment for a one-unit increase in the predictor, holding other variables constant.
Table 7a presents the raw coefficient estimates with 95% confidence intervals.
# Extract coefficient estimates and confidence intervals
coef_summary <- summary(MOD2)$coefficients
conf_int <- confint(MOD2)
# Combine into a table with updated variable labels
coef_table <- data.frame(
Variable = c("Intercept",
"Attached or Multi-Unit Housing (SFDA)",
"Number of People (NP)",
"Number of Bedrooms (Bedrooms)",
"Interaction (NP × Bedrooms)"),
`Point Estimate` = round(c(coef_summary[1,1], coef_summary[2,1], coef_summary[3,1],
coef_summary[4,1], coef_summary[5,1]), 2),
`Lower CI` = round(conf_int[,1], 2),
`Upper CI` = round(conf_int[,2], 2),
`p-value` = format(c(coef_summary[1,4], coef_summary[2,4], coef_summary[3,4],
coef_summary[4,4], coef_summary[5,4]), scientific = TRUE)
)
if(require(kableExtra)) {
kable(coef_table,
caption = "Table 7a. Model Coefficients with 95% Confidence Intervals") %>%
kable_styling(bootstrap_options = c("striped", "hover"))
} else {
coef_table
}| Variable | Point.Estimate | Lower.CI | Upper.CI | p.value | |
|---|---|---|---|---|---|
| (Intercept) | Intercept | 3.94 | 3.86 | 4.02 | 0.000000e+00 |
| SFDA | Attached or Multi-Unit Housing (SFDA) | -0.20 | -0.24 | -0.17 | 1.226747e-27 |
| NP | Number of People (NP) | 0.20 | 0.17 | 0.22 | 1.980180e-41 |
| BDSP | Number of Bedrooms (Bedrooms) | 0.14 | 0.11 | 0.16 | 2.747337e-26 |
| NP:BDSP | Interaction (NP × Bedrooms) | -0.03 | -0.04 | -0.02 | 2.839716e-10 |
Table 7b transforms the coefficients into percentage terms for easier interpretation.
# Calculate transformed estimates for interpretation
transformed_table <- data.frame(
Effect = c("Attached/Multi-Unit Housing (SFDA=1)",
"Each Additional Person (NP)",
"Each Additional Bedroom (BDSP)",
"Interaction Effect (NP × BDSP)"),
`Multiplier` = c(
round(exp(coef_summary[2,1]), 2),
round(exp(coef_summary[3,1]), 2),
round(exp(coef_summary[4,1]), 2),
round(exp(coef_summary[5,1]), 2)
),
`Mult. 95% CI` = c(
paste0(round(exp(conf_int[2,1]), 2), " to ", round(exp(conf_int[2,2]), 2)),
paste0(round(exp(conf_int[3,1]), 2), " to ", round(exp(conf_int[3,2]), 2)),
paste0(round(exp(conf_int[4,1]), 2), " to ", round(exp(conf_int[4,2]), 2)),
paste0(round(exp(conf_int[5,1]), 2), " to ", round(exp(conf_int[5,2]), 2))
),
`% Change` = c(
paste0(format((exp(coef_summary[2,1])-1)*100, digits=1, nsmall=1), "%"),
paste0(format((exp(coef_summary[3,1])-1)*100, digits=1, nsmall=1), "%"),
paste0(format((exp(coef_summary[4,1])-1)*100, digits=1, nsmall=1), "%"),
paste0(format((exp(coef_summary[5,1])-1)*100, digits=1, nsmall=1), "%")
),
`% 95% CI` = c(
paste0(format((exp(conf_int[2,1])-1)*100, digits=1, nsmall=1), "% to ",
format((exp(conf_int[2,2])-1)*100, digits=1, nsmall=1), "%"),
paste0(format((exp(conf_int[3,1])-1)*100, digits=1, nsmall=1), "% to ",
format((exp(conf_int[3,2])-1)*100, digits=1, nsmall=1), "%"),
paste0(format((exp(conf_int[4,1])-1)*100, digits=1, nsmall=1), "% to ",
format((exp(conf_int[4,2])-1)*100, digits=1, nsmall=1), "%"),
paste0(format((exp(conf_int[5,1])-1)*100, digits=1, nsmall=1), "% to ",
format((exp(conf_int[5,2])-1)*100, digits=1, nsmall=1), "%")
)
)
if(require(kableExtra)) {
kable(transformed_table,
caption = "Table 7b. Transformed Model Coefficients for Interpretation",
align = c('l', 'c', 'c', 'c', 'c')) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
column_spec(1, bold = FALSE) %>%
add_header_above(c(" " = 1, "Multiplicative Effects" = 2, "Percentage Effects" = 2))
} else {
transformed_table
}| Effect | Multiplier | Mult..95..CI | X..Change | X..95..CI |
|---|---|---|---|---|
| Attached/Multi-Unit Housing (SFDA=1) | 0.82 | 0.79 to 0.85 | -18.4% | -21.4% to -15.4% |
| Each Additional Person (NP) | 1.22 | 1.18 to 1.25 | 21.7% | 18.3% to 25.2% |
| Each Additional Bedroom (BDSP) | 1.15 | 1.12 to 1.18 | 14.9% | 12.0% to 17.8% |
| Interaction Effect (NP × BDSP) | 0.97 | 0.97 to 0.98 | -2.6% | -3.4% to -1.8% |
Interpretation of Results
- Households in attached or multi-unit housing (
SFDA = 1) were associated with 18.4% lower monthly electricity payments than detached households (SFDA = 0), after adjusting for household size and number of bedrooms. This estimate is fairly precise, with a 95% confidence interval of falling between 15.4% and 21.4%. - Electricity payments increased by 21.7% per additional household member and 14.9% per additional bedroom, on average.
- The negative interaction term (−2.64%) indicates that when both people and bedrooms increase together, electricity payments rise at a slower rate—consistent with shared space efficiencies in larger households.
While the model does not directly measure energy systems, structural design, or occupancy behavior, the results suggest that attached housing is associated with lower monthly electricity payments—even after adjusting for household size and number of bedrooms. This may reflect a combination of structural factors (e.g., shared walls that reduce heat loss), demographic factors (e.g., smaller or lower-income households), and spatial efficiency (e.g., less underutilized space).
However, it’s important to note that reported electricity payments may not fully capture household energy use. In some attached or multi-unit buildings, electricity for shared spaces such as hallways, elevators, or central HVAC systems may be billed to property managers or bundled into rent, resulting in lower reported household electricity payments. As such, the observed payment differences should be interpreted as associations with reported utility payments, not direct measurements of total electricity consumption or efficiency.
Interpreting the Housing Type Effect in Dollar Terms
In a log-linear model, coefficients can be interpreted as
multiplicative effects on the dependent variable. For the
SFDA variable, this means that households in attached or
multi-unit housing (SFDA = 1) are associated with an
18.4% lower monthly electricity payment, on average,
compared to those in detached homes (SFDA = 0). This
estimate accounts for household size, number of bedrooms, and their
interaction, isolating the association with housing type itself.
Based on model assumptions, where a typical detached household reports an average monthly electricity payment of $122.62, an otherwise similar household in an attached or multi-unit residence would be expected to pay approximately $100.00—or $22.62 less per month.
Sensitivity Check
Excluding Large Multi-Unit Buildings
A key concern during model development was that households in large apartment buildings—particularly those with 50 or more units—may follow different utility billing practices. Electricity for common spaces like elevators, lighting, or HVAC systems is often paid by landlords or bundled into rent, potentially making household-reported electricity payments appear lower than actual consumption.
To test whether these high-density buildings were skewing results,
the final interaction model (MOD2) was re-estimated after
excluding all training observations classified as “50 or more
apartments.”
# Exclude large apartment buildings from the training set
OR_TRAIN_filtered <- OR_TRAIN[!grepl("50 or more", OR_TRAIN$BLD), ]
# Refit model
MOD2_restricted <- lm(log(ELEP) ~ SFDA + NP + BDSP + NP:BDSP, data = OR_TRAIN_filtered)| Variable | Point.Estimate | Lower.CI | Upper.CI | p.value | |
|---|---|---|---|---|---|
| (Intercept) | Intercept | 3.9701 | 3.8889 | 4.0513 | 0.0e+00 |
| SFDA | Attached or Multi-Unit Housing (SFDA) | -0.1998 | -0.2373 | -0.1622 | 3.0e-25 |
| NP | Number of People (NP) | 0.1874 | 0.1583 | 0.2164 | 3.3e-36 |
| BDSP | Number of Bedrooms (Bedrooms) | 0.1281 | 0.1019 | 0.1544 | 1.4e-21 |
| NP:BDSP | Interaction (NP × Bedrooms) | -0.0242 | -0.0327 | -0.0157 | 2.3e-08 |
Table 8 shows the updated model coefficients. The SFDA
variable remains reliable (p < 0.0001), with attached or multi-unit
homes associated with approximately 16.5% lower electricity
payments than detached homes. The 95% confidence
interval—14.3% to 18.7%—is slightly narrower than in
the full model. The other variables (NP, BDSP,
and their interaction) remain significant and consistent, reinforcing
the interpretation that electricity use becomes more efficient as space
and occupancy scale together.
Actual vs. Predicted log(ELEP), excluding large apartment buildings
Figure 5 displays predicted versus actual log electricity payments (log(ELEP)) for the restricted model, evaluated on the filtered training data. Model performance remains stable, with predictions tracking observed values across both housing types, even after excluding large apartment buildings.
This sensitivity check reduces a plausible source of bias: centralized billing in large apartment buildings. By excluding these buildings, the analysis focuses on more typical low- and mid-rise multi-unit structures, where billing is more likely to reflect actual household-level electricity use. The slightly reduced but still-strong payment difference supports the interpretation that housing type is meaningfully associated with reported electricity expenses—independent of billing anomalies in large complexes.
While this refinement improves the validity of the comparison, it does not resolve all diagnostic concerns—particularly the moderate heteroskedasticity identified earlier. Still, by isolating and removing a known reporting issue, it increases confidence in the core finding.