SPB Git forge

spb/wp1_uqo

Public
4commits 1branches 1releases
5.6 MBsize
maindefault branch
3 min agolast push
TeX 52.2% Python 47.8%
17.4 KB · 106 lines latex
Raw Blame History
1% ============================================================================2\section{Methodology}3\label{sec:methodology}4% ============================================================================56\subsection{Hedonic specification}78For each segment the baseline is the semi-log hedonic equation9\begin{equation} \label{eq:hedonic}10\ln P_i = \alpha + \mathbf{X}_i'\boldsymbol\beta + \mathbf{A}_i'\boldsymbol\gamma + \mathbf{R}_i'\boldsymbol\delta + \varepsilon_i, \qquad i = 1, \ldots, N,11\end{equation}12where $P_i$ is the asking price of listing $i$, $\mathbf{X}_i$ collects the structural and locational variables of the segment (Table~\ref{tab:specification}), $\mathbf{A}_i$ the amenity indicators and $\mathbf{R}_i$ the three regional indicators. Continuous regressors are centred at their segment means, which leaves the slopes unchanged and makes the intercept the conditional log price of a mean-characteristic property in the reference region \citep{marquardt1980comment}. Equation~\eqref{eq:hedonic} is estimated by OLS with HC3 standard errors \citep{mackinnon1985some, long2000using, cribari2004asymptotic} and serves as the conditional-mean benchmark. For a binary attribute with coefficient $\gamma_k$, the proportional price differential is $\exp(\gamma_k) - 1$ \citep{halvorsen1980interpretation}; for small coefficients the two are close and we quote coefficients in log points.1314\input{tables/specification}1516\subsection{Quantile regression}1718The $\tau$-th conditional quantile of the log asking price is modelled as linear in the same regressors,19\begin{equation} \label{eq:qr}20Q_\tau(\ln P_i \mid \mathbf{X}_i, \mathbf{A}_i, \mathbf{R}_i) = \alpha(\tau) + \mathbf{X}_i'\boldsymbol\beta(\tau) + \mathbf{A}_i'\boldsymbol\gamma(\tau) + \mathbf{R}_i'\boldsymbol\delta(\tau),21\end{equation}22and the coefficient vector $\boldsymbol\theta(\tau) = (\alpha(\tau), \boldsymbol\beta(\tau)', \boldsymbol\gamma(\tau)', \boldsymbol\delta(\tau)')'$ is estimated by minimising the check-function objective of \citet{koenker1978regression},23\begin{equation} \label{eq:check}24\hat{\boldsymbol\theta}(\tau) = \arg\min_{\boldsymbol\theta} \sum_{i=1}^{N} \rho_\tau\!\left(\ln P_i - \mathbf{Z}_i'\boldsymbol\theta\right), \qquad \rho_\tau(u) = u\,[\tau - \mathbf{1}(u < 0)],25\end{equation}26with $\mathbf{Z}_i = (1, \mathbf{X}_i', \mathbf{A}_i', \mathbf{R}_i')'$. We estimate $\tau \in \{0.10, 0.25, 0.50, 0.75, 0.90\}$, the grid used by \citet{zietz2008determinants} and \citet{liao2012hedonic}, which is fine enough to distinguish monotone, U-shaped and sign-changing coefficient profiles while keeping the tail estimates away from the extremes where the conditional density is thin. The linear program is solved by the interior-point routine of \texttt{statsmodels} with a ceiling of 5,000 iterations. Fit is summarised by the pseudo-$R^2$ of \citet{koenker1999goodness},27\begin{equation} \label{eq:pseudor2}28R^1(\tau) = 1 - \frac{\sum_i \rho_\tau\!\left(\ln P_i - \mathbf{Z}_i'\hat{\boldsymbol\theta}(\tau)\right)}{\sum_i \rho_\tau\!\left(\ln P_i - \hat{Q}_\tau\right)},29\end{equation}30where $\hat{Q}_\tau$ is the unconditional sample quantile. $R^1(\tau)$ compares the weighted absolute deviations of the fitted model to those of the constant-only model at the same $\tau$; it is a local measure and is not comparable to the OLS $R^2$.3132It is worth stating what the quantile index means here. $\tau$ indexes the conditional distribution of the log asking price given the covariates, not the unconditional price distribution: a listing at $\tau = 0.10$ is one whose price is low \emph{relative to what its characteristics and location predict}, not necessarily a cheap listing. The conditional and unconditional rankings are correlated, so it is convenient to speak of the ``lower'' and ``upper'' segments of the market, but the coefficients describe how the price schedule is shaped at different conditional ranks.3334\subsection{Spatial weights}3536Spatial relations are represented by a $k$-nearest-neighbour matrix with $k = 10$ and inverse-distance weights, built within each segment from the listing coordinates with a k-d tree \citep{bentley1975multidimensional}:37\begin{equation} \label{eq:W}38w_{ij} = \frac{d_{ij}^{-1}}{\sum_{l \in \mathcal{N}_i} d_{il}^{-1}} \ \text{ if } j \in \mathcal{N}_i, \qquad w_{ij} = 0 \ \text{ otherwise},39\end{equation}40where $\mathcal{N}_i$ is the set of the ten listings nearest to $i$ and $d_{ij}$ their distance. The matrix is row-standardised by construction, so $[\mathbf{W}\ln\mathbf{P}]_i$ is a weighted average of the ten neighbouring log prices and the lag coefficient is read as the elasticity of a listing's price to the average price of its neighbours. Nearest-neighbour weights avoid the islands produced by distance bands in a province where listing density varies by several orders of magnitude \citep{getis2009spatial}; their cost is that the ten neighbours of a rural parcel may lie tens of kilometres away while those of a Montreal condominium lie in the same building. Two implementation details should be recorded. The neighbour search and the distances $d_{ij}$ are computed in unprojected latitude--longitude degrees; at the latitude of Quebec one degree of longitude is about 70 percent of a degree of latitude, so the neighbourhoods are slightly elongated in the north--south direction. And listings with identical coordinates (several units in the same building) receive a distance floored at $10^{-10}$, so that such a neighbour receives almost the entire weight of row $i$. Neither feature affects the row-standardisation, but both are candidates for the sensitivity analysis described in Section~\ref{sec:robustness}.4142\subsection{Two-stage spatial quantile regression}43\label{sec:2sqr}4445The spatial quantile model adds a spatial lag of the dependent variable to equation~\eqref{eq:qr}:46\begin{equation} \label{eq:sqr}47Q_\tau(\ln P_i \mid \mathbf{Z}_i, [\mathbf{W}\ln\mathbf{P}]_i) = \mathbf{Z}_i'\boldsymbol\theta(\tau) + \rho(\tau)\,[\mathbf{W}\ln\mathbf{P}]_i .48\end{equation}49The lag is endogenous because the neighbours' prices depend on the price of $i$ through the same mechanism. Following the spatial two-stage least squares logic of \citet{kelejian1998generalized}, the lag is instrumented by the spatially lagged covariates, and following the fitted-value two-stage quantile regression of \citet{amemiya1982two} and \citet{powell1983asymptotic}, generalised by \citet{chen1996twostage} and \citet{kim2004quantile}, the endogenous regressor is replaced in the quantile objective by its first-stage projection. The first stage is the least-squares regression50\begin{equation} \label{eq:firststage}51\mathbf{W}\ln\mathbf{P} = \boldsymbol{\Pi}_0 + \mathbf{Z}\boldsymbol{\Pi}_1 + \mathbf{WZ}\boldsymbol{\Pi}_2 + \mathbf{v}, \qquad \widehat{\mathbf{W}\ln\mathbf{P}} = \hat{\boldsymbol\Pi}_0 + \mathbf{Z}\hat{\boldsymbol\Pi}_1 + \mathbf{WZ}\hat{\boldsymbol\Pi}_2,52\end{equation}53where $\mathbf{Z}$ excludes the constant and $\mathbf{WZ}$ contains the spatial lags of all covariates, including the amenity and regional indicators. The second stage is the quantile regression54\begin{equation} \label{eq:2sqr}55\hat{\boldsymbol\theta}(\tau), \hat\rho(\tau) = \arg\min \sum_{i=1}^{N} \rho_\tau\!\left(\ln P_i - \mathbf{Z}_i'\boldsymbol\theta - \rho\,\widehat{[\mathbf{W}\ln\mathbf{P}]}_i\right).56\end{equation}57We call the resulting estimator 2SQR. Three properties should be kept in mind. First, because the first stage is least squares rather than a quantile regression at $\tau$, the estimator is the two-stage least absolute deviations estimator of \citet{amemiya1982two} generalised to an arbitrary $\tau$, not the estimator recommended by \citet{kim2004quantile}; it is consistent for the slopes of equation~\eqref{eq:sqr} when the composite error $u_i(\tau) + \rho(\tau)v_i$ has a conditional $\tau$-quantile that does not depend on the instruments, which holds under independence of the errors from the covariates and their spatial lags but not under general heteroskedasticity. Second, it is not the inverse quantile regression of \citet{chernozhukov2006quantile} and \citet{su2011instrumental}, which would be the natural estimator if the spatial lag were to be treated as a structural endogenous regressor under weaker conditions; we did not implement it. Third, the second-stage residuals are computed with the \emph{fitted} lag. Since $\widehat{\mathbf{W}\ln\mathbf{P}}$ is a linear combination of $\mathbf{Z}$ and $\mathbf{WZ}$, the second stage is, from the point of view of residual diagnostics, a quantile regression on $\mathbf{Z}$ and one linear combination of $\mathbf{WZ}$; its residuals should not be expected to be less spatially autocorrelated than those of equation~\eqref{eq:qr}, and they are not (Section~\ref{sec:moran_sqr}). The structural residuals $\ln P_i - \mathbf{Z}_i'\hat{\boldsymbol\theta}(\tau) - \hat\rho(\tau)[\mathbf{W}\ln\mathbf{P}]_i$, which use the observed lag, are the appropriate object for that diagnostic and were not computed in the original run.5859The exclusion restriction is that neighbours' characteristics affect a listing's price only through neighbours' prices. As \citet{gibbons2012mostly} emphasise, this is an assumption of convenience: the lot sizes or amenity classifications of neighbouring listings may describe the neighbourhood directly. We therefore regard $\hat\rho(\tau)$ as a descriptive measure of how strongly a listing's conditional quantile co-moves with the neighbouring price level, and the 2SQR amenity coefficients as the part of the amenity differential that is not accounted for by that co-movement. Instrument relevance is assessed with the first-stage $R^2$; the partial $F$-statistic on the excluded instruments $\mathbf{WZ}$ \citep{stock2005testing} was not recorded by the original run and the overall first-stage $F$ reported in Table~\ref{tab:sqr} is only an upper bound for it.6061\subsection{Effect decomposition under the spatial lag}6263In a spatial autoregressive model the response of the vector of log prices to a change in regressor $k$ is $(\mathbf{I} - \rho\mathbf{W})^{-1}\beta_k$, whose diagonal gives direct effects, off-diagonal elements indirect effects and row sums total effects \citep{lesage2009introduction}. Computing these matrices for samples of up to 9,239 listings, and bootstrapping them, was not attempted. We report instead the scalar approximation that treats $\mathbf{W}$ as if every row sum of $(\mathbf{I} - \rho\mathbf{W})^{-1}$ were $1/(1-\rho)$:64\begin{equation} \label{eq:effects}65\text{Direct}_k(\tau) \approx \beta_k(\tau), \qquad \text{Indirect}_k(\tau) \approx \frac{\rho(\tau)\,\beta_k(\tau)}{1 - \rho(\tau)}, \qquad \text{Total}_k(\tau) \approx \frac{\beta_k(\tau)}{1 - \rho(\tau)}.66\end{equation}67The approximation is exact for the total effect when $\mathbf{W}$ is row-standardised and understates the direct effect slightly, because the diagonal of $(\mathbf{I} - \rho\mathbf{W})^{-1}$ exceeds one by the feedback term \citep{lesage2014biggest}. The indirect share of the total is $\rho(\tau)$ by construction, so the decomposition adds no information beyond $\hat\rho(\tau)$ and $\hat\beta_k(\tau)$; it is reported because dollar-equivalent magnitudes at the median are easier to read than log points, and it is evaluated at $\tau = 0.50$ only, the single quantile for which the original run recorded the second-stage coefficients.6869\subsection{Inference}70\label{sec:bootstrap}7172The asymptotic covariance of a quantile regression estimator depends on the conditional density of the error at zero, which is awkward to estimate in the tails \citep{koenker2005quantile}. Standard errors for the coefficients of equation~\eqref{eq:qr} are therefore obtained by the paired (non-parametric) bootstrap \citep{freedman1981bootstrapping, efron1993introduction, buchinsky1995estimating, hahn1995bootstrapping}: $B = 200$ samples of $N$ listings are drawn with replacement, the quantile regression is re-estimated on each, and the standard error of $\hat\theta_k(\tau)$ is73\begin{equation} \label{eq:bootse}74\widehat{\mathrm{SE}}_{\mathrm{boot}}[\hat\theta_k(\tau)] = \left[\frac{1}{B}\sum_{b=1}^{B}\left(\hat\theta_k^{(b)}(\tau) - \bar{\theta}_k(\tau)\right)^2\right]^{1/2},75\end{equation}76with $\bar\theta_k(\tau)$ the bootstrap mean. A replication that fails to converge is discarded and the standard error is computed from the successful replications, provided at least 100 succeed; all twenty segment--quantile combinations met this condition. Significance is assessed by the normal approximation $\hat\theta_k/\widehat{\mathrm{SE}}_{\mathrm{boot}}$. Two caveats apply. The paired bootstrap resamples listings as if they were independent, which they are not; with Moran's $I$ above 0.5 on the residuals, the bootstrap standard errors are likely to understate the sampling variability, and a block or cluster bootstrap \citep{lahiri2003resampling, cameron2008bootstrap, hagemann2017cluster} or a bootstrap that respects the spatial structure of Moran's test \citep{jin2015bootstrap} would be preferable. And the bootstrap was applied to the quantile regressions of equation~\eqref{eq:qr} only; the 2SQR second stage was not bootstrapped, so no standard errors are available for $\hat\rho(\tau)$ or for the 2SQR coefficients, and the generated-regressor problem of the fitted lag \citep{powell1983asymptotic} is not addressed.7778\subsection{Tests of inter-quantile equality}7980Whether the implicit price of amenity $k$ differs between two quantiles is tested with81\begin{equation} \label{eq:wald}82W_k(\tau_1, \tau_2) = \frac{\left[\hat\gamma_k(\tau_1) - \hat\gamma_k(\tau_2)\right]^2}{\widehat{\mathrm{Var}}_{\mathrm{boot}}[\hat\gamma_k(\tau_1)] + \widehat{\mathrm{Var}}_{\mathrm{boot}}[\hat\gamma_k(\tau_2)]} \;\overset{H_0}{\sim}\; \chi^2(1),83\end{equation}84for the pairs $(0.10, 0.90)$, $(0.25, 0.75)$ and $(0.10, 0.50)$. The denominator omits the covariance between the two estimators, which is generally positive because both are estimated on the same sample \citep{koenker2002inference}; the statistic therefore tends to understate the evidence against $H_0$, and the rejections reported below are conservative in that respect, although not with respect to the spatial dependence ignored by the bootstrap. The test is in the spirit of the quantile-based heteroskedasticity test of \citet{koenker1982robust}, which asks whether slopes differ across quantiles. A joint test across all amenities would require the full bootstrap covariance matrix of the stacked coefficient vector at the two quantiles, which was not saved; we do not report an omnibus statistic and instead count the amenities for which $H_0$ is rejected.8586\subsection{Residual spatial autocorrelation}8788Spatial dependence in the residuals $e_i$ of each model is measured by Moran's $I$,89\begin{equation} \label{eq:moran}90I = \frac{N}{S_0}\,\frac{\mathbf{e}'\mathbf{W}\mathbf{e}}{\mathbf{e}'\mathbf{e}}, \qquad S_0 = \sum_i\sum_j w_{ij},91\end{equation}92with $\mathbf{e}$ demeaned, and is standardised with the expectation $-1/(N-1)$ and the randomisation variance of \citet{cliff1981spatial}, which adjusts for the kurtosis of the residuals. The statistic is computed on OLS residuals, on the residuals of each quantile regression and on the second-stage residuals of each 2SQR, using the same $\mathbf{W}$.9394\subsection{Dollar-equivalent implicit prices}9596To express the quantile coefficients in dollars, the log-point differential at quantile $\tau$ is applied to the unconditional sample quantile of the asking price $P(\tau) = \exp(\hat Q_\tau)$:97\begin{equation} \label{eq:implicit}98\pi_k(\tau) = P(\tau)\left[\exp\!\big(\hat\gamma_k(\tau)\big) - 1\right].99\end{equation}100This is a presentational device, not an additional estimate: it scales a conditional differential by a price level that is representative of the $\tau$-th part of the market, and it inherits all the qualifications of the coefficient.101102\subsection{Identification and interpretation}103\label{sec:identification}104105The estimates are conditional associations in a single cross-section of asking prices and support no causal claim about the effect of building a park or opening a transit station. Four issues delimit their interpretation. Households sort across locations on unobserved preferences that are correlated with amenity access \citep{bayer2007migration}, so an amenity indicator may proxy for the type of neighbourhood and of household that selects it; the regional indicators, the distance gradient and the spatial lag absorb part of this, not all of it. The amenity indicators are broker classifications; measurement error in a binary regressor attenuates its coefficient, and a broker's propensity to mention an amenity may itself vary with the price segment, which would produce quantile heterogeneity in the coefficient without any heterogeneity in capitalisation. Asking prices differ from transaction prices by a premium that depends on market conditions and seller strategy; the coefficients are unbiased for the transaction-price schedule only if that premium is, conditionally on the covariates, unrelated to the amenity indicators at each quantile. And the quantile coefficients are gradients of an equilibrium price schedule, not willingness-to-pay parameters of a household type \citep{kuminoff2014capitalization}; a declining profile of the transit coefficient across $\tau$ is consistent with stronger transit dependence among buyers of lower-priced homes \citep{glaeser2008poor}, but equally with differences in the supply of transit-adjacent housing or in broker reporting across segments. We use the expression \emph{quantile-specific capitalisation gradient} for the estimates and reserve mechanisms for Section~\ref{sec:discussion}, where they are presented as interpretations rather than findings.106