spb/wp3_uqo Public
UQO Working Paper No. 3 — Hedonic housing price models for the US: parametric, quantile, and machine-learning approaches.
TeX 77.8%
Python 22.1%
1% Author: Simon-Pierre Boucher — contact@spboucher.ai2%3% ═══════════════════════════════════════════════════════════════════════4% 5. RESULTS5% ═══════════════════════════════════════════════════════════════════════6\section{Estimation Results}7\label{sec:results}89\subsection{OLS Baseline, State Fixed Effects, and ZIP3 Fixed Effects}10\label{sec:ols_fe}1112\subsubsection{Standardized Baseline Specification}1314Table~\ref{tab:ols_results} presents the OLS results with standardized continuous regressors. The model achieves $R^2 = 0.634$ with RMSE $= 0.489$ in log-price units. The $F$-statistic of 18,712.5 strongly rejects the null of jointly zero slope coefficients.1516\begin{table}[H]17\centering18\caption{OLS Hedonic Regression Results (Dep.\ Var.: $\ln(\text{Listing Price})$)}19\label{tab:ols_results}20\begin{threeparttable}21\footnotesize22\renewcommand{\arraystretch}{0.92}23\begin{tabular}{lrrl}24\toprule25Variable & Coefficient & Std.\ Error & \\26\midrule27\multicolumn{4}{l}{\textit{Panel A: Structural Attributes (standardized)}} \\28$\ln$(Living Area)$^\dagger$ & 0.3119 & 0.0035 & *** \\29Bedrooms$^\dagger$ & $-$0.0675 & 0.0023 & *** \\30Bathrooms$^\dagger$ & 0.2359 & 0.0026 & *** \\31Age$^\dagger$ & $-$0.0418 & 0.0139 & ** \\32Age$^{2\dagger}$ & 0.0507 & 0.0019 & *** \\33Stories$^\dagger$ & 0.0004 & 0.0003 & \\34Bath/Bed Ratio$^\dagger$ & $-$0.0208 & 0.0021 & *** \\35\midrule36\multicolumn{4}{l}{\textit{Panel B: Lot and Amenities}} \\37$\ln$(Lot Size)$^\dagger$ & 0.0697 & 0.0010 & *** \\38Pool & 0.0286 & 0.0026 & *** \\39Spa & 0.0327 & 0.0027 & *** \\40Basement & $-$0.0424 & 0.0023 & *** \\41Garage & 0.1094 & 0.0015 & *** \\42Waterfront & $-$0.1349 & 0.0325 & *** \\43Central Air & 0.0693 & 0.0014 & *** \\44Hardwood Floors & 0.1246 & 0.0014 & *** \\45Luxury Score$^\dagger$ & 0.0443 & 0.0018 & *** \\46\midrule47\multicolumn{4}{l}{\textit{Panel C: Neighborhood (standardized)}} \\48Walk Score$^\dagger$ & $-$0.0109 & 0.0012 & *** \\49Bike Score$^\dagger$ & 0.0717 & 0.0010 & *** \\50Transit Score$^\dagger$ & 0.0524 & 0.0008 & *** \\51Avg.\ School Rating$^\dagger$ & $-$0.0491 & 0.0007 & *** \\52Property Tax Rate$^\dagger$ & $-$0.0292 & 0.0008 & *** \\53\bottomrule54\end{tabular}55\begin{tablenotes}56\small57\item \textit{Notes:} Table continues on the next page; estimation notes follow the continuation.58\end{tablenotes}59\end{threeparttable}60\end{table}6162\begin{table}[H]63\ContinuedFloat64\centering65\caption{OLS Hedonic Regression Results (continued)}66\begin{threeparttable}67\footnotesize68\renewcommand{\arraystretch}{0.92}69\begin{tabular}{lrrl}70\toprule71Variable & Coefficient & Std.\ Error & \\72\midrule73\multicolumn{4}{l}{\textit{Panel D: Market Status}} \\74Condominium & $-$0.0370 & 0.0037 & *** \\75HOA Member & $-$0.1077 & 0.0024 & *** \\76$\ln$(HOA Fees + 1)$^\dagger$ & 0.0439 & 0.0014 & *** \\77New Construction & 0.1035 & 0.0029 & *** \\78Foreclosure & $-$0.4064 & 0.0098 & *** \\79\midrule80\multicolumn{4}{l}{\textit{Panel E: Interactions (standardized)}} \\81$\ln$(sqft) $\times$ Age$^\dagger$ & $-$0.1100 & 0.0140 & *** \\82Pool $\times$ South & 0.0081 & 0.0012 & *** \\83Waterfront $\times$ $\ln$(sqft)$^\dagger$ & 0.1371 & 0.0092 & *** \\84Basement $\times$ North & $-$0.0255 & 0.0012 & *** \\85Condo $\times$ Walk Score$^\dagger$ & 0.0816 & 0.0013 & *** \\86Age $\times$ Luxury$^\dagger$ & 0.0440 & 0.0015 & *** \\87\midrule88\multicolumn{4}{l}{\textit{Panel F: Regional Dummies (ref: Midwest)}} \\89Northeast & 0.4869 & 0.0030 & *** \\90South & 0.0220 & 0.0028 & *** \\91West & 0.4008 & 0.0031 & *** \\92\midrule93$R^2$ & 0.6343 & & \\94Adj.\ $R^2$ & 0.6342 & & \\95RMSE & 0.4887 & & \\96$F$-statistic & 18,712.5 & & \\97$N$ & 788,842 & & \\98\bottomrule99\end{tabular}100\begin{tablenotes}101\small102\item \textit{Notes:} HC3 heteroskedasticity-robust standard errors. $^\dagger$Variables standardized (zero mean, unit variance) before estimation; coefficients represent effects of a one-standard-deviation increase. Binary variables not standardized; percentage effects computed as $100 \times (e^\beta - 1)$. Categorical controls (roof: 6, construction: 8, foundation: 7 dummies) included but not shown. Significance: *** $p<0.001$, ** $p<0.01$, * $p<0.05$.103\end{tablenotes}104\end{threeparttable}105\end{table}106107\subsubsection{Unstandardized Specification for Economic Interpretation}108109Table~\ref{tab:ols_unstd} reports key coefficients from the unstandardized specification, which permits direct economic interpretation. The $R^2$ is identical (0.634); only the coefficient magnitudes and interpretations differ.110111\begin{table}[H]112\centering113\caption{Unstandardized OLS: Key Coefficients in Natural Units}114\label{tab:ols_unstd}115\begin{threeparttable}116\small117\begin{tabular}{lrrrl}118\toprule119Variable & Coefficient & Std.\ Error & Interpretation & \\120\midrule121Constant & 7.7316 & 0.0495 & & *** \\122$\ln$(Living Area) & 0.6281 & 0.0070 & Elasticity: 0.63 & *** \\123Bedrooms & $-$0.0620 & 0.0022 & $-$6.0\% per additional bedroom & *** \\124Bathrooms & 0.2035 & 0.0023 & +22.6\% per additional bathroom & *** \\125Age (years) & $-$0.0013 & 0.0004 & $-$0.13\% per year & ** \\126Age$^2$ ($\times 10^{-5}$) & 1.2 & 0.05 & Positive quadratic (vintage) & *** \\127$\ln$(Lot Size) & 0.0182 & 0.0003 & Elasticity: 0.02 & *** \\128Walk Score (per point) & $-$0.0004 & 0.0000 & $-$0.04\% per point & *** \\129Bike Score (per point) & 0.0040 & 0.0001 & +0.40\% per point & *** \\130Transit Score (per point) & 0.0029 & 0.0000 & +0.29\% per point & *** \\131Avg.\ School Rating (per point) & $-$0.0544 & 0.0008 & $-$5.3\% per rating point & *** \\132Property Tax Rate (per ppt) & $-$0.0553 & 0.0015 & $-$5.4\% per ppt & *** \\133Luxury Score (per unit) & 0.0344 & 0.0014 & +3.5\% per unit & *** \\134\bottomrule135\end{tabular}136\begin{tablenotes}137\small138\item \textit{Notes:} Same sample and specification as Table~\ref{tab:ols_results}, but continuous variables enter in natural units. $N = 788{,}842$. HC3 standard errors.139\end{tablenotes}140\end{threeparttable}141\end{table}142143The elasticity of listing price with respect to living area is 0.63: a 10\% increase in square footage is associated with a 6.3\% higher listing price. This is below unity, consistent with diminishing marginal returns to space. Each additional bathroom is associated with a 22.6\% higher listing price, while each additional bedroom---conditional on total area---is associated with a 6.0\% \textit{lower} price, reflecting the well-documented tradeoff between room count and room size \citep{sirmans2005composition}.144145\subsubsection{Counterintuitive Coefficient Signs}146147Several coefficients warrant discussion.148149\textbf{Negative waterfront coefficient ($-0.135$, standardized).} The standalone waterfront effect is evaluated at the mean of the standardized interaction term $\text{waterfront} \times \ln(\text{sqft})$. Because the interaction is strongly positive ($+0.137$), the net waterfront effect becomes positive for larger properties. This artifact of the interacted specification does not imply that waterfront reduces price on average.150151\textbf{Negative school rating ($-0.054$ per rating point, unstandardized).} This likely reflects confounding with property tax rates and regional effects. In higher-tax jurisdictions, school quality is partially capitalized through the tax rate, which enters separately. Conditional on tax rate, region, and other controls, the residual school rating variation may capture unobserved factors that correlate negatively with prices. The boundary-discontinuity literature, which isolates school quality from neighborhood composition, consistently finds positive valuations \citep{black1999better, bayer2007unified}; the divergence illustrates why cross-sectional partial coefficients on school quality should not be interpreted structurally.152153\textbf{Negative Walk Score ($-0.0004$ per point, unstandardized).} Walk Score is highly correlated with Bike Score ($r \approx 0.56$) and Transit Score ($r \approx 0.62$). In the presence of all three accessibility measures, the Walk Score coefficient may reflect residual urban density effects---after controlling for biking and transit access, the remaining variation in walkability may capture denser, smaller-lot neighborhoods. A walkability premium is well documented when accessibility enters alone \citep{pivo2011walkability}; with three collinear accessibility scores, the premium is split across coefficients and cannot be attributed variable-by-variable.154155\textbf{Negative basement ($-0.042$).} Basements are predominantly found in older properties in colder regions. Conditional on age, region, and size, the basement indicator may proxy for older construction quality or layout features valued less in modern markets.156157\textbf{Negative HOA membership ($-0.108$).} HOA properties include condominiums and planned communities that may have lower lot sizes and more restrictions. The negative sign is conditional on the separate log HOA fee variable ($+0.044$), suggesting that the HOA membership dummy captures the property-type effect while fees capture the service-quality gradient.158159These counterintuitive signs are common in hedonic regressions with many correlated controls and do not necessarily indicate misspecification, though they do limit the attributable economic interpretation of individual coefficients.160161\subsubsection{Progressive Geographic Fixed Effects}162\label{sec:progressive_fe}163164Table~\ref{tab:fe_comparison} documents how explanatory power increases with geographic granularity. Adding 50 state fixed effects increases the in-sample $R^2$ from 0.634 to 0.681. Replacing state dummies with 886 ZIP3 fixed effects further increases $R^2$ to 0.729 (in-sample) and out-of-sample $R^2$ to 0.725.165166\begin{table}[H]167\centering168\caption{OLS $R^2$ Under Progressively Finer Geographic Controls}169\label{tab:fe_comparison}170\begin{threeparttable}171\begin{tabular}{lrrrr}172\toprule173Specification & Geographic FE & $N_{\text{FE}}$ & In-sample $R^2$ & Out-of-sample $R^2$ \\174\midrule175Baseline (4 regions) & Census Region & 3 & 0.634 & 0.630 \\176State FE & State & 50 & 0.681 & 0.678 \\177ZIP3 FE & 3-digit ZIP & 886 & 0.729 & 0.725 \\178\bottomrule179\end{tabular}180\begin{tablenotes}181\small182\item \textit{Notes:} Same 62 non-geographic regressors across all specifications; geographic FE replace the 3 regional dummies. Out-of-sample $R^2$ computed on a random 20\% holdout. ZIP3 codes cover 886 unique prefixes in the sample.183\end{tablenotes}184\end{threeparttable}185\end{table}186187The progression from region to state to ZIP3 fixed effects yields $R^2$ gains of $+4.7$ pp and $+4.7$ pp, respectively. This 9.5 pp total gain from geographic granularity alone---achieved without any additional property-level information---underscores the importance of unobserved local factors in hedonic pricing. Notably, even ZIP3 fixed effects leave substantial residual variation unexplained: the gap between ZIP3 OLS ($R^2 = 0.725$) and XGBoost under random validation ($R^2 = 0.833$) suggests that non-linear attribute effects contribute an additional 10.8 pp of explained variation.188189\subsubsection{OLS Diagnostics}190191Figure~\ref{fig:diagnostics} presents diagnostic plots. The residual distribution exhibits excess kurtosis (5.55 vs.\ 3.0 for normality) and mild positive skewness (0.18), as confirmed by the Jarque-Bera test ($JB = 217{,}078$, $p < 0.001$). The heteroskedastic pattern visible in the residuals-versus-fitted plot motivates our use of HC3 standard errors.192193\begin{figure}[H]194 \centering195 \includegraphics[width=\textwidth]{figures/fig2_ols_diagnostics.png}196 \caption{OLS Diagnostic Plots: (a) Residuals vs.\ Fitted; (b) Normal Q-Q Plot; (c) Residual Distribution; (d) Scale-Location}197 \label{fig:diagnostics}198\end{figure}199200201\subsection{Spatial Autocorrelation}202\label{sec:spatial_autocorrelation}203204We compute Moran's $I$ on OLS residuals using a KNN spatial weight matrix ($k = 8$) on three independent random subsamples of 5,000 observations each. Table~\ref{tab:moran} reports the results.205206\begin{table}[H]207\centering208\caption{Moran's $I$ on OLS Residuals: Subsample Stability}209\label{tab:moran}210\begin{threeparttable}211\begin{tabular}{lrrrl}212\toprule213Subsample & $I$ & $z$-statistic & $p$-value & \\214\midrule215Subsample 1 & 0.2742 & 41.8 & $<0.001$ & *** \\216Subsample 2 & 0.2839 & 43.5 & $<0.001$ & *** \\217Subsample 3 & 0.2652 & 40.5 & $<0.001$ & *** \\218\midrule219Mean & 0.2745 & & & \\220Std.\ Dev. & 0.0076 & & & \\221\bottomrule222\end{tabular}223\begin{tablenotes}224\small225\item \textit{Notes:} Row-standardized KNN weight matrix with $k = 8$. Each subsample draws 5,000 observations at random. All $z$-statistics strongly reject the null of no spatial autocorrelation. The low standard deviation (0.008) across subsamples indicates that the diagnostic is highly stable.226\end{tablenotes}227\end{threeparttable}228\end{table}229230The mean Moran's $I = 0.2745$ (std $= 0.0076$) across three subsamples confirms \textbf{strong, stable positive spatial autocorrelation} in the OLS residuals. This implies that our regional controls (four Census regions) are insufficient to absorb local price variation. OLS standard errors may understate true uncertainty, and coefficient estimates may be biased if the spatial structure correlates with included regressors. The stability across subsamples (CV $= 2.8\%$) indicates that this is not a sampling artifact but a structural feature of the data. Addressing spatial dependence through spatial econometric models is an important direction for future work; our OLS and quantile regression results should be interpreted with this caveat.231232233\subsection{Quantile Regression and Inter-Quantile Tests}234\label{sec:qr_results}235236\subsubsection{Coefficient Estimates Across Quantiles}237238Table~\ref{tab:qr_results} presents quantile regression coefficients at the five estimated quantiles.239240\begin{table}[H]241\centering242\caption{Quantile Regression Coefficients at Selected Quantiles}243\label{tab:qr_results}244\begin{threeparttable}245\small246\begin{tabular}{lrrrrrr}247\toprule248Variable & $\tau=0.10$ & $\tau=0.25$ & $\tau=0.50$ & $\tau=0.75$ & $\tau=0.90$ & OLS \\249\midrule250$\ln$(Living Area) & 0.358*** & 0.313*** & 0.275*** & 0.237*** & 0.251*** & 0.312*** \\251Bedrooms & $-$0.085*** & $-$0.076*** & $-$0.064*** & $-$0.037*** & $-$0.034*** & $-$0.068*** \\252Bathrooms & 0.157*** & 0.195*** & 0.234*** & 0.259*** & 0.259*** & 0.236*** \\253Age & $-$0.430*** & $-$0.201*** & $-$0.066** & $-$0.007 & $-$0.026 & $-$0.042** \\254$\ln$(Lot Size) & 0.045*** & 0.051*** & 0.061*** & 0.070*** & 0.086*** & 0.070*** \\255Pool & 0.008 & 0.008 & 0.019*** & 0.061*** & 0.094*** & 0.029*** \\256Garage & 0.205*** & 0.146*** & 0.102*** & 0.061*** & 0.020*** & 0.109*** \\257Luxury Score & 0.018*** & 0.038*** & 0.054*** & 0.068*** & 0.072*** & 0.044*** \\258Foreclosure & $-$0.494*** & $-$0.473*** & $-$0.379*** & $-$0.327*** & $-$0.338*** & $-$0.406*** \\259Northeast & 0.339*** & 0.395*** & 0.471*** & 0.553*** & 0.603*** & 0.487*** \\260West & 0.365*** & 0.372*** & 0.376*** & 0.399*** & 0.450*** & 0.401*** \\261\bottomrule262\end{tabular}263\begin{tablenotes}264\small265\item \textit{Notes:} Estimated on a random subsample of 150,000 observations. Continuous variables standardized. Full set of 62 regressors included; selected coefficients shown. Significance: *** $p<0.001$, ** $p<0.01$, * $p<0.05$. Coefficients reflect one-standard-deviation effects for continuous variables.266\end{tablenotes}267\end{threeparttable}268\end{table}269270\begin{figure}[H]271 \centering272 \includegraphics[width=\textwidth]{figures/fig3_quantile_coefficients.png}273 \caption{Quantile Regression Coefficients Across the Conditional Price Distribution. Red dashed lines indicate OLS estimates. Coefficients are on standardized variables.}274 \label{fig:qr_coefficients}275\end{figure}276277Several economically interesting patterns emerge.278279\textbf{Living area gradient declines at upper quantiles.} The standardized $\ln(\text{sqft})$ coefficient declines from 0.358 ($\tau = 0.10$) to 0.237 ($\tau = 0.75$), indicating that additional space is associated with proportionally larger listing-price differences at the lower end of the conditional distribution. At higher quantiles, other factors (luxury features, location) may dominate size.280281\textbf{Bathroom gradient increases at upper quantiles.} In contrast, the bathroom gradient rises monotonically from 0.157 ($\tau = 0.10$) to 0.259 ($\tau = 0.90$), suggesting that bathroom count differentiates properties more strongly in the upper market.282283\textbf{Age penalty concentrated at lower quantiles.} The age gradient is $-0.430$ at $\tau = 0.10$ but statistically insignificant at $\tau = 0.75$ and $\tau = 0.90$. Age-related depreciation appears to be primarily a phenomenon of lower-priced properties, possibly because higher-priced properties are better maintained or benefit from vintage appeal.284285\textbf{Pool gradient emerges only above the median.} The pool coefficient is insignificant at $\tau = 0.10$ and $\tau = 0.25$ but rises to 0.094 at $\tau = 0.90$ ($\approx 9.9\%$ listing-price difference), consistent with pools being a luxury amenity.286287\textbf{Garage gradient declines monotonically.} The garage coefficient drops from 0.205 ($\tau = 0.10$) to 0.020 ($\tau = 0.90$), reflecting that garage availability differentiates lower-priced properties much more than upper-priced ones where garages are nearly universal.288289OLS averages across these heterogeneous gradients and can therefore misrepresent both the lower and upper segments of the market.290291\subsubsection{Inter-Quantile Wald Tests ($\tau = 0.10$ vs.\ $\tau = 0.90$)}292293Table~\ref{tab:iqr_tests} reports the inter-quantile Wald tests for equality of coefficients between the 10th and 90th percentiles.294295\begin{table}[H]296\centering297\caption{Inter-Quantile Wald Tests: $\hat{\beta}(0.10) - \hat{\beta}(0.90)$}298\label{tab:iqr_tests}299\begin{threeparttable}300\small301\begin{tabular}{lrrrl}302\toprule303Variable & $\hat{\beta}(0.10) - \hat{\beta}(0.90)$ & $z$-statistic & $p$-value & \\304\midrule305Garage & $+$0.185 & 28.92 & $<0.001$ & *** \\306Northeast & $-$0.264 & $-$21.43 & $<0.001$ & *** \\307Bathrooms & $-$0.103 & $-$10.48 & $<0.001$ & *** \\308$\ln$(Living Area) & $+$0.107 & 9.52 & $<0.001$ & *** \\309$\ln$(Lot Size) & $-$0.041 & $-$9.49 & $<0.001$ & *** \\310Age & $-$0.405 & $-$7.89 & $<0.001$ & *** \\311Pool & $-$0.087 & $-$7.80 & $<0.001$ & *** \\312Luxury Score & $-$0.054 & $-$6.82 & $<0.001$ & *** \\313West & $-$0.086 & $-$6.26 & $<0.001$ & *** \\314Bedrooms & $-$0.051 & $-$5.95 & $<0.001$ & *** \\315Foreclosure & $-$0.155 & $-$4.18 & $<0.001$ & *** \\316\midrule317\multicolumn{5}{l}{\textit{Not significant ($p > 0.05$)}} \\318Waterfront & $+$0.222 & 1.86 & 0.063 & \\319Age$^2$ & $+$0.010 & 1.40 & 0.162 & \\320\bottomrule321\end{tabular}322\begin{tablenotes}323\small324\item \textit{Notes:} $z$-statistics computed from the joint covariance matrix of the $\tau = 0.10$ and $\tau = 0.90$ quantile regression estimates; both quantiles estimated on the same 150,000-observation subsample. Variables sorted by $|z|$. 11 of 13 tested variables show statistically significant differences at the 5\% level. *** $p<0.001$, ** $p<0.01$, * $p<0.05$.325\end{tablenotes}326\end{threeparttable}327\end{table}328329The inter-quantile tests reject coefficient equality for 11 of 13 tested variables at the 5\% level. The largest inter-quantile difference is for garage ($+0.185$, $z = 28.92$), confirming that the garage listing-price gradient is dramatically larger for lower-priced properties. Bathrooms ($-0.103$, $z = -10.48$) and living area ($+0.107$, $z = 9.52$) also exhibit large, highly significant inter-quantile differences. The only two variables for which the null of equal coefficients cannot be rejected are age-squared ($z = 1.40$) and waterfront ($z = 1.86$, $p = 0.063$).330331These formal tests confirm the visual patterns in Figure~\ref{fig:qr_coefficients}: the conditional distribution of listing prices is not merely shifted by housing attributes but is differentially stretched and compressed, with different attributes mattering more at different points in the distribution.332333334\subsection{Machine Learning Under Random Validation}335\label{sec:ml_random}336337Table~\ref{tab:ml_comparison} summarizes out-of-sample performance under the random 80/20 split.338339\begin{table}[H]340\centering341\caption{Out-of-Sample Predictive Performance: Random Validation}342\label{tab:ml_comparison}343\begin{threeparttable}344\small345\begin{tabular}{lrrrrrr}346\toprule347 & \multicolumn{3}{c}{Log-Price Scale} & \multicolumn{3}{c}{Dollar Scale} \\348\cmidrule(lr){2-4} \cmidrule(lr){5-7}349Model & $R^2$ & RMSE & MAE & MAPE (\%) & MdAPE (\%) & MAE (\$) \\350\midrule351OLS & 0.6301 & 0.4911 & 0.3619 & 39.8 & 27.2 & 240,941 \\352Ridge ($\alpha=1$) & 0.6301 & 0.4911 & 0.3619 & --- & --- & --- \\353Lasso ($\alpha=0.001$) & 0.6280 & 0.4925 & 0.3627 & --- & --- & --- \\354Elastic Net & 0.6145 & 0.5014 & 0.3681 & --- & --- & --- \\355OLS + State FE & 0.6775 & 0.4586 & --- & --- & --- & --- \\356OLS + ZIP3 FE & 0.7253 & --- & --- & --- & --- & --- \\357Random Forest & 0.7842 & 0.3751 & 0.2636 & 28.4 & 18.5 & 180,116 \\358LightGBM & 0.8088 & 0.3531 & 0.2519 & 26.9 & 18.2 & 169,495 \\359\textbf{XGBoost} & \textbf{0.8330} & \textbf{0.3300} & \textbf{0.2327} & \textbf{24.7} & \textbf{16.5} & \textbf{157,822} \\360\bottomrule361\end{tabular}362\begin{tablenotes}363\small364\item \textit{Notes:} Training: 631,073 (80\%). Test: 157,769 (20\%). Random split, seed 42. MAPE = mean absolute percentage error; MdAPE = median APE. Dollar metrics computed by exponentiating predicted log-prices. Ridge, Lasso, Elastic Net dollar metrics suppressed for brevity (similar to OLS). ZIP3 FE RMSE and dollar-scale metrics not computed for this specification.365\end{tablenotes}366\end{threeparttable}367\end{table}368369XGBoost achieves the highest $R^2$ of 0.833 under random validation, representing a 20-percentage-point improvement over OLS. Regularized linear models (Ridge, Lasso, Elastic Net) offer no improvement over OLS, confirming that the parametric specification is not overfit---the predictive gap is driven by non-linearity and interaction effects, not overfitting. The ZIP3 FE model ($R^2 = 0.725$) closes roughly half the OLS-to-XGBoost gap, indicating that fine-grained geographic controls capture a substantial portion of the non-linearity that tree models exploit.370371\begin{figure}[H]372 \centering373 \includegraphics[width=\textwidth]{figures/fig4_model_comparison.png}374 \caption{Predicted vs.\ Actual Log-Prices Under Random Validation: (a) OLS; (b) XGBoost; (c) LightGBM}375 \label{fig:model_comparison}376\end{figure}377378379\subsection{Machine Learning Under Geographic Validation}380\label{sec:ml_geo}381382Table~\ref{tab:geo_holdout} reports performance when 10 states are held out entirely.383384\begin{table}[H]385\centering386\caption{Geographic Holdout Validation (10 States Held Out)}387\label{tab:geo_holdout}388\begin{threeparttable}389\begin{tabular}{lrrr}390\toprule391Model & $R^2$ (random) & $R^2$ (geo holdout) & $\Delta R^2$ \\392\midrule393OLS & 0.630 & $<0$ & $>-0.63$ \\394Random Forest & 0.784 & 0.542 & $-0.242$ \\395XGBoost & 0.833 & 0.547 & $-0.286$ \\396XGBoost (no geo features) & 0.830 & 0.519 & $-0.311$ \\397XGBoost (+ lat/lon) & 0.870 & 0.464 & $-0.406$ \\398\bottomrule399\end{tabular}400\begin{tablenotes}401\small402\item \textit{Notes:} Geographic holdout: CA, NY, TX, FL, OH, CO, NC, WA, IL, GA held out (438,315 observations). Training on remaining 350,527 observations. OLS with regional dummies fails catastrophically because the held-out states span all four Census regions and include the largest markets. ``No geo features'' removes region dummies from the full model. ``+ lat/lon'' adds raw latitude and longitude as continuous features.403\end{tablenotes}404\end{threeparttable}405\end{table}406407\textbf{Key finding.} The XGBoost $R^2$ drops from 0.833 (random) to 0.547 (geographic holdout)---a \textbf{28.6-percentage-point decline}. This demonstrates that a substantial portion of the random-validation $R^2$ reflects the model's ability to exploit local spatial structure rather than learning generalizable attribute-price relationships.408409Two additional experiments sharpen this conclusion:410\begin{itemize}[nosep]411 \item \textbf{Adding latitude and longitude} boosts random $R^2$ from 0.833 to 0.870 ($+3.7$ pp) but \emph{reduces} geographic holdout $R^2$ to 0.464 ($-8.3$ pp relative to the baseline XGBoost). Coordinates allow the model to memorize location-specific price levels, which is useful when nearby properties appear in the test set but harmful when entire states are withheld.412 \item \textbf{Removing all geographic features} (no region dummies) yields random $R^2 = 0.830$ (essentially unchanged) but geographic holdout $R^2 = 0.519$. Compared to the ablation-design variant of the full model (Geo $R^2 = 0.425$; see Section~\ref{sec:ablation}), dropping geography \emph{improves} geographic holdout by $+9.4$ pp. Region dummies can \emph{harm} geographic generalization because they encode training-set-specific geographic price levels.413\end{itemize}414415This finding is methodologically important: \textbf{random train-test splits can substantially overstate the predictive performance of hedonic models} when applied to geographically diverse national samples. Geographic holdout validation provides a more conservative---and arguably more relevant---assessment of model generalizability.416417418\subsection{Ablation: What Drives the ML Gain?}419\label{sec:ablation}420421Table~\ref{tab:ablation} presents the results of the feature ablation analysis for XGBoost.422423\begin{table}[H]424\centering425\caption{XGBoost Ablation Analysis: Marginal Contribution of Feature Groups}426\label{tab:ablation}427\begin{threeparttable}428\small429\begin{tabular}{llrrrr}430\toprule431Stage & Feature Set & $N_{\text{features}}$ & Random $R^2$ & Geo $R^2$ & $\Delta$ Geo $R^2$ \\432\midrule4331 & Structural only & 8 & 0.4976 & 0.3481 & --- \\4342 & + Lot & 9 & 0.5464 & 0.3765 & $+$0.028 \\4353 & + Amenities & 20 & 0.6378 & 0.4485 & $+$0.072 \\4364 & + Neighborhood & 27 & 0.8136 & 0.4833 & $+$0.035 \\4375 & + Market status & 32 & 0.8235 & 0.5014 & $+$0.018 \\4386 & Full model (+ interactions/cats/region) & 62 & 0.8327 & 0.4250 & $-$0.076 \\439\bottomrule440\end{tabular}441\begin{tablenotes}442\small443\item \textit{Notes:} Each row adds a feature group to the previous stage. Random $R^2$ is computed on the standard 20\% random holdout. Geo $R^2$ is computed on the 10-state geographic holdout. $\Delta$ Geo $R^2$ is the change from the previous stage.444\end{tablenotes}445\end{threeparttable}446\end{table}447448Three findings emerge from the ablation analysis.449450\textbf{Neighborhood features provide the largest random-validation gain.} Adding neighborhood variables (Walk Score, Bike Score, Transit Score, school rating, school count, school distance, tax rate) increases random $R^2$ from 0.638 to 0.814---a gain of $+17.6$ pp. This is more than twice the contribution of any other feature group, reflecting the importance of local amenities and public-service quality in explaining listing-price variation.451452\textbf{The full model hurts geographic generalization.} The transition from Stage 5 (32 features, Geo $R^2 = 0.501$) to Stage 6 (62 features, Geo $R^2 = 0.425$) \emph{reduces} geographic holdout $R^2$ by 7.6 pp. The features added in Stage 6 include region dummies, interaction terms involving region, and categorical controls. These features improve random $R^2$ modestly ($+0.9$ pp) but actively harm geographic generalization by encoding training-set-specific spatial patterns.453454\textbf{Structural features alone explain 35\% of geographic variation.} Even with only 8 structural variables, XGBoost achieves Geo $R^2 = 0.348$, indicating that basic property characteristics (size, bedrooms, bathrooms, age) carry non-trivial predictive power across geographies.455456457\subsection{The Role of Geographic Features}458\label{sec:geo_features}459460The ablation and geographic holdout results jointly demonstrate a critical tension in hedonic modeling: geographic features improve in-sample and random-holdout fit but degrade geographic generalization. Table~\ref{tab:geo_role} summarizes the evidence.461462\begin{table}[H]463\centering464\caption{Impact of Geographic Features on Model Performance}465\label{tab:geo_role}466\begin{threeparttable}467\small468\begin{tabular}{lrr}469\toprule470XGBoost Specification & Random $R^2$ & Geographic Holdout $R^2$ \\471\midrule472Full model (62 features, with region) & 0.8327 & 0.4250 \\473No geographic features (no region dummies) & 0.8297 & 0.5190 \\474Full model + lat/lon coordinates & 0.8701 & 0.4644 \\475\bottomrule476\end{tabular}477\begin{tablenotes}478\small479\item \textit{Notes:} ``No geographic features'' removes region dummies from the full model. ``+ lat/lon'' adds raw latitude and longitude as continuous features to the full model. Geographic holdout uses 10 states held out entirely.480\end{tablenotes}481\end{threeparttable}482\end{table}483484Removing region dummies costs only 0.3 pp in random $R^2$ (0.833 to 0.830) but \emph{gains} 9.4 pp in geographic holdout $R^2$ (0.425 to 0.519). Adding coordinates achieves the opposite: $+3.7$ pp random, $-5.5$ pp geographic holdout (relative to the no-geography specification).485486This pattern has important implications for automated valuation models (AVMs). In deployment contexts where the model must generalize to new geographies, geographic features can be counterproductive. The model without geography exploits only attribute-price relationships that transfer across markets, yielding more conservative but more robust predictions.487488489\subsection{SHAP Analysis and Cross-Model Stability}490\label{sec:shap_results}491492\subsubsection{Feature Importance Rankings}493494Table~\ref{tab:shap_importance} reports the top 20 features by mean absolute SHAP value from the XGBoost model.495496\begin{table}[H]497\centering498\caption{Top 20 Features by Mean Absolute SHAP Value (XGBoost)}499\label{tab:shap_importance}500\begin{threeparttable}501\begin{tabular}{rlr}502\toprule503Rank & Feature & Mean $|\phi|$ \\504\midrule5051 & $\ln$(Living Area) & 0.1740 \\5062 & Bathrooms & 0.1610 \\5073 & Avg.\ School Rating & 0.0881 \\5084 & Region: West & 0.0751 \\5095 & $\ln$(Lot Size) & 0.0747 \\5106 & Luxury Score & 0.0713 \\5117 & Property Tax Rate & 0.0694 \\5128 & Nearest School Distance & 0.0472 \\5139 & Region: Northeast & 0.0425 \\51410 & Bike Score & 0.0400 \\51511 & $\ln$(HOA Fees + 1) & 0.0398 \\51612 & Garage & 0.0378 \\51713 & Age & 0.0369 \\51814 & Hardwood Floors & 0.0311 \\51915 & Waterfront $\times$ $\ln$(sqft) & 0.0292 \\52016 & Sqft per Bedroom & 0.0289 \\52117 & Walk Score & 0.0276 \\52218 & Central Air & 0.0273 \\52319 & Region: South & 0.0250 \\52420 & Transit Score & 0.0213 \\525\bottomrule526\end{tabular}527\begin{tablenotes}528\small529\item \textit{Notes:} TreeSHAP values computed on 10,000 random test-set observations. Mean $|\phi|$ is the average absolute contribution of each feature to deviations from the expected predicted log-price. These are predictive contributions, not structural implicit prices.530\end{tablenotes}531\end{threeparttable}532\end{table}533534\begin{figure}[H]535 \centering536 \includegraphics[width=0.85\textwidth]{figures/fig5_shap_summary.png}537 \caption{SHAP Summary Plot for XGBoost. Each dot is one observation; horizontal position shows the feature's SHAP value (contribution to predicted log-price deviation from the mean); color indicates feature value (red = high, blue = low). These are predictive contributions, not causal effects.}538 \label{fig:shap_summary}539\end{figure}540541Living area and bathrooms are the two dominant predictive contributors, with mean absolute SHAP values of 0.174 and 0.161. School quality (0.088), regional location (West: 0.075; Northeast: 0.043), and lot size (0.075) form a second tier.542543\textbf{SHAP dependence plots.} Figure~\ref{fig:shap_dependence} shows how the SHAP contribution of key features varies with feature values. The non-linear shapes---particularly the strongly concave living-area SHAP and the threshold-like behavior of school rating and property tax rate---explain why tree-based models outperform linear OLS. These non-linearities cannot be captured by the semi-log specification even with interaction terms.544545\begin{figure}[H]546 \centering547 \includegraphics[width=\textwidth]{figures/fig10_shap_dependence.png}548 \caption{SHAP Dependence Plots for Eight Key Features. Each panel shows how the SHAP contribution varies with the feature value. Non-linear patterns (concavity, thresholds, saturation) explain the predictive advantage of tree-based models over linear specifications.}549 \label{fig:shap_dependence}550\end{figure}551552\subsubsection{Cross-Model SHAP Stability}553554A common concern with SHAP-based interpretation is that rankings may be model-specific artifacts. Table~\ref{tab:shap_stability} reports pairwise Spearman rank correlations of mean absolute SHAP values across three tree-based models.555556\begin{table}[H]557\centering558\caption{Cross-Model SHAP Importance Stability: Spearman Rank Correlations}559\label{tab:shap_stability}560\begin{threeparttable}561\begin{tabular}{lrrr}562\toprule563& XGBoost & LightGBM & Random Forest \\564\midrule565XGBoost & 1.000 & 0.9898 & 0.9060 \\566LightGBM & 0.9898 & 1.000 & 0.8917 \\567Random Forest & 0.9060 & 0.8917 & 1.000 \\568\bottomrule569\end{tabular}570\begin{tablenotes}571\small572\item \textit{Notes:} Spearman $\rho$ computed on the full vector of mean $|\phi|$ values across all features. The same six features---$\ln$(Living Area), Bathrooms, Avg.\ School Rating, Region: West, $\ln$(Lot Size), and Luxury Score---rank in the top six across all three models.573\end{tablenotes}574\end{threeparttable}575\end{table}576577The cross-model correlations are remarkably high. XGBoost and LightGBM produce nearly identical rankings ($\rho = 0.990$), while even the structurally different Random Forest model yields $\rho > 0.89$ with both gradient-boosted methods. The same six features appear in the top six across all three models. This stability lends credibility to the SHAP-based feature importance ranking as a description of the predictive structure of the data, not merely an artifact of a particular algorithm.578579\textbf{Note on SHAP versus OLS comparisons.} SHAP importance rankings differ from both OLS $t$-statistics and XGBoost gain importance. School rating ranks 3rd by SHAP but has a counterintuitive negative OLS sign; property tax rate ranks 7th by SHAP but 28th by standardized OLS coefficient magnitude. These discrepancies reflect the non-linear and interactive effects that SHAP captures but OLS cannot. However, even though SHAP rankings are stable across tree-based models, they should not be interpreted as revealing the ``true'' importance hierarchy of housing attributes---they remain predictive decompositions, not structural parameters.580581582\subsection{Geographic Heterogeneity}583584Figure~\ref{fig:geographic} maps the spatial distribution of listing prices. The well-documented coastal price gradient is clearly visible, with California, the Northeast corridor, Hawaii, and Colorado exhibiting the highest prices. The map also illustrates the non-representativeness concern: listing density is highly uneven, with sparse coverage in some rural areas.585586\begin{figure}[H]587 \centering588 \includegraphics[width=\textwidth]{figures/fig7_geographic_prices.png}589 \caption{Geographic Distribution of Log Listing Prices. Each dot represents one property (50,000 random subsample). Color indicates log-price. Note: listing density is not uniform; areas with few dots may have fewer Zillow listings, not necessarily fewer properties.}590 \label{fig:geographic}591\end{figure}592593\begin{figure}[H]594 \centering595 \includegraphics[width=0.85\textwidth]{figures/fig8_regional_prices.png}596 \caption{Listing Price Distribution by Census Region}597 \label{fig:regional}598\end{figure}599600601\subsection{Non-Linear Relationships}602603Figure~\ref{fig:marginal} presents bivariate (unconditional) relationships between key attributes and log listing prices. These plots illustrate the non-linearities that motivate the machine learning approach but should not be confused with conditional (ceteris paribus) effects.604605\begin{figure}[H]606 \centering607 \includegraphics[width=\textwidth]{figures/fig9_marginal_effects.png}608 \caption{Unconditional Bivariate Relationships Between Key Attributes and Log Listing Price. These are raw scatter plots and binned means; they do not control for other attributes and should not be interpreted as conditional effects.}609 \label{fig:marginal}610\end{figure}611