Abstract

As the basis of traffic safety management, crash prediction models have long been a prominent focus in the field of freeway safety research. Studies usually take years or seasons as the observed time units, which may result in heterogeneity in crash frequency. To eliminate that heterogeneity, this study analyzes monthly crash counts and develops Bayesian hierarchical models with random effects, lag-1 autoregression (AR-1), and both (REAR-1) to accommodate the multilevel structure and temporal correlation in crash data. The candidate models are estimated and evaluated in the freeware WinBUGS using a crash dataset obtained from the Kaiyang Freeway in Guangdong Province, China. Significant temporal effects are found in the three models, and Deviance Information Criteria (DIC) results show that taking temporal correlation into account considerably improves the model fit compared with the Poisson model. The hierarchical models also avoid any misidentification of the factors with significant safety effects, because their variances are greater than in the Poisson model. The DIC value of the AR-1 model is substantially lower than that of the random effect model and equivalent to that of the REAR-1 model, which indicates the superiority of the lag-1 autoregressive structure in accounting for the temporal effects in crash frequency.

1. Introduction

The freeway has become a primary method of long-distance passenger and cargo transportation due to its high capacity and potential for high speed. The traffic on freeways consists of more motor vehicle types than urban traffic and includes passenger cars, coaches, vans, and light/medium/heavy trucks. This diversity in freeway traffic composition may result in numerous vehicle interactions, and the high speeds result in shorter driver response times when encountering emergencies. Freeways in mountainous areas may also suffer from poor geometrical design and adverse weather conditions [1, 2], which increase the crash risk. Developing a crash prediction model (or safety performance function) that provides a good understanding of the crash occurrence mechanism on a freeway is thus vital [1] when ranking sites for safety improvement and for accurately evaluating the effectiveness of countermeasures.

In the absence of detailed driving information (e.g., acceleration, braking, and steering), most studies have analyzed the relationship between the risk factors and crash frequency [3]. The most common analytical methods are statistical count models, which explicitly illustrate the random, discrete, and nonnegative nature of crash frequency data and the safety effects of the main contributing factors [4]. Poisson regression is the basic model for crash prediction, in which crash count is assumed to follow a Poisson distribution that requires the mean to be equal to the variance [5]. To account for important issues related to crash data such as overdispersion, underdispersion, excess zero observations, spatiotemporal correlation, multilevel structures, and unobserved heterogeneity, a great many Poisson model variations have been proposed, which significantly improve model fit and predictive performance [3, 6]. With more recent advances in crash prediction modeling, Bayesian inference has been extensively applied to traffic safety analysis because of its ability to deal with complex models (often without closed-form likelihood functions) such as the hierarchical model [1, 2], spatiotemporal model [7, 8], random parameters model [9], and multivariate model [10] and through these [8]. The freeware WinBUGS provides a user-friendly platform for making Bayesian inferences using Markov chain Monte Carlo (MCMC) techniques. The integrated nested Laplace approximation (INLA) approach has additionally been developed as a computationally efficient alternative to the MCMC methods, and an R package (R-INLA) is available to easily apply the approach [11].

Consideration of multiple levels is extremely important in freeway safety analysis because panel data are used for crash modeling [12]. Bayesian hierarchical models are thus the most widely used methods in freeway safety. However, freeway crash frequencies have previously been aggregated by year or season, which may result in information loss in time-varying explanatory variables. To avoid this phenomenon, crash data should be aggregated into small time intervals (e.g., months). This manipulation results in the same freeway section generating multiple observations, which may be correlated over time because of their shared effects of unobserved or unobservable time-dependent factors. Washington et al. [13] pointed out that ignoring temporal correlation will lead to an underestimation of the parameters’ variances and thus potentially lead to the incorrect identification of the contributing factors, which has significant consequences for safety.

The widely used hierarchical Poisson model (also called the random effect model) is able to accommodate temporal correlation to some extent, but the added residual term is unstructured, which may not fully account for the temporal correlation. In addition to the random effect model, a variety of methodological approaches have been proposed to assess temporal effects in crash frequency data. These include generalized estimating equations with independent, exchangeable, autoregressive, or unstructured temporal terms [14, 15], a Bayesian hierarchical Poisson with a lag-1 autoregression (AR-1) model [7], an autoregressive integrated moving average model [16], an integer-valued autoregressive Poisson model [17], a latent variable representation of count data models with autoregressive temporal terms [18], and a multinomial generalized Poisson model with temporal dependence [19]. Of these approaches, the Bayesian hierarchical Poisson AR-1 model with the simplest formula is able to account for a multilevel structure and temporal correlation simultaneously. In both the generalized estimation equation and the hierarchical Poisson regression modeling frameworks, the autoregressive terms have been found to significantly outperform unstructured terms in model fit [7, 15].

In this study, the key objective is to develop a hierarchical temporal model to analyze freeway crash frequency aggregated by month, which accommodates a multilevel structure in panel crash data and temporal correlation across observations at the same site. Bayesian hierarchical Poisson and hierarchical Poisson AR-1 models are the two candidate methods. An approach integrating the two methods is also proposed, to simultaneously account for the structured and unstructured temporal effects. A Poisson model is used as a benchmark to demonstrate these temporal models, and they are calibrated and compared in the Bayesian context using a year’s worth of crash data from the Kaiyang Freeway in China.

The remainder of this paper is as follows. In the next section, the alternative models and a model comparison criterion are specified. Section 3 describes the collected data for model demonstration. Detailed estimations of the models are introduced in Section 4, and the results of model comparison and parameter estimation are discussed. Section 5 concludes and presents directions for future research.

2. Methodology

In this section, the structure of the Poisson model is formulated. The formulations of the three Bayesian hierarchical models for predicting crash frequency with temporal correlation are then specified in order of complexity. Finally, the Deviance Information Criteria (DIC) is introduced for the purpose of model comparison.

2.1. Model Specification
2.1.1. Poisson Model

In the Poisson model, the crash occurrence is assumed to be a Poisson process. That is, the crash count on freeway segment during month is assumed to follow a Poisson distribution [5]:where and are the number of observed sites and periods, respectively, and is the underlying Poisson mean of . Conceptually, the expected crash count is modeled as the product of crash exposure and crash risk [8]:

Crash exposure is defined as the number of opportunities for crashes in a given time in a given area. The crash exposure of a roadway segment is generally associated with its length and the traffic volume. Forms proposed in previous studies include annual average daily traffic [20] and vehicle miles traveled [1]. In the current research, the observational time unit is month. As the numbers of days in certain months differ, the monthly total traffic (MTT) is used as a crash exposure variable to specify the traffic volume precisely. The freeway crash exposure is formulated by the product of a power of MTT and of segment length, which reveal the potential nonlinear relationship between crash frequency and traffic volume [8]:in which is the length of freeway segment and is its MTT during month . The two parameters to be estimated are and .

A generalized linear function is assumed between the crash risk and the observed risk factors : where are the coefficients corresponding to the risk factors.

2.1.2. Random Effect Model

The monthly crash counts may be affected by unobserved or unobservable factors related to the freeway section, resulting in site-specific effects [1]. The shared site-specific effects of the crash counts on the same freeway section during different months are referred to as unstructured temporal effects [3]. To account for the site-specific/unstructured temporal effects in the random effect model, a residual term is added to the generalized linear function for modeling crash risk:where is assumed to follow a normal distribution with mean 0 and standard deviation :

2.1.3. Autoregression-1 (AR-1) Model

The AR-1 model accounts for the temporal correlation among crash frequencies during successive months by specifying a residual term with lag-1 dependence [7], where lag-1 means that the temporal effect on a specific freeway section during a month is affected by its counterpart during the previous month:where the temporal terms are assumed to follow the normal distributions, which are based on the stationarity assumption [21]In the above two equations, is the autocorrelation coefficient and is the standard deviation of the temporal terms.

2.1.4. Random Effect with Autoregression-1 (REAR-1) Model

As mentioned above, the random effect and AR-1 models account for unstructured and structured temporal effects, respectively. To combine the strengths of the two models, both the unstructured and structured residual terms, and , are added to the crash risk modeling function, resulting in the REAR-1 model:

2.2. Model Comparison

The DIC is commonly used for measuring the goodness-of-fit of the models inferred by the Bayesian method [7, 8, 22]. As in previous research, it is used here to compare the above formulated models. The DIC is intended to be a Bayesian generalization of Akaike’s Information Criteria that penalizes models with more parameters. Specifically, it provides a Bayesian measure of model complexity and fitting and is given by [23]where is the posterior mean deviance that can be taken as a Bayesian measure of fitting and is a complexity measure for the effective number of parameters. Generally, models with lower DIC values are preferable. However, any critical difference in DIC is very difficult to determine. According to Spiegelhalter et al. [24], roughly over 10 differences may rule out the model with the higher DIC; differences between 5 and 10 are considered substantial; and if the DIC difference is less than 5 and the parameter estimation results are significantly different then it could be misleading to simply report the model with the lowest DIC.

3. Data Preparation and Preliminary Analysis

To calibrate the candidate models and compare their performances on model fit, the crash, traffic, and roadway data on Kaiyang Freeway in Guangdong Province, China, in 2014 were collected. Kaiyang Freeway has four lanes and a median barrier. Its total length is about 125 km and the posted speed limit is 120 km/h. The disaggregated crash data are obtained from the Highway Maintenance and Administration Management Platform of the Guangdong Transportation Group. The traffic data are acquired from the Guangdong Freeway Networked Toll System, and the roadway data are extracted from the Horizontal and Longitudinal Profile, designed by Guangdong Province Communication Planning and Design Institute Co., Ltd.

The first and essential step in data preparation is roadway segmentation. With reference to the previous studies on freeway traffic analysis [1], the major criterion used for segmenting the freeway is homogeneity in roadway horizontal and vertical alignments. In addition, the minimum length of each segment is set to 150 m, to eliminate the low exposure issue and the high statistical uncertainty of the crash risk on short segments. Segments shorter than 150 m are combined with proximal segments that have similar roadway features where possible. According to the two segmentation criteria, Kaiyang Freeway is divided into 154 segments ().

Crashes are mapped to these segments, based on their locations along the freeway recorded in the collected crash data. The crash counts are aggregated by segment and month (). In the Networked Toll System, vehicles are classified into five categories, according to their head height, axis number, wheel number, and wheelbase. The classification criteria are listed in Table 1. The initial traffic volumes in the system are recorded for each vehicle category. For freeway segment and month , the weighted average traffic is calculated by using the weights 1, 1.5, 2, 3, and 3.5 for vehicle categories , respectively:where , , , , and are the traffic volumes for vehicle categories , respectively, on freeway segment during month . The traffic composition, that is, the percentages of each vehicle category , , , , and , is calculated as

Table 2 illustrates the definitions and descriptive statistics of the variables used in the model development. Correlation tests and multicollinearity diagnoses for the risk factors are conducted. Table 3 shows the results of Pearson correlation tests. From the results, we find that the two variable pairs, and and and , are significantly correlated with coefficients over 0.6 or below −0.6. To avoid the adverse effect of significant correlation is excluded from the models. The results of the diagnoses indicate that there is no significant collinearity in the other factors.

4. Model Estimation and Result Analysis

4.1. Model Estimation

All candidate models are programmed, estimated, and evaluated in WinBUGS, where Bayesian inference can be easily implemented. In the absence of sufficient prior knowledge, noninformative priors are specified for the parameters and the hyperparameters. Specifically, a diffused normal distribution is used for the priors of , , , and each element of , and a diffused gamma distribution is used for the priors of precisions of the normal distributions, and . For each model, a chain of 500,000 iterations of the MCMC simulation are made, with the first 4,000 acting as burn-ins. The Gelman-Rubin statistics available in WinBUGS are used to evaluate the MCMC convergence.

4.2. Result Analysis

The results of the model estimation and comparison are summarized in Table 4. The hyperparameters (, , and ) in the three Bayesian hierarchical models (i.e., random effect, AR-1, and REAR-1), which measure the magnitudes of temporal effects, are all statistically significant with at least 90% of their Bayesian credible intervals away from zero. These results indicate that the monthly crash counts on the freeway sections are significantly correlated. The values of DIC also demonstrate that these hierarchical regressions substantially outperform the Poisson regression on model fit, demonstrating that accommodating temporal effects could considerably improve model fit [25]. Temporal correlation can pool strength from neighboring periods for parameter estimation and be a surrogate for unknown and time-dependent covariates, thereby reducing model misspecification [26]. After accounting for temporal effects, the standard deviations of the explanatory variables’ coefficients increase, as expected, which eliminates the misidentification issue on factors contributing to crash frequency [13]. A representative example in this empirical analysis is curvature. The estimates of its effect are significant at a 90% credible level in the Poisson model, while being insignificant (less than 80% credible) in the hierarchical models.

Although the temporal correlation is found to be significant in the random effect model and the AR-1 model, the value of the AR-1 model (=2682) is much smaller than that of the random effect model (=2790), suggesting that the AR-1 model fits the freeway crash data much better than the random effect model. While there are more effective parameters (as reflected by ) in the AR-1 model, which increase the complexity, its lower DIC indicates that it outperforms the random effect model substantially. As previously stated, the temporal correlation is mainly derived from the effects of unobserved or unobservable time-dependent factors. For the collected crash data, environmental factors (e.g., precipitation and temperature) may contribute to the temporal effects. For example, precipitation, which has been found to increase crash frequency [27], varies by month on this freeway according to the Guangdong meteorological statistics. With the lag-1 autoregressive terms, the AR-1 model can approximate the varied and serially correlated effects of the unobserved factors more effectively than the random effect model, which assumes that different months share the same temporal effects. The result is in line with previous findings showing that the lag-1 autoregressive structure is a very good form for accounting for serial correlation in crash data [7, 15].

The superiority of the AR-1 model can be further confirmed by its equivalent and DIC values to the REAR-1 model, which simultaneously accounts for unstructured and structured temporal correlation. Specifically, the equivalent model fit performance reveals that the unstructured residual terms do not account for the possible temporal effects omitted by the lag-1 autoregression or that the AR-1 model may have fully accommodated the temporal dependence. Nonetheless, the estimates of the structured temporal terms’ standard deviation are almost equal (mean = 0.37; standard deviation = 0.13/0.14) in these two models, while the autocorrelation coefficient decreases dramatically from 0.72 (standard deviation = 0.14) in the AR-1 model to 0.46 (standard deviation = 0.23) in the REAR-1 model. Although the numbers of effective parameters are the same in the two models, in theory the formulation of the AR-1 model is less complex than that of the REAR-1 model. The AR-1 model also consumes less time than the REAR-1 model in Bayesian parameter estimation processes. Therefore, it is reasonable to conclude that the AR-1 model is to an extent superior to the REAR-1 model.

To comprehensively justify the model validity, the results for explanatory factors that have statistically significant effects on crash frequency are also discussed in this section. Overall, the plus or minus signs of the parameters in all four models are generally consistent. They conform to engineering intuition and to the findings in the literature, but the magnitude of the parameters in the Bayesian hierarchical models is more consistent and has substantial differences from those in the Poisson model, indicating the effects of taking temporal correlation into consideration.

Specifically, in all of the crash prediction models the length variable is consistently significant at a 95% credible level, with positive coefficients. The value of 1.0 is within 95% Bayesian credible intervals. That is, the coefficients are not significantly different from 1.0, which confirms that the monthly crash counts may be linearly associated with the freeway-section length. A linear relationship between crash frequency and segment length has been found in numerous functional class roadways, ranging from urban major and minor arterials [8] and rural minor arterials and major collectors [28] to rural frontage roads [29].

Unsurprisingly, the coefficients of the MTT variable are positive in all four models, because a higher traffic volume brings about more crash exposure [8]. However, its credible level varies from 95% in the Poisson model to 90% in the AR-1 and REAR-1 models and 80% in the random effect model. The coefficients with their 95% Bayesian credible intervals away from 1.0 are substantially different from 1.0, suggesting that the relationship between crash frequency and traffic volume is nonlinear. This is congruent with the model assumption and the findings of numerous studies [8, 30].

With respect to traffic composition, only the percentage of Category vehicles is shown to have a significant effect on crash frequency (at a 90% credible level in the Poisson, AR-1, and REAR-1 models and at an 80% credible level in the random effect model). The negative coefficients indicate that increasing the percentages of Category vehicles would decrease the crash risk. Several factors may account for this: drivers of large buses/trucks/trailers (Category vehicles) generally hold a higher level of driving license and have better driving skills than passenger car (Category vehicles) drivers; large buses and trucks are usually owned by professional transport companies and their daily traveling routes are relatively constant, so the drivers tend to be more familiar with the freeway conditions and are more experienced in handling emergencies; and the Ministry of Transport in China has recently issued a series of policies and laws aimed at regulating bus and truck driving behavior, which may reduce the occurrence of crashes related to these vehicle types.

The significantly positive (at least a 90% credibility level) coefficients for segment gradient in all four models suggest that steeper slopes experience more crashes. The result is in line with previous findings and empirical engineering judgments: higher vertical grades reduce stopping sight distance, thus increasing the crash risk [27]. As safety considerations are vital in freeway vertical design, all design manuals recommend avoiding or minimizing the use of steep slopes [1].

5. Conclusions and Future Research

This study develops three Bayesian hierarchical models for predicting monthly crash counts on freeway segments, which simultaneously account for hierarchical structure and temporal correlation in crash data using unstructured terms, lag-1 autoregressive terms, and a combination of both. The models are estimated and evaluated by Bayesian methods via programming in the freeware WinBUGS. The crash data used for model calibration and comparison are collected from Kaiyang Freeway in Guangdong Province, China, in 2014.

The inference results show that both the unstructured and AR-1 temporal terms are significant with at least 90% Bayesian credible intervals away from 0, which indicates that the monthly crash counts at a certain freeway section are correlated. The results of DIC reveal that the Bayesian hierarchical models have substantially better fit than the Poisson model, suggesting that temporal correlation is able to improve the model specification and parameter estimation, thereby improving the goodness-of-fit. The underestimation phenomenon of parameter variance caused by ignoring temporal correlation is also observed in the parameter estimation results. Of the Bayesian hierarchical models, the AR-1 model is found to outperform the random effect model, which demonstrates that the structured AR-1 terms fit the temporal effects better than the unstructured terms. Its merit is further confirmed by the equivalent DIC values of the AR-1 and REAR-1 models. The covariate estimates show that crash frequency may be linearly associated with segment length while being nonlinearly associated with traffic volume. Increasing the percentages of large buses/trucks/trailers and decreasing the segment gradient would significantly reduce crash occurrence on the freeway.

In summary, the empirical analysis demonstrates the significance of temporal correlation in the monthly freeway crash counts and the considerable advantage of the Bayesian hierarchical AR-1 model for analyzing the crash frequency with temporal correlation. However, if over one year of monthly crash data are collected, seasonal effects may exist across the crash counts in the same months of different years. More complicated models are expected to accommodate the autoregressive and seasonal effects simultaneously. Further research efforts could also be devoted to extending the univariate model to its multivariate form, to simultaneously predict crash frequency in specific categories (e.g., injury severity, crash type, or the number of vehicles involved), and applying this to identifying sites that could potentially benefit from engineering improvements in freeway safety management.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This research was jointly supported by the Natural Science Foundation of China (nos. 51378222 and 51578247), China Postdoctoral Science Foundation (no. 2017M610529), the Natural Science Foundation of Guangdong Province (no. 2017BQ026), and the Fundamental Research Funds for the Central Universities (no. 2017BQ026). The authors would like to sincerely thank Professor S. C. Wong at the University of Hong Kong for proofreading this paper.