SPB Git forge

spb/wp22_uqo

Public
6commits 1branches 0releases
142.4 MBsize
maindefault branch
2 h agolast push
TeX 55.1% Python 44.2%
5.7 KB · 28 lines latex
Raw Blame History
1\begin{appendices}23\section{Algorithms}\label{app:algorithms}45\paragraph{Stage one.} For class $k$: (1) build features (conditional-median imputation of floor area, lot area and age within class $\times$ municipality, then class $\times$ region, then class; missingness indicators); (2) assign the location partition: the finest cell among 500 m, 1 km, 2 km, 5 km, municipality and MRC with at least 15 sales of the class; (3) fit $\log P$ on the hedonic terms, their time interactions and month dummies with absorbed location effects by weighted least squares; (4) compute Huber weights $w_i = \min(1, 1.345\, s / |e_i|)$ with $s$ the MAD-based scale and refit twice; (5) return $\mu_{k,t}$, its standard errors, the residuals and the robust scale.67\paragraph{Stage two.} For each level in (region, MRC, municipality): (1) subtract the parent's deviation path from each residual; (2) aggregate residual means $\bar y_{g,t}$ and counts $n_{g,t}$; (3) set $\sigma_g^2 = w s_g^2 + (1-w)\sigma_k^2$ with $w = N_g/(N_g+100)$ and $s_g$ the cell's MAD-based scale; (4) evaluate the Kalman-filter log-likelihood of each cell with at least six observed months on the grid $\log\tau^2 \in [\log 10^{-8}, \log 2\cdot10^{-2}]$ (48 points); (5) run the grid EM for $(m_\ell, v_\ell)$ with $v_\ell \ge 0.05$; (6) for each cell choose $\tau_g^2$ at the mode of $\log L_g(\tau^2) - (\log\tau^2 - m_\ell)^2/(2v_\ell)$, run the filter, down-weight months with standardised innovations above 1.345 by dividing their observation variance by the Huber weight, re-choose $\tau_g^2$ and re-run (two passes), and apply the Rauch--Tung--Striebel smoother; (7) pass the smoothed (retrospective) or filtered (real-time) deviation to the children.89\paragraph{Kalman recursions.} With state $\delta_t$, $\delta_{t|t-1} = \delta_{t-1|t-1}$, $p_{t|t-1} = p_{t-1|t-1} + \tau^2$; if $n_t > 0$: $F_t = p_{t|t-1} + \sigma^2/n_t$, $v_t = \bar y_t - \delta_{t|t-1}$, $\kappa_t = p_{t|t-1}/F_t$, $\delta_{t|t} = \delta_{t|t-1} + \kappa_t v_t$, $p_{t|t} = p_{t|t-1}(1-\kappa_t)$, $\log L \mathrel{+}= -\tfrac12(\log 2\pi F_t + v_t^2/F_t)$; otherwise $\delta_{t|t} = \delta_{t|t-1}$, $p_{t|t} = p_{t|t-1}$, $\kappa_t = 0$. The initial state is diffuse ($p_0 = 0.25$). The smoother runs backward with gain $c_t = p_{t|t}/p_{t+1|t}$.1011\section{Data cleaning rules}\label{app:cleaning}1213The rules of Table~\ref{tab:exclusions} are implemented in \texttt{src/sharp\_hpi/cleaning.py}. Classification precedence: (R1) roll building year after the sale year; (R2) roll type ``terrain'' or use code beginning with 9 or 4; (R3) use code outside \{1000, 1100, 1211\}; (R4) class from the roll (1000 with 1 dwelling and ``Intégré'' link: condominium; 1000 with 1 dwelling and detached/semi/row link: house; 1000 with 2--5 dwellings: plex; 6 or more: multi-unit; 1100: cottage; 1211: mobile home); (R5) provider label when the roll is incomplete. Flags: exact duplicate (parcel, date, price), same parcel same day different prices, shared parcel ($>10$ sales), multi-parcel deed (same date, price, municipality and street name, or same date, price and 0.01$^\circ$ cell), assessment-ratio outlier ($|\log(P/A) - \mathrm{median}_{year,class,region}| > \log 4$, with $A$ the assessment in force at the sale), price above \$10 million. Independent flag counts and the provider-versus-roll agreement are in the repository.1415\section{Geographic concordance}\label{app:geo}1617Boundaries: MRNF \emph{Découpages administratifs} 1:20 000, version V2026-07, layers \texttt{munic\_s} (municipality, MRC and region codes), \texttt{comet\_s} (metropolitan communities), \texttt{arron\_s} (boroughs); CRS NAD83 geographic, metric operations in NAD83 / Quebec Lambert (EPSG:32198). Every sale falls inside a municipal polygon. The MAMH municipal register supplies population, designation and constitution dates; municipalities constituted or merged after January 2021 (Amos 2025, Courcelles--Saint-Évariste 2024, Hébertville 2026, La Morandière-Rochebaucourt 2023, La Pocatière 2025, Lac-des-Aigles 2024, Notre-Dame-de-la-Salette 2022, Oujé-Bougoumou 2023, Plessisville 2024) are coded on their 2026 boundaries throughout.1819\section{Simulation design}\label{app:sim}2021Table~\ref{tab:mc_design} lists the scenarios. Each replication draws 60 municipalities (4 regions $\times$ 3 MRCs $\times$ 5 municipalities) with expected monthly sales $\lambda_u \sim$ log-normal$(1.2, 1.3^2)$ (median 3.3; the ``sparse'' scenario multiplies by 0.35), housing stock proportional to $\lambda_u$ times a uniform$(80,160)$ factor, latent paths $\mu_t$ (random walk with drift, optional break), $\delta^R$, $\delta^M$, $\delta^U$ (random walks with the stated innovation standard deviations; half of the municipalities have $\tau_U/4$), sales $\sim$ Poisson$(\lambda_u s_t)$ with seasonal factor $s_t = 1 + 0.6\cos(2\pi (t\bmod 12 - 5)/12)$, log floor area $\sim N(\log 120 + 0.15 m_u + q t, 0.35^2)$ with municipality level $m_u \sim N(0, 0.25^2)$ and quality trend $q$, gamma ages, log lot areas, storeys, a hedonic surface with quadratic floor-area and age terms and an elasticity that drifts by $\beta_{fa}$ over the sample, spatially correlated cell quality $0.08\sin(x/1500)\cos(y/1500) + 0.06\,\mathbb{1}(\text{radius}<1.5\text{ km})$, Student-$t$ noise with the stated degrees of freedom and contamination, resales (12\% of sales are of a randomly chosen earlier parcel of the same municipality at least six months earlier), floor area missing at the stated rate, and exponential registration lags with mean 10 days. The truth for a municipality is $L_{u,t}$; for a region, MRC or the province it is the stock-weighted mean of its municipalities' $L_{u,t}$.2223\section{Supplementary tables}\label{app:supp}2425\input{tables/tab_completeness_supp}2627\end{appendices}28