# Effect of Built Environment Factors on Pedestrian Safety in Portuguese Urban Areas
## 3 Materials and Methods
### Model Development  
This study used two statistical modeling techniques to determine the effect of factors that contribute to the occurrence of pedestrian crashes in urban roads. The Zero-Truncated Negative Binomial regression model (ZTNB) is applied in situations where the analyst aims to apply a NB model, but does not take into account observations with the value zero for the dependent variable due to the sampling scheme employed [49; 50]. In the present research, the model fitted for aggregated data corresponded to this situation. The Generalized Estimating Equations (GEE) use the disaggregated (longitudinal) data and are appropriated for statistical analyses aiming to describe the average value of the dependent variable based on a set of independent variables by taking into account the correlation among their different values (in the present case, annual values). In addition, the main effects and interactions of independent, categorical, or continuous, variables are tested. Figure 4: The number of pedestrian crashes per road and year in Guimaraes. Several authors have described them in detail, including the different correlation structures that can be used with GEE [51; 52; 53]. The exchangeable correlation structure was used. The particular sampling scheme used (removing streets where zero counts were observed for each of the seven years) involves some loss of information but does not require an adaptation of the GEE modeling technique, since this method is not based on distributional assumptions regarding the random effects. The general form adopted in this paper for collision prediction models was the following, formulated here for the GEE case (Equation (1)):  
\[y_{mt}=Vped_{mt}^{\alpha}\times V_{mt}^{\gamma}\times EXP\left(\beta_{0}+\sum _{j=1}^{I}\beta_{j}X_{jmt}\right),\ m=1,\ldots,40,\ t=2009,\ldots,2015 \tag{1}\]  
\(\beta\)j, \(\gamma\in\mathbb{R},j=0,1,\ldots,J\)  
\(\alpha=1\) (Vped is an offset variable in the model)  
where:  
\(y_{mt}\)--Number of pedestrian crashes for street m within t time period;  
\(Vped_{mt}\)--Pedestrian traffic volume during the peak period in street m within t time period (this is treated as an offset in the model);  
\(V_{mt}\)--Variables associated with the exposure to traffic of pedestrians in street m within t time period (see variables regarding to the traffic characteristics presented in Table 2);  
\(EXP\)--Exponential function;  
\(X_{jmt}\)--Explanatory variable j observed in street m within t time period (see variables regarding to the built environment, pedestrian, and road infrastructure presented in Table 2);  
\(\gamma\), \(\beta\)j--Model parameters to be estimated; and  
\(J\)--Number of explanatory variables X. Transforming the Equation (1) to logarithmic function:  
\[\ln y_{mt}= \propto\ln Vped_{mt}+\gamma\times\ln V_{mt}+\beta_{0}+\sum_{j=1}^{I }\beta_{j}X_{jmt},\ m=1,\ldots,40,\ t=2009,\ldots,2015 \tag{2}\]  
The pedestrian traffic volume during the peak period (Vped) was introduced in the models as an \"offset variable\" to represent exposure to risk. Furthermore, three variables associated with the exposure of traffic to pedestrians (V) were used: (i) Vveh, vehicle traffic volume during the peak period, (ii) SPV, the sum of pedestrian and vehicular traffic volume during the peak period, and (iii) PVQ, the product between the pedestrian volume and the squared vehicular volume, used as the criterion for the installation of a pedestrian crossing in the UK that has been universally adopted. Natural logarithm was applied to the variables of vehicular and pedestrian traffic volumes due to the calibration procedure. The descriptive statistics of the continuous variables considered in this study are presented in Table 2.  
The variables were selected using the backward technique during the model calibration. The final model presents the explanatory variables that are statistically significant to a level of 10%.