## 5 Results and Discussion
### Crash Prediction Model  
To provide a safety performance function that is necessary for the EB method, a Negative Binomial (NB) model [55; 56] was employed. Firstly, we applied the correlation matrix (Figure 5) and Variance Inflation Factor (VIF) to identify highly correlated variables. Upon examining the correlations between variables, we observed that CW_OEM is highly correlated with both CW_ME8 and VMT. Given that CW_ME8 has a larger sample size and higher correlation coefficients with Crash_count, and considering that the sampling method of CW_OEM may be biased due to the data being gathered from one driver per road segment per hour, we decided to exclude CW_OEM from the model development. Another variable exhibiting high correlation coefficients is population, which is strongly correlated with Res_r and Mix_rc_r. Therefore, we opted to remove the population from subsequent steps. VMT and Highway index demonstrate a high correlation with one another. In consideration of the VIF results, where only the VIFs of VMT and Highway index exceed 2.5, we decided to exclude both variables to avoid multicollinearity issues. Based on the variable selection process, we utilized the preliminarily selected variables to construct an NB model. The StepAIC function in R was employed to identify the optimal variables for input. The StepAIC function removed the Comm_r variable, and apart from the insignificant variables including Subway_station and mix_rc_r, all other variables were \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Variable** & **Mean** & **S.D.** & **Median** & **Min** & **Max** \\ \hline Crash\_tot & 1.43 & 2.02 & 1 & 0 & 15 \\ CW\_ME8 & 30.87 & 38.30 & 19 & 0 & 504 \\ \hline CW\_OEM & 1.24 & 2.01 & 0 & 0 & 17 \\ Intersection & 0.93 & 1.40 & 1 & 0 & 18 \\ \hline Subway\_station & 0.026 & 0.17 & 0 & 0 & 2 \\ \hline Bus\_stop & 0.34 & 0.65 & 0 & 0 & 4 \\ \hline Road\_length (ft) & 407.97 & 176.82 & 355.22 & 3.64 & 1032.05 \\ \hline VMT (mi \(\times\) veh) & 1259 & 1869 & 723 & 0 & 15,777 \\ \hline Highway & 0.08 & 0.27 & 0 & 0 & 1 \\ \hline Res\_r & 15\% & 20\% & 5\% & 0\% & 98\% \\ \hline Comm\_r & 16\% & 23\% & 2\% & 0\% & 87\% \\ \hline Open\_r & 9\% & 26\% & 0\% & 0\% & 100\% \\ \hline Mix\_rc\_r & 14\% & 16\% & 8\% & 0\% & 91\% \\ \hline Population & 259 & 226 & 227 & 0 & 1367 \\ \hline \hline \end{tabular} Note: Crash\_tot is the total crash count in a grid, Res_r is the residential area rate in a grid, Comm_r is the commercial area rate in a grid, Open_r is the open area rate in a grid, Mix_rc_r is the mixed residential area and commercial area in a grid.  
\end{table} 
Table 1: Input variable summary. found to be significant in the NB model. The resulting best NB model is presented in Table 2.  
The marginal effect of near-misses, as represented by CW_ME8, is 0.0074. This implies that in our study area, the near-miss-to-crash rate is approximately 135:1. It is noteworthy that these near-miss data were sampled using Mobileye devices. To further refine the \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Estimate** & **Marginal Effects** & **Std. Error** & **z-Value** & **Pr(\(>|z|\))** \\ \hline Intercept & \(-0.88\) & & 0.09 & \(-9.389\) & 0.00 **aa** \\ CW\_ME8 & 0.01 & 0.0074 & 0.00 & 10.694 & 0.00 ** \\ Intersection & 0.12 & 0.1322 & 0.02 & 6.893 & 0.00 ** \\ Subway\_station & 0.20 & 0.2225 & 0.14 & 1.506 & 0.132 \\ Bus\_stop & 0.19 & 0.2062 & 0.04 & 4.878 & 0.00 ** \\ Road\_length & 0.01 & 0.0065 & 0.00 & 10.152 & 0.00 ** \\ Res\_r & \(-0.73\) & \(-0.8001\) & 0.17 & \(-4.419\) & 0.00 ** \\ Open\_r & \(-1.04\) & \(-1.1295\) & 0.16 & \(-6.358\) & 0.00 ** \\ Mix\_rc\_r & 0.28 & 0.3002 & 0.17 & 1.587 & 0.112 \\ \(\Psi^{\text{ b}}\) & 1.53 & & & & \\ Std. err & 0.12 & & & & \\ AIC & 6045.2 & & & & \\
2 \(\times\) log-likelihood & \(-6025.2\) & & & & \\ \hline \hline \end{tabular} Note: (*) ** denotes significance at the 5% level. (*) \(\overline{\
u}\) is the dispersion parameter for the fitted NB model.  
\end{table} 
Table 2: The estimated results of the best NB model.