# RECORD 1cd473df8f393883694de4530b0d1c667382890c # TITLE: Exploring a multilevel approach with spatial effects to model housing price in San José, Costa Rica # YEAR: 2021.0 VENUE: Environment and Planning B Urban Analytics and City Science DOI: 10.1177/23998083211041122 # AUTHORS: E. Pérez-Molina # PAGES: 18 CANDIDATE TABLE PAGES (1-based): [9, 10] # ABSTRACT: A multilevel model of the housing market for San José Metropolitan Region (Costa Rica) was developed, including spatial effects. The model is used to explore two main questions: the extent to which contextual (of the surroundings) and compositional (of the property itself) effects explain variation of housing prices and how does the relation between price and key covariates change with the introduction of multilevel effects. Hierarchical relations (lower level units nested into higher level) were modeled by specifying multilevel models with random intercepts and a conditional autoregressive term to include spatial effects from neighboring units at the higher level (districts). The random intercepts and conditional autoregressive models presented the best fit to the data. Variation at the higher level accounted for 16% of variance in the random intercepts model and 28% in the conditional autoregressive model. The sign and magnitude of regression coefficients proved remarkably stable across model specifications. Travel time to the city center, which presented a non-linear relation to price, was found to be the most important determinant. Multilevel and conditional autoregressive models constituted important improvements in modeling housing price, despite most of the variation still occurring at the lower level, by improving the overall model fit. They were capable of representing the regional structure and of reducing sampling bias in the data. However, the conditional autoregressive specification only represented a limited advance over the random intercepts formulation. ===== PAGE 1 (score 4, numeric-paren 0, table-words 0, var-words 4) ===== Exploring a Multilevel Approach with Spatial Effects to Model Housing Price in San Jos´e, Costa Rica Journal Title XX(X):1–18 ©The Author(s) 2020 Reprints and permission: sagepub.co.uk/journalsPermissions.nav DOI: 10.1177/ToBeAssigned www.sagepub.com/ SAGE Eduardo P´erez-Molina1 Abstract A multilevel model of the housing market for San Jos´e Metropolitan Region (Costa Rica) was developed, including spatial effects. Hierarchical relations (lower level units nested into higher level) were modeled by specifying multilevel models with random intercepts and a conditional autoregressive (CAR) term to include spatial effects from neighboring units at the higher level (districts). The random intercepts and conditional autoregressive models presented the best fit to the data. Variation at the higher level accounted for 16% of variance in the random intercepts model and 28% in the CAR model. The sign and magnitude of regression coefficients proved remarkably stable across model specifications. Multilevel and CAR models represented an important improvement in modeling housing price, despite most of the variation still occurring at the lower level, by improving the overall model fit and expanding the interpretation of model results. However, the CAR specification only represented a limited advance over the random intercepts formulation. Keywords Multilevel, Conditional autoregressive model, Housing prices, San Jos´e-Costa Rica 1Programa de Investigaci´on en Desarrollo Urbano Sostenible, Universidad de Costa Rica Corresponding author: Eduardo P´erez Molina, Universidad de Costa Rica Programa de Investigcio´on en Desarrollo Urbano Sostenible, Bo Los Profesores, Calle B, No. 13, Mercedes, Montes de Oca, 115103, Costa Rica. Email: eduardo.perezmolina@ucr.ac.cr Prepared using sagej.cls [Version: 2017/01/17 v1.20] ===== PAGE 9 (score 12, numeric-paren 0, table-words 3, var-words 4) ===== P´erez-Molina 9 Table 2. Model comparison criteria. GaLM MLRE CARM VPM Mean Deviance 9.363 · 101 −7.692 · 101 −5.542 · 101 9.045 Deviance std. error 2.002 · 10−2 8.721 · 10−2 7.37 · 10−1 1.140 · 10−1 pD 1.002 · 101 7.194 · 101 5.683 · 101 6.179 · 101 DIC 1.037 · 102 −4.987 1.415 7.083 · 101 Mean VPC – 1.664 · 10−1 2.838 · 10−1 9.127 · 10−2 VPC std. error – 1.827 · 10−4 2.745 · 10−4 2.832 · 10−4 The VPC estimate for the VPM model refers only to the district level variation (for comparison purposes); mean VPC for both levels in this model is 2.031 · 10−1 with a standard error of 2.145 · 10−4. 4, that formalizes the municipal level variance) were also modeled with hyperpriors τu equal to 1/σ2 u and τs equal to 1/σ2 s that follow uninformative Gamma distributions. Models were estimated using WinBUGS (Spiegelhalter et al. 2003), called through the R2BUGS package (Sturtz et al. 2005). Three chains of 400000 iterations each were simulated with the first 25000 iterations discarded as burn-in. The resulting chains were thinned by selecting one out of every 25 iterations to reduce autocorrelation problems. The final posterior samples consisted of three chains of 15000 simulated instances each. Convergence was evaluated through visual inspection of the MCMC trace plots for the model parameters, autocorrelation plots, and the Gelman and Rubin diagnostic (these plots are annexed in the supplemental material; for models with multilevel effects, six randomly selected parameters are reported as illustration, although all parameters were visually inspected for convergence and can be consulted in the full model output files available online, see supplemental material). Results Model Estimates The results for the estimated models are presented in tables 2 (model fit) and 3 (parameter means and 95% posterior intervals), and figure 2 (patterns for systematic variation at the higher level units). The DIC of the four models is shown in figure 2. Two models (MLRE and CARM) have substantially lower DIC values than the other two (GaLM and VPM). The two best models do not differ markedly: in terms of fit alone, the higher order CAR structure did not improve the model fit. Additionally, the two worst models (GaLM and VPM) in terms of DIC also are broadly similar, which suggests the spatial multilevel structure may to a large extent control for the spatial effects determined by the covariates. In table 2, the variance partitioning coefficient (VPC) is also reported. This is the fraction of variance ascribed to the higher (σ2 u, district) or lower (σ2 e) level units; specifically, the VPC is defined as the sum of σ2 u and σ2 e into the higher level variance, σ2 u. As can be seen in figure 2, the GaML model includes by construction all of the variance in the lower level, because of the absence of a σ2 u term. More interestingly, the Prepared using sagej.cls ===== PAGE 10 (score 24, numeric-paren 0, table-words 3, var-words 7) ===== 10 Journal Title XX(X) Table 3. Regression model results for natural logarithm of housing price per m2 of living area (mean, 2.5% and 97.5% percentiles). Mean 2.5% perc. 97.5% perc. Mean 2.5% perc. 97.5% perc. GaML MLRE β1 7.85 · 10−2 6.33 · 10−2 9.36 · 10−2 7.20 · 10−2 5.59 · 10−2 8.80 · 10−2 β2 6.13 · 10−1 4.26 · 10−1 8.01 · 10−1 5.06 · 10−1 2.64 · 10−1 7.56 · 10−1 β3 −1.13 · 10−1 −1.48 · 10−1 −7.79 · 10−2 −9.45 · 10−2 −1.42 · 10−1 −4.91 · 10−2 β4 −1.11 · 10−2 −2.07 · 10−2 −1.47 · 10−3 −1.20 · 10−2 −2.24 · 10−2 −1.65 · 10−3 β5 1.12 · 10−2 4.63 · 10−3 1.78 · 10−2 8.40 · 10−3 1.83 · 10−3 1.50 · 10−2 γ1 5.71 5.43 6.00 5.93 5.53 6.34 γ2 4.14 · 10−4 −3.36 · 10−3 4.19 · 10−3 −6.36 · 10−5 −6.42 · 10−3 6.41 · 10−3 γ3 1.88 · 10−2 9.34 · 10−3 2.83 · 10−2 2.03 · 10−2 4.06 · 10−3 3.67 · 10−2 γ4 −1.95 · 10−2 −3.46 · 10−2 −4.27 · 10−3 −2.59 · 10−2 −5.42 · 10−2 2.14 · 10−3 σ2 u – – – 1.11 · 10−2 6.25 · 10−3 1.76 · 10−2 σ2 e 6.31 · 10−2 5.83 · 10−2 6.81 · 10−2 5.51 · 10−2 5.07 · 10−2 5.98 · 10−2 CARM VPM β0 – – – 6.92 6.88 6.96 β1 6.96 · 10−2 5.38 · 10−2 8.54 · 10−2 – – – β2 3.83 · 10−1 1.18 · 10−1 6.47 · 10−1 – – – β3 −7.23 · 10−2 −1.25 · 10−1 −1.98 · 10−2 – – – β4 −1.13 · 10−2 −2.18 · 10−2 −7.23 · 10−4 – – – β5 8.06 · 10−3 1.60 · 10−3 1.45 · 10−2 – – – γ1 6.07 5.67 6.48 – – – γ2 8.59 · 10−4 −4.55 · 10−3 6.22 · 10−3 – – – γ3 1.08 · 10−2 −4.37 · 10−3 2.61 · 10−2 – – – γ4 −1.17 · 10−2 −3.49 · 10−2 1.14 · 10−2 – – – σ2 s – – – 8.438 · 10−3 2.163 · 10−3 1.837 · 10−2 σ2 u 2.28 · 10−2 1.11 · 10−2 4.03 · 10−2 6.798 · 10−3 1.863 · 10−3 1.430 · 10−2 σ2 e 5.60 · 10−2 5.16 · 10−2 6.08 · 10−2 5.899 · 10−2 5.427 · 10−2 6.410 · 10−2 variance of the random intercept models (with and without CAR) is relatively small but not unimportant, with a VPC for MLRE of 0.16 and a larger value of 0.28 for CARM (almost twice as much); if only the district levels are included, as in the VPM model, 0.09 of the total variance can be explained –a figure that doubles when considering also a second, higher level of municipalities. The VPC estimates are in general lower than the equivalents estimated by Bivand et al. (2017) when replicating models by Osland et al. (2016) (a VPC in the order of 0.58 for Stavanger, Norway, although with accessibility to the CBD being a higher level covariate) and Dong et al. (2015) (a VPC of 0.38 for Beijing), but the difference is reasonable and should be ascribed to the complexity of a polycentric region and to a very local effect of spatial dependence, likely present in San Jos´e and not incorporated into the models. Estimated coefficients for the four proposed models are shown in table 3. Overall, travel time to San Jos´e is the most important determinant (about an order of magnitude greater than other coefficients); the 95% posterior intervals of both β2 and β3 exclude 0.00 for all models and are consistent in their signs (positive for β2 and negative for β3, see table 3). Taken jointly, these two coefficients suggest the relation between housing price and accessibility to the CBD follows a concave curve: it rises near the CBD, where Prepared using sagej.cls ===== PAGE 11 (score 11, numeric-paren 0, table-words 1, var-words 9) ===== P´erez-Molina 11 the urban environment is physically deteriorated –particularly in the municipality of San Jos´e proper– and at some point, the slope changes downward, reflecting the Alonso- Mills-Muth model’s trade-off between accessibility and land rent. In general, determinants with variation at the lower level (βk) are more significant and larger in magnitude than variables with variation at the higher level (γp), as can be seen in table 3. For models GaLM, MLRE, and CARM, no βk coefficient has 0.00 within its 95% posterior interval whereas half the γp coefficients do –and the γk coefficients for the MLRE and CARM models, which are a better fit for the data, are as a rule not significant. However, it is important to note that accessibility, the most important set of determinants in the estimated models, presents variation at the lower (individual property) level. Thus, this result coincides with previous findings by Osland et al. (2016), who found socioeconomic variables to be relatively weak but accessibility to become stronger explanations of housing price variance when accounting for spatial dependency (albeit their accessibility measure was at the zonal, not individual level). A proper accounting of hierarchical structure (and spatial dependence) clarifies the role of theoretically key covariates, regardless of their level in the hierarchy. When comparing coefficients across model specifications, magnitudes remain remarkably stable with three important exceptions: travel time to CBD (β2 and β3), distance to nearest bus stop (β5), and number of jobs in the district (γ3). The first two determinants decrease in magnitude as more spatial effects are considered: they are, in absolute terms, largest for the GaLM model and smallest for the CARM model, with the coefficients of the MLRE model being intermediate. Number of jobs has larger coefficients for the GaLM and MLRE models, decreasing for the CARM model. This characteristic suggests accessibility was serving to control for certain urban patterns, particularly for socioeconomic self-sorting: it is very likely the best districts (higher level units) in terms of accessibility attract both firms (and jobs) and higher income households, which in turn would result in a more attractive spatial context. Finally, with regard to the VPM model, one should note σ2 s (municipal level variance) and σ2 u (district level variance) present similar values. The multilevel variance in the higher levels should be, therefore, apportioned between these two levels. An evident extension of the MLRE and CARM models will be to include municipal level random effects and covariates, although the main contribution of these is likely to explanation of the housing price rather than prediction, since most of this variations is already controlled for in the district level random effects (crucially, land use regulation is a municipal level covariate not currently included in the models). The estimated mean posterior of η for the MLRE and CARM models are shown in figure 2. In addition, the random effect deviations from the overall mean, at municipal and district level, of the VPM model are also included. The larger values are shown in dark red and the lower values, in dark blue, with intermediate values in white. Non- significant parameters (with 0.00 in the 95% posterior interval) are shown in yellow. Only districts and municipalities with data are represented in figure 2. The η represent the total systematic variation, caused by the higher level covariates and the random effect. Additionally, they represent the variation unexplained by the lower level determinants (which is to say, accessibility and house size). They are broadly Prepared using sagej.cls