UQO Working Paper No. 3· 60 pages
Hedonic Housing Price Models for the United States: A Multi-Method Comparison of Parametric, Quantile, and Machine Learning Approaches
Random splits flatter machine learning in housing
How well do hedonic methods really generalize? XGBoost's R² of 0.833 under a random split collapses to 0.425–0.547 when ten entire states are held out.
Simon-Pierre Boucher — contact@spboucher.ai
788,842
Zillow listings across 50 states + DC
0.833 vs 0.425–0.547
XGBoost R²: random split vs 10-state geographic holdout
11 of 13
variables where inter-quantile Wald tests reject coefficient equality
10×
garage gradient at τ = 0.10 relative to τ = 0.90 (z = 28.9)
0.2745
mean Moran's I of OLS residuals (all p < 0.001)
0.630 → 0.725
OLS out-of-sample R² from region dummies to 886 ZIP3 fixed effects
Abstract
This paper compares three frameworks for hedonic housing valuation on a single dataset of 788,842 active Zillow listings spanning all 50 U.S. states and the District of Columbia: semi-log OLS with 62 regressors, quantile regression at five points of the price distribution, and gradient-boosting models interpreted with SHAP. Each framework answers a distinct question — average capitalization gradients, distributional heterogeneity, and predictive performance.
The core methodological contribution is a systematic study of spatial leakage in hedonic model evaluation. Random train/test splits let geographically proximate listings appear on both sides of the split, inflating performance: XGBoost reaches R² = 0.833 under a random 80/20 split but only 0.425–0.547 when ten entire states (438,315 listings) are held out. Removing all geographic features actually improves geographic-holdout performance, because region dummies memorize training-set price levels.
Mean effects also mask substantial heterogeneity: inter-quantile Wald tests reject coefficient equality for 11 of 13 variables, the garage gradient is ten times larger at the bottom decile than at the top, and the lot-size gradient triples once state-median-imputed values are dropped — a warning for hedonic work on scraped listing data. All estimates are presented as listing-price capitalization gradients, not causal willingness-to-pay parameters.
Key Results
Spatial leakage in hedonic evaluation quantified
Three complementary designs — a 10-state geographic holdout, a 6-stage feature-ablation cascade, and a lat/lon augmentation experiment — measure how much random validation inflates machine-learning performance.
Geographic features can hurt generalization
Removing all geographic features improves geographic-holdout R² from 0.425 to 0.519, while adding raw coordinates boosts random R² but degrades out-of-region prediction — region dummies memorize price levels.
Spatial granularity dominates OLS fit
Moving from 4 Census-region dummies to state fixed effects to 886 ZIP3 fixed effects raises out-of-sample R² from 0.630 to 0.678 to 0.725 — a 9.5 point gain from geography alone.
Distributional heterogeneity in attribute gradients
The garage gradient is 10× larger at the bottom price decile than at the top, the pool premium only emerges above the median, and the age penalty concentrates in lower-priced homes.
SHAP rankings are model-stable, not structural
Spearman correlations of mean |SHAP| across XGBoost, LightGBM, and Random Forest range from 0.89 to 0.99, with the same six features on top — but these remain predictive decompositions, not implicit prices.
Imputation sensitivity exposed
The lot-size gradient triples (0.018 to 0.059) when state-median-imputed observations are dropped — a caution for hedonic research built on scraped listing data.
Data
Zillow active for-sale listings (2025–2026 snapshot)
839,313 raw residential properties with 116 variables in a 1.6 GB DuckDB database, including price history, schools, and tax-history tables.
Analytical sample
788,842 listings after five sequential filters (price $10K–$10M, living area 200–20,000 sqft, 1–10 beds/baths, valid coordinates; 6.0% attrition), with 68 engineered columns including six interaction terms.
Methodology
Semi-log OLS with HC3 errors
62 regressors on log listing price with fixed effects escalating from Census region to state to 886 ZIP3 areas; price-to-area elasticity of 0.63.
Quantile regression
Estimated at τ = 0.10 to 0.90 on a 150,000-observation subsample with a 10-seed stability check and inter-quantile Wald z-tests on coefficient differences.
Gradient boosting benchmark suite
XGBoost (1,000 trees, depth 8), LightGBM, Random Forest, Ridge, Lasso, and Elastic Net, evaluated under both random 80/20 and 10-state geographic-holdout validation.
TreeSHAP interpretation
SHAP values on 10,000 test observations, with cross-model Spearman rank-stability analysis across XGBoost, LightGBM, and Random Forest.
Spatial diagnostics
Moran's I on OLS residuals with row-standardized 8-nearest-neighbor weights, three independent 5,000-listing subsamples, and 999 permutations.
Feature-ablation cascade
Six nested feature sets from structural-only to the full specification isolate each block's predictive contribution; neighborhood scores alone add 17.6 R² points.
Reproducibility
- Complete research compendium: analysis code, LaTeX source, 11 publication-ready figures, and 13 machine-readable CSV tables mirroring every table in the paper.
- Every script prints verification statistics against the stored result artifacts; the Moran's I pipeline reproduces stored values to four decimal places.
- A systematic audit reconciled the manuscript against stored artifacts, fixing six internal inconsistencies and filling 13 placeholder table cells — with no scientific result altered.
- Paths resolve relative to the repository root (WP3_ROOT-overridable); pinned dependencies validated 2026-08-05; the 60-page paper compiles with zero errors.
- Data artifacts (up to 1.6 GB) exceed GitHub limits and are available on request, subject to Zillow's Terms of Service.