SPB Git

spb/wp9_uqo

Public

UQO Working Paper No. 9 — A grand hedonic model of the Canadian housing market: decomposing structure and location value.

6.9 KB · 126 lines latex
1% Author: Simon-Pierre Boucher — contact@spboucher.ai2% ============================================================================3% Appendix4% ============================================================================5\newpage6\begin{appendices}78\renewcommand{\thetable}{A\arabic{table}}9\renewcommand{\thefigure}{A\arabic{figure}}10\setcounter{table}{0}11\setcounter{figure}{0}1213\section{Variable construction}14\label{app:variables}1516The raw \texttt{listings} table stores every attribute as text. The estimation sample is17built by the first script of the pipeline (\texttt{01\_build\_sample.py}) from the rules18below, which were reconstructed from the description of the original (May 2026) pipeline and validated19against its stored outputs; the original cleaning code was not preserved.2021\paragraph{Bedrooms.} The integer components of the raw string are summed, so that22``3~+~1'' (three bedrooms on the main level and one below grade) is coded as four.2324\paragraph{Living area.} The explicit floor-area measurement is preferred. Exact entries25are used as reported; banded entries such as ``1100--1500 sqft'' are mapped to the upper26bound of the band, the convention that reproduces the published living-area distribution.27When the field is absent the interior-size field is used. Square feet are converted at28$1\text{ ft}^2 = 0.0929\text{ m}^2$; entries labelled m$^2$ are used as such.2930\paragraph{Lot area.} The free-text lot field is parsed when it contains a number with a31recognisable unit (square feet, square metres, acres or hectares), a phrase of the form32``under $x$ acre'', an acreage range (mapped to its upper bound), or a frontage-by-depth33pair in feet. Parsed lots above the 99th percentile of positive values are treated as34unparsed, because they are dominated by multi-acre acreage strings whose relationship to35the dwelling is unclear. The variable entering the regressions is $\ln(1+\text{lot area})$36together with an indicator equal to one when a positive lot area was parsed.3738\paragraph{Counts.} Full bathrooms, half bathrooms, parking spaces and storeys are taken as39reported; half bathrooms, parking and storeys are set to zero when absent. No cap is40applied in the baseline; Table~\ref{tab:robustness} caps storeys and parking at their 99th41percentiles.4243\paragraph{Dwelling type and ownership.} The raw building type is consolidated into eight44groups (house; apartment; row or townhouse; duplex; triplex; fourplex; manufactured home,45which pools manufactured, mobile and park-model homes; other), and the ownership type into46six (freehold; condominium or strata; leasehold; co-operative or co-ownership; other; not47reported). The broad listing category (house, condominium, plex, townhouse, apartment) is48also retained as a control.4950\paragraph{Neighbourhood and province.} The FSA is the first three characters of the postal51code, retained when it matches the pattern letter--digit--letter. The province is the52Canada Post region of the first letter: A, Newfoundland and Labrador; B, Nova Scotia; C,53Prince Edward Island; E, New Brunswick; G, H and J, Quebec; K, L, M, N and P, Ontario; R,54Manitoba; S, Saskatchewan; T, Alberta; V, British Columbia \citep{statcan2022fsa}. The55letters X and Y (territories) and the unassigned letters O and W (27 records in total) are56dropped. The scraper's own province field, which records the regional seed of the57extraction, is retained for reference only; it disagrees with the FSA-based province for5811.7\% of the estimation sample.5960\paragraph{Filters.} Listings are kept when the asking price is strictly positive, living61area, bedrooms and bathrooms are non-missing and the FSA is valid (147{,}236 of 172{,}01962raw records); the 1st and 99th percentiles of price and living area are then applied as63inclusive bounds, leaving 142{,}121 listings. FSAs with fewer than 25 listings are pooled64into one residual category per province.6566\section{Additional results}67\label{app:tables}6869\input{../results/tables/moran_sensitivity}7071\section{Reconciliation with the May 2026 version}72\label{app:reconciliation}7374The May 2026 version of this paper (v1.2) reported estimates from an upstream pipeline that75was not preserved. The present version re-estimates every result from the reconstructed76pipeline described in Appendix~\ref{app:variables}, with two substantive differences: the77province of each listing is derived from its FSA rather than from the scraper's regional78seed, and the reconstructed trimming rule retains 142{,}121 rather than 140{,}931 listings79(a difference of 0.8\%, concentrated at the upper living-area bound). All headline80magnitudes are preserved (Table~\ref{tab:reconciliation}); the estimates that changed81materially are those that use the province variable---the province-effects $R^2$, the82leave-one-province-out ranking and the provincial heterogeneity---and the two lot83coefficients, whose free-text parser could not be recovered exactly. The variance84decomposition, the inference comparison, the spline, the spatial holdout and the Moran85sensitivity analysis are new to this version.8687\begin{table}[htbp]\centering88\caption{Headline estimates: May 2026 version (v1.2) and present version (v1.3)}89\label{tab:reconciliation}90\begin{threeparttable}91\begin{tabular}{lcc}92\toprule93Quantity & v1.2 (May 2026) & v1.3 (this version) \\94\midrule95Estimation sample & 140{,}931 & 142{,}121 \\96Absorbed location effects & 1{,}153 & 1{,}155 \\97$R^2$: M1 / M2 / M3 (houses) & 0.464 / 0.469 / 0.567 & 0.467 / 0.470 / 0.605 \\98$R^2$: M4 (houses, FSA) / M5 (grand) & 0.762 / 0.767 & 0.769 / 0.776 \\99Living-area elasticity, M5 (SE) & 0.547 (0.009) & 0.529 (0.009) \\100Full-bathroom coefficient, M5 (SE) & 0.109 (0.004) & 0.112 (0.004) \\101Bedrooms, M5 & $-0.002$ & $-0.006$ \\102$\ln$ lot / lot indicator, M5 & 0.030 / $-0.196$ & 0.067 / $-0.459$ \\103Out-of-sample $R^2$ / MdAPE & 0.764 / 15.8\% & 0.772 / 15.6\% \\104Moran's $I$, structure $\to$ grand ($k=10$) & 0.46 $\to$ 0.08 & 0.50 $\to$ 0.06 \\105Gradient slope on $\ln$ distance & $-0.085$ & $-0.082$ \\106Quadratic in $\ln$ area: $\beta_1$ / $\beta_2$ & 1.065 / $-0.053$ & 1.147 / $-0.063$ \\107LOPO mean within-province $R^2$ & 0.362 (AB negative) & 0.341 (BC negative) \\108Size elasticity range across provinces & 0.44 (NL)--0.66 (MB) & 0.41 (NL)--0.73 (SK) \\109Premium ratio, most / least expensive FSA & $\approx 9$ & $\approx 10$ \\110\bottomrule111\end{tabular}112\begin{tablenotes}\footnotesize113\item Notes: v1.2 values are the published numbers of the May 2026 version, archived in114\texttt{results/reference/}; v1.3 values are produced by the current pipeline115(\texttt{results/reproduced/}). The v1.2 province variable was the scraper's regional seed,116which mislabelled about 12\% of listings; the v1.2 statement that the lowest-premium FSAs117included ``E2A (QC)'' and ``R0M (SK)'' reflected this error (E is New Brunswick and R is118Manitoba). In v1.2 a doubling of distance was described as lowering the location premium by1198.5\%; the correct reading of a slope of $-0.085$ on $\ln$ distance is $-5.7\%$ per120doubling.121\end{tablenotes}122\end{threeparttable}123\end{table}124125\end{appendices}126
Files · main
Menu

Theme