# Spatial Modeling and Analysis of the Determinants of Property Crime in Portugal
## 3 Data and Methods
### Poisson-Based Regression Models  
Geographically Weighted Poisson Regression (GWPR) models have been used in several studies on the geography of crime [43; 51; 65]. The GWPR extends the geographically weighted regression model with the Poisson distribution, as proposed by [PERSON] et al. [66]. The GWPR models were used to investigate the spatial relationship between property crimes and socioeconomic and demographic variables in mainland Portugal. Additionally, the semi-parametric GWPR (S-GWPR) model was investigated. While the GWPR model is a local spatial model with varying coefficients for all independent variables, the S-GWPR includes both global and local independent variables. Let \(Y_{i}\) be the number of property crimes in the municipality (\(i=1,\ 2,\ \ldots,\ 278\)), and let \(X_{ij}\) be the \(j\)-th independent variable (\(j=1,\ 2,\ \ldots,\ k\leq 9\)) in the municipality \(i\). Poisson regression assumes that \(Y\) follows a Poisson distribution with mean given by \(E[Y]=\lambda\). The property crime rate in the municipality is represented by \(Y/POP\), where \(POP\) is the number of inhabitants of the municipality, and its mean value is \(E[Y/POP]=\lambda/POP\). The Poisson regression model for property crime rate is [66]:  
\[ln\ (\lambda_{i}/POP_{i})=\beta_{0}+\beta_{1}X_{1,i}+\beta_{2}X_{2,j}+\ldots+ \beta_{k}X_{k,i} \tag{1}\]  
where \(ln\ (\lambda_{i}/POP_{i})\) denotes the natural logarithm of the expected value of the property crime rate in the municipality \(i\), \(X_{j}\) is the \(j\)-th explanatory variable, and \(\beta_{j}\ (j=0,\ldots,\ k)\) are parameters to be estimated using the maximum likelihood method. This equation can be rewritten in an equivalent way as:  
\[ln\ (\lambda_{i})=ln\ (POP_{i})+\beta_{0}+\beta_{1}X_{1,i}+\beta_{2}X_{2,j}+ \ldots+\beta_{k}X_{k,i} \tag{2}\]  
The expected value of the number of property crimes in municipality \(i\) is given by:  
\[\lambda_{i}=exp\ (ln\ (POP_{i})+\beta_{0}+\beta_{1}X_{1,i}+\beta_{2}X_{2,i}+ \ldots+\beta_{k}X_{k,i}) \tag{3}\]  
Simplifying the previous formula, we obtain the global Poisson regression model for the number of property crimes, where \(POP_{i}\) is usually named the offset variable:  
\[\lambda_{i}=POP_{i}\times exp\ (\beta_{0}+\beta_{1}X_{1,i}+\beta_{2}X_{2,i}+ \ldots+\beta_{k}X_{k,i}) \tag{4}\]  
The spatial coordinates of point \(i\) are integrated into the general equation of the GWR model, thus allowing the relationships between independent and dependent variables to vary by location [42]. All independent variables have a local scope in GWR models because they are associated with parameters that depend on the location of municipality \(i\), for which the equation will be estimated, using the observations of the neighboring municipalities. The GWPR model for the number of property crimes corresponds to an adaptation of the global model formulated in Equation (4):  
\[\lambda_{i}=POP_{i}\times exp(\beta_{0}(u_{i},v_{i})+\beta_{1}(u_{i},v_{i})X_{1,i }+\beta_{2}(u_{i},v_{i})X_{2,i}+\ldots+\beta_{k}(u_{i},v_{i})X_{k,i}) \tag{5}\]  
where \((u_{i},v_{i})\) are the spatial coordinates of the centroid of municipality \(i\), and \(\{\beta_{0}(u,v),\ldots,\beta_{k}(u,v)\}\) are continuous functions of the location \((u,v)\). Some of the independent variables may be spatially stationary; thus, their influence may always be the same whatever the municipality \(i\) for which Equation (5) is being estimated. This concept was formalized in the semi-parametric GWPR model, proposed by [PERSON] et al. [67], which is an extension of Equation (5). This model allows for the inclusion of variables that may have a global explanatory effect (such as global models) and others whose explanatory power varies locally. The semi-parametric GWPR (S-GWPR) model is then given by:  
\[\lambda_{i}=POP_{i}\times exp\left(\sum_{k}\beta_{k}(u_{i},v_{i})X_{i,k}+\sum _{g}\beta_{g}X_{i,g}\right) \tag{6}\]  
where it is assumed that the parameter associated with the \(g\)-th independent variable \(X_{g}\) does not depend on the location of municipality \(i\).