## 2 Literature Review
The new model, henceforth referred to as the 'FRA's 2020 Accident Prediction (AP) model, addresses various weaknesses in the 1986 AP model [2]. Below is the two-part FRA's 2020 Accident Prediction (AP) model, with the first part as a count model and second part as a zero-inflated model. Before considering the possibility of excess zeroes, the count model is for predicted crashes [3]. The zero-inflation model distinguishes amongst two types of HRGCs with zero crashes reported in any period: those that are safe and will always have zero crashes and those that may have one of more crashes in the future. The total number of trains is the explanatory variable for the zero-inflated model; fewer trains at an HRGC gives greater probability of excess zeros. \[ \begin{array}{c}\beta_{0}+\beta_{1}*IExpo+\beta_{2}*D_{2}+\beta_{3}*D_{3}+ \beta_{4}*RurLtrb+\beta_{5}*XsurfID2s\\ +\beta_{6}*IADT+\beta_{7}*IMaxTnSpeed\end{array}  \tag{1}\]  
\[ \begin{array}{c}P_{Inflated\ Zero}=\frac{z}{1+z}\end{array}  \tag{2}\]  
\[ \begin{array}{c}z=e^{[\gamma_{0}+\gamma_{1}*ITotalTrains]}\end{array}  \tag{3}\]  
\[ \begin{array}{c}N_{Predicted}=N_{Count\ Predicted}*\left(1-P_{Inflated\ Zero}\right)\end{array}  \tag{4}\]  
where \(N_{Count\ Predicted}\) represents the predicted crashes of the count model; data for the left-hand side of regression are HRGCs crash counts in a 5-year period (2014-2018). \(P_{Inflated\ Zero}\) is the probability that the grade crossing is an \"excess zero\", \(N_{Predicted}\) are predicted crashes after accounting for excess zeroes, \(\beta_{0}\), \(\beta_{1}\dots,\beta_{7}\) and \(\gamma_{0}\), \(\gamma_{1}\) are the estimated parameters' coefficients of the two-part Zero-inflated Negative Binomial (ZINB) model, \(z\) indicates the logit model to explain the zero-inflated component, the \(IExpo\) is the natural log-transformed exposure, equal to average annual daily traffic times and daily trains, and \(D_{2}\) and \(D_{3}\) are the indicator variables for warning-device-type lights and gates. \(RurLtrb\) shows rural or urban classification of the crossing road, \(XsurfID2s\) shows the type of surface used (timber, asphalt concrete, rubber or their combination), \(IMaxTnSpeed\) indicates natural log-transformed maximum timetable speed (integer value between 0 and 99), \(IAADT\) shows natural log-transformed average annual daily traffic, and \(ITotalTrains\) shows natural log-transformed total number of daily trains. The FRA public HRGCs database is the basis for most of the HRGCs crash safety research in the US [1,3]. However, this database contains dated data (e.g., AADT values from the 1970's), errors, and missing values [2,19]. Several studies have examined the physical aspects of HRGCs to understand the causes of crashes. However, these studies did not emphasize the accuracy of the data utilized for crash prediction modeling [20, 21, 22, 23, 24]; inaccuracies can impact crash model estimations and subsequent crash predictions, which are critical for public safety. This necessitates a study based on accurate and up-to-date inventory to identify factors associated with HRGCs crashes, thereby allowing for better understanding of crash occurrence and more informed decisions on HRGCs safety.