Replication package for "Estimating residential energy efficiency through energy use intensity: A multilevel analysis of the 2020 Residential Energy Consumption Survey"

Published: 30 June 2026| Version 2 | DOI: 10.17632/2xxt4whnb7.2
Contributors:
,

Description

Full replication package for the article "Estimating residential energy efficiency through energy use intensity: A multilevel analysis of the 2020 Residential Energy Consumption Survey" (Energy and Buildings). It reproduces every result, table, and figure from the raw inputs. Data. The analysis uses the public RECS 2020 microdata (U.S. Energy Information Administration; 18,243 households across 50 states and 17 IECC climate zones) merged with state-level contextual variables (electricity price, urbanization rate, and GDP per capita) compiled from EIA, U.S. Census Bureau, and BEA sources, with release versions and access dates documented. Methods. The dependent variable is energy use intensity (site energy per unit of conditioned floor area). A survey-weighted two-level model (households nested in IECC climate zones) is estimated in Stata, with average marginal effects and the intraclass correlation. Interaction structure is selected in two stages: a stability-frequency screening in R (inspired by stability selection, without PFER control) over 250 canonical interaction blocks (190 household x household and 60 household x state-context), which yields 24 stable candidate blocks; a Stata refit then retains 17 blocks (three involving state-level context, including the all-electric x electricity-price interaction). Key results. The largest fitted associations are dwelling vintage, envelope quality, heating technology, education, and household size; state electricity price and income operate mainly through moderation. The conditional intraclass correlation is approximately 0.21. Contents. Stata do-file and logs; R stability-selection script and outputs; processed contextual datasets; estimation files (.ster); all figures (Figure 1 climate-zone map, Figures 2-3, Supplementary Figure S1, and the graphical abstract); and the manuscript-aligned CSV tables. README.txt documents the pipeline, CHANGELOG.md records the validated clean run (27 June 2026), and SHA256SUMS.txt provides checksums for all 66 files. requirements.txt and requirements-lock.txt pin the Python environment used for the figures; R sessionInfo and the Stata environment record are included. Reproducibility. run_replication.sh executes the full pipeline (Stata to R to Stata) and regenerates all outputs; Figure 1 is regenerated separately via fig1/make_fig1.py. The deposited results correspond to a clean re-run on R 4.6.0 and Stata BE 18 (arm64 macOS).

Files

Steps to reproduce

Software: Stata BE 18 (the do-file auto-installs estout/esttab via ssc; for the wild-cluster bootstrap it also requires boottest, "ssc install boottest") and R 4.6.0 with the glmnet and readr packages. Put recs2020.dta, the contextual CSVs and script.R together with _Do-file.do in one working directory (or run run_replication.sh, which arranges this and runs the whole pipeline). (1) Stata — _Do-file.do, sections 1-4. Reads recs2020.dta and the contextual CSVs (tasa_urbanizacion_y_pib_percapita_estados_usa_2020.csv, precio_electricidad_2020.csv), builds the analysis dataset recs2020_comun.dta, and exports the design matrix base_r_regularizacion_v2.csv (47 unpenalized main-effect columns + 999 interaction columns = 1,046, grouped into 250 canonical interaction blocks). (2) R — script.R (set.seed(123) for cross-validation, set.seed(20200624) for resampling). Runs the stability-frequency screening (inspired by stability selection, without PFER control), fitting penalized elastic nets with differential penalty factors (main effects unpenalized) over repeated subsamples and recording per-block selection frequency. Blocks above the 0.60 threshold are the 24 stable candidate blocks, written to candidatas_filtro2_v2.csv and candidatas_stata.csv (per-block frequencies in estabilidad_frecuencias_v2.csv and estabilidad_cluster_v2.csv). With FULL_RUN=1 the do-file invokes this step automatically; with FULL_RUN=0 it reads the precomputed candidatas_stata.csv, so this step can be skipped if only the downstream results are needed. (3) Stata — _Do-file.do, sections 5-13. Reads the 24 candidate blocks dynamically (no hard-coded list), screens them (Supplementary Table S2), retains 17, estimates the final survey-weighted multilevel model (final_v3.ster) and the robustness specifications (scheme B, log-EUI, wood-excluded, total consumption), computes the ICC (Table 1), the average marginal effects (Table 2 Panel A) and the full coefficient table (Supplementary Table S1), exports the tables and Figure 2, Figure 3 and Fig4 (the source of Supplementary Figure S1) as EPS + 300-dpi TIFF, and in section 11 reports the conditional all-electric price-intensity slope via lincom (the point estimate and 95% CI feeding the graphical abstract). (4) Figures — fig1/make_fig1.py (IECC climate-zone map, Figure 1) and make_graphical_abstract.py (graphical abstract; runs as-is from the reported estimates and the section-11 lincom CI). Verification (validated clean run, 27-Jun-2026; see stata/replicacion_full.log): ICC 0.1934 / 0.1781 / 0.2076; 24 stable candidate blocks, 17 retained; AMEs -1.700, +2.215, -1.961, -0.500, +4.690; all-electric x price conditional slope -0.6838, 95% CI [-1.024, -0.344] (scheme A). SHA256SUMS.txt checksums all 66 files; the README maps every output file to its location in the paper.

Categories

Energy Policy, Energy Efficiency, Building Energy Analysis

Licence