## 5 Methods
### Goodness-of-Fit Measures  
In order to optimize the calibration process and ensure the reliability and representativeness of the model, a number of parameters for estimating the Goodness-of-Fit (GOF) were evaluated (as suggested by the literature [47]). The following parameters were considered:  
* Coefficient of Variation (\(CV\));
* Mean Absolute Deviation (\(MAD\));
* Dispersion parameter (\(k\));
* % CURE deviation (% \(CURE\)_dev_).  
Therefore, starting from the full dataset available, different selection criteria were applied to filter the input data for calibration and to improve the GOF. Notably, to enhance the calibration process, reference was only made to the KAB severity level, which showed the best results, as illustrated in Section 5.5. Furthermore, for the intersections, the calibration was optimized only for the 3 ST type, as it had a sufficient number of data. The following scenarios were considered:  
* Case 1.RS: all available data for roadway segments were taken into account;
* Case 2.RS: from all available data, only segments with \(CMF_{rs}<10\) and a length greater than 0.014 miles were considered;
* Case 3.RS: from all available data, only segments with \(CMF_{rs}<10\) and a length greater than 0.020 miles were considered;
* Case 4.RS: from all available data, only segments with \(CMF_{rs}<10\) and a length greater than 0.023 miles were considered.
* Intersections:  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Facility Type**} & \multirow{2}{*}{
\begin{tabular}{c} **Severity** \\ **Level** \\ \end{tabular} } & \(N_{pred,\ n.c.}\) & \(N_{obs}\) & \multirow{2}{*}{\(C_{X}\)} \\  & & **[crashes/year]** & & & \\ \hline \multirow{3}{*}{**Segments *} & All & 110.97 & & 0.16 \\  & KABC & 41.52 & 17.56 & 0.42 \\  & KAB & 21.57 & & 0.81 \\ \hline \multirow{3}{*}{**Intersections *} & **3 ST** & KAB & 4.98 & 6.22 & 1.25 \\  & **4 ST** & KAB & 0.11 & 0.22 & 2.00 \\  & **45G** & KAB & 0.34 & 0.56 & 1.63 \\ \hline \hline \end{tabular}
* 278 homogeneous segments and 36 intersections (32 \(\times\) 3 ST, 1 \(\times\) 4 ST, 3 \(\times\) 4 SG).  
\end{table}
Table 7: Calibration factor for different SPFs (severity levels).  
Case 1.I: all available data for 3 ST intersections were taken into account;  
Case 2.I: all available data for 3 ST intersections except one intersection (which showed a large discrepancy between the predicted and observed number of crashes) were included.  
The targeted exclusion of specific elements that show an unusual trend makes it possible to improve the GOF. In fact, the results (Table 8) show that filtering the input data reduces the GOF estimation parameters. In particular, the aim is to reduce the %CURE deviation to values below 5%, as suggested in the literature [47]. To this purpose, it is necessary to remove some very short segments where the observed number of accidents is zero against a predicted number of accidents greater than zero. Finally, after the calibration optimization, Case 4.RS was considered for segments and Case 2.I for intersections. Thus, the calibration factor was 0.79 and 1.12 for segments and intersections, respectively. This will allow the model to be employed to simulate future scenarios to assess the effectiveness of specific intervention measures. Consequently, the level of confidence associated with the simulated future scenarios depended on the GOF parameters obtained from the selected calibration cases.