# Bayesian Hierarchical Modeling Monthly Crash Counts on Freeway Segments with Temporal Correlation

Authors: Qiang Zeng; Jiaren Sun; Huiying Wen
Journal: Journal of Advanced Transportation
 (2017)

---

## 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.


---

## Body

## 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. Section3 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 countYi,t on freeway segment i during month t is assumed to follow a Poisson distribution [5]:(1)PYi,t=k=λi,tkk!exp⁡-λi,t,k=0,1,2,…,i=1,2,…,N,t=1,2,…,T,where N and T are the number of observed sites and periods, respectively, and λi,t is the underlying Poisson mean of Yi,t. Conceptually, the expected crash count λi,t is modeled as the product of crash exposure ei,t and crash risk μi,t [8]:(2)λi,t=ei,tμi,t.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]:(3)ei,t=MTTi,tα1Lengthiα2,in which Lengthi is the length of freeway segment i and MTTi,t is its MTT during month t. The two parameters to be estimated are α1 and α2.A generalized linear function is assumed between the crash riskμi,t and the observed risk factors Xi,t: (4)log⁡μi,t=Xi,t′β,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 θi is added to the generalized linear function for modeling crash risk:(5)log⁡μi,t=Xi,t′β+θi,where θi is assumed to follow a normal distribution with mean 0 and standard deviation σ(σ>0):(6)θi~normal0,σ2.


#### 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δi,t 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:(7)log⁡μi,t=Xi,t′β+δi,t,where the temporal terms δi,t(t=1,2,…,T) are assumed to follow the normal distributions, which are based on the stationarity assumption [21](8)δi,1~normal0,σδ21-γ2,(9)δi,t~normalγδi,t-1,σδ2,fort>1.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,θi and δi,t, are added to the crash risk modeling function, resulting in the REAR-1 model:(10)log⁡μi,t=Xi,t′β+θi+δi,t.


### 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](11)DIC=Dθ¯+pD,where Dθ¯ is the posterior mean deviance that can be taken as a Bayesian measure of fitting and pD 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.


## 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 countYi,t on freeway segment i during month t is assumed to follow a Poisson distribution [5]:(1)PYi,t=k=λi,tkk!exp⁡-λi,t,k=0,1,2,…,i=1,2,…,N,t=1,2,…,T,where N and T are the number of observed sites and periods, respectively, and λi,t is the underlying Poisson mean of Yi,t. Conceptually, the expected crash count λi,t is modeled as the product of crash exposure ei,t and crash risk μi,t [8]:(2)λi,t=ei,tμi,t.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]:(3)ei,t=MTTi,tα1Lengthiα2,in which Lengthi is the length of freeway segment i and MTTi,t is its MTT during month t. The two parameters to be estimated are α1 and α2.A generalized linear function is assumed between the crash riskμi,t and the observed risk factors Xi,t: (4)log⁡μi,t=Xi,t′β,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 θi is added to the generalized linear function for modeling crash risk:(5)log⁡μi,t=Xi,t′β+θi,where θi is assumed to follow a normal distribution with mean 0 and standard deviation σ(σ>0):(6)θi~normal0,σ2.


### 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δi,t 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:(7)log⁡μi,t=Xi,t′β+δi,t,where the temporal terms δi,t(t=1,2,…,T) are assumed to follow the normal distributions, which are based on the stationarity assumption [21](8)δi,1~normal0,σδ21-γ2,(9)δi,t~normalγδi,t-1,σδ2,fort>1.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,θi and δi,t, are added to the crash risk modeling function, resulting in the REAR-1 model:(10)log⁡μi,t=Xi,t′β+θi+δi,t.


## 2.1.1. Poisson Model

In the Poisson model, the crash occurrence is assumed to be a Poisson process. That is, the crash countYi,t on freeway segment i during month t is assumed to follow a Poisson distribution [5]:(1)PYi,t=k=λi,tkk!exp⁡-λi,t,k=0,1,2,…,i=1,2,…,N,t=1,2,…,T,where N and T are the number of observed sites and periods, respectively, and λi,t is the underlying Poisson mean of Yi,t. Conceptually, the expected crash count λi,t is modeled as the product of crash exposure ei,t and crash risk μi,t [8]:(2)λi,t=ei,tμi,t.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]:(3)ei,t=MTTi,tα1Lengthiα2,in which Lengthi is the length of freeway segment i and MTTi,t is its MTT during month t. The two parameters to be estimated are α1 and α2.A generalized linear function is assumed between the crash riskμi,t and the observed risk factors Xi,t: (4)log⁡μi,t=Xi,t′β,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 θi is added to the generalized linear function for modeling crash risk:(5)log⁡μi,t=Xi,t′β+θi,where θi is assumed to follow a normal distribution with mean 0 and standard deviation σ(σ>0):(6)θi~normal0,σ2.


## 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δi,t 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:(7)log⁡μi,t=Xi,t′β+δi,t,where the temporal terms δi,t(t=1,2,…,T) are assumed to follow the normal distributions, which are based on the stationarity assumption [21](8)δi,1~normal0,σδ21-γ2,(9)δi,t~normalγδi,t-1,σδ2,fort>1.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,θi and δi,t, are added to the crash risk modeling function, resulting in the REAR-1 model:(10)log⁡μi,t=Xi,t′β+θi+δi,t.


## 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](11)DIC=Dθ¯+pD,where Dθ¯ is the posterior mean deviance that can be taken as a Bayesian measure of fitting and pD 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 (I=154).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 (T=12). 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 i and month t, the weighted average traffic MTTi,t is calculated by using the weights 1, 1.5, 2, 3, and 3.5 for vehicle categories (1)–(5), respectively:(12)MTTi,t=Vi,t1+1.5Vi,t2+2Vi,t3+3Vi,t4+3.5Vi,t5,where Vi,t(1), Vi,t(2), Vi,t(3), Vi,t(4), and Vi,t(5) are the traffic volumes for vehicle categories (1)–(5), respectively, on freeway segment i during month t. The traffic composition, that is, the percentages of each vehicle category Vehi,t(1), Vehi,t(2), Vehi,t(3), Vehi,t(4), and Vehi,t(5), is calculated as(13)Vehi,t1=Vi,t1Vi,t1+1.5Vi,t2+2Vi,t3+3Vi,t4+3.5Vi,t5,Vehi,t2=1.5Vi,t2Vi,t1+1.5Vi,t2+2Vi,t3+3Vi,t4+3.5Vi,t5,Vehi,t3=2Vi,t3Vi,t1+1.5Vi,t2+2Vi,t3+3Vi,t4+3.5Vi,t5,Vehi,t4=3Vi,t4Vi,t1+1.5Vi,t2+2Vi,t3+3Vi,t4+3.5Vi,t5,Vehi,t5=3.5Vi,t5Vi,t1+1.5Vi,t2+2Vi,t3+3Vi,t4+3.5Vi,t5.Table 1
Vehicle categorization.
Category
Categorization criteria
Representative vehicle types
Head height
Number of axes
Number of wheels
Wheelbase
(1)
<1.3
2
2–4
<3.2
Passenger car, jeep, taxi-head truck
(2)
⩾1.3
2
4
⩾3.2
Minibus, minivan, light truck
(3)
⩾1.3
2
6
⩾3.2
Medium bus, large normal bus, medium truck
(4)
⩾1.3
3
6–10
⩾3.2
Large luxury bus, large truck, large trailer, 20-foot container vehicle
5
⩾1.3
>3
>10
⩾3.2
Heavy truck, heavy trailer, 40-foot container vehicleTable2 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, Vehi,t(2) and Vehi,t(5) and Vehi,t(4) and Vehi,t(5), are significantly correlated with coefficients over 0.6 or below −0.6. To avoid the adverse effect of significant correlation Vehi,t(5) is excluded from the models. The results of the diagnoses indicate that there is no significant collinearity in the other factors.Table 2
Descriptive statistics of variables in the model.
Variables
Description
Mean
SD
Min.
Max.
Response variable
Crash
Crash count per segment per month
0.372
0.672
0
5
Exposure variables
Length
Segment length (m)
813
303
154.4
2000
MTT
Monthly total traffic (103 pcua)
1851
513
1327
3759
Risk factors
Vehi,t(1)
The percentages of vehicles of Category(1) vehicles accounted for (reference case)
38.1
5.76
31.4
53.5
Vehi,t(2)
The percentages of vehicles of Category(2) vehicles accounted for
2.56
0.513
1.97
5.33
Vehi,t(3)
The percentages of vehicles of Category(3) vehicles accounted for
21.9
2.15
15.7
25.5
Vehi,t(4)
The percentages of vehicles of Category(4) vehicles accounted for
6.59
0.766
4.57
7.80
Vehi,t(5)
The percentages of vehicles of Category(5) vehicles accounted for
30.9
5.57
20.2
39.4
Curvature
Segment curvature (0.1 km−1)
1.77
1.27
0
4.35
Gradient
Segment gradient (%)
0.741
0.568
0
2.91
Bridge
A part of a bridge: yes = 1, no = 0
0.500
0.502
0
1
Access
Presence of roadway access: yes = 1, no = 0
0.210
0.407
0
1
apcu: passenger car units.Table 3
Pearson correlation coefficients between explanatory variables.
Length
MTT
V
e
h
i
,
t
(
2
)
V
e
h
i
,
t
(
3
)
V
e
h
i
,
t
(
4
)
V
e
h
i
,
t
(
5
)
Curvature
Gradient
Bridge
Access
Length
1
0.13
−0.09
−0.04
−0.08
0.02
0.10
−0.25
0.23
0.18
MTT
0.13
1
0.18
−0.10
−0.00
−0.15
−0.02
−0.13
0.06
0.17
V
e
h
i
,
t
(
2
)
−0.09
0.18
1
−0.44
−0.12
−0.63
0.00
0.03
−0.04
−0.00
V
e
h
i
,
t
(
3
)
−0.04
−0.10
−0.44
1
−0.26
−0.16
0.02
0.02
−0.01
0.00
V
e
h
i
,
t
(
4
)
−0.08
−0.00
−0.12
−0.26
1
0.69
0.03
0.04
0.00
0.01
V
e
h
i
,
t
(
5
)
0.02
−0.15
−0.63
−0.16
0.69
1
0.01
0.00
0.02
−0.01
Curvature
0.10
−0.02
0.00
0.02
0.03
0.01
1
−0.06
0.08
−0.06
Gradient
−0.25
−0.13
0.03
0.02
0.04
0.00
−0.06
1
−0.00
−0.04
Bridge
0.23
0.06
−0.04
−0.01
0.00
0.02
0.08
−0.00
1
0.00
Access
0.18
0.17
−0.00
0.00
0.01
−0.01
−0.06
−0.04
0.00
1


## 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 distributionN(0,104) is used for the priors of α1, α2, γ, and each element of β, and a diffused gamma distribution gamma(0.001,0.001) is used for the priors of precisions of the normal distributions, 1/σ2 and 1/σδ2. 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 Table4. 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.Table 4
Model estimation results.
Poisson
Random effect
Autoregression-1
Random effect with autoregression-1
Constant
−10.25 (1.39)a,∗
−10.82 (2.19)∗
−10.4 (1.56)∗
−10.34 (2.39)∗
Length
1.04 (0.11)∗
1.00 (0.15)∗
1.02 (0.15)∗
0.99 (0.16)∗
MTT
0.35 (0.15)∗
0.42 (0.26)∗∗∗
0.37 (0.18)∗∗
0.41 (0.21)∗∗
V
e
h
i
,
t
(
2
)
0.08 (0.08)
0.11 (0.10)
0.10 (0.10)
0.08 (0.10)
V
e
h
i
,
t
(
3
)
−0.01 (0.02)
−0.003 (0.02)
−0.008 (0.02)
−0.01 (0.03)
V
e
h
i
,
t
(
4
)
−0.08 (0.05)∗∗
−0.09 (0.06)∗∗∗
−0.10 (0.06)∗∗
−0.11 (0.06)∗∗
Gradient
0.25 (0.07)∗∗
0.17 (0.09)∗∗
0.18 (0.09)∗
0.17 (0.09)∗∗
Curvature
0.06 (0.03)∗∗
0.04 (0.04)
0.04 (0.04)
0.04 (0.04)
Bridge
0.02 (0.08)
0.01 (0.11)
0.01 (0.10)
0.02 (0.10)
Access
0.07 (0.09)
0.03 (0.13)
0.04 (0.12)
0.04 (0.12)
σ
—
0.39 (0.06)∗
—
0.27 (0.12)∗
γ
—
—
0.72 (0.14)∗
0.46 (0.23)∗∗
σ
δ
—
—
0.37 (0.13)∗
0.37 (0.14)∗
D
θ
¯
2883
2790
2682
2683
pD
10
65
155
155
DIC
2893
2854
2837
2838
aEstimated mean (standard deviation) for the parameter; ∗significant at the 95% credible level; ∗∗significant at the 90% credible level; ∗∗∗significant at the 80% credible level.Although the temporal correlation is found to be significant in the random effect model and the AR-1 model, theDθ¯ 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 pD) 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 equivalentDθ¯ 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(4) 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 (4) vehicles would decrease the crash risk. Several factors may account for this: (1) drivers of large buses/trucks/trailers (Category (4) vehicles) generally hold a higher level of driving license and have better driving skills than passenger car (Category (1) vehicles) drivers; (2) 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 (3) 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].


## 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 distributionN(0,104) is used for the priors of α1, α2, γ, and each element of β, and a diffused gamma distribution gamma(0.001,0.001) is used for the priors of precisions of the normal distributions, 1/σ2 and 1/σδ2. 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 Table4. 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.Table 4
Model estimation results.
Poisson
Random effect
Autoregression-1
Random effect with autoregression-1
Constant
−10.25 (1.39)a,∗
−10.82 (2.19)∗
−10.4 (1.56)∗
−10.34 (2.39)∗
Length
1.04 (0.11)∗
1.00 (0.15)∗
1.02 (0.15)∗
0.99 (0.16)∗
MTT
0.35 (0.15)∗
0.42 (0.26)∗∗∗
0.37 (0.18)∗∗
0.41 (0.21)∗∗
V
e
h
i
,
t
(
2
)
0.08 (0.08)
0.11 (0.10)
0.10 (0.10)
0.08 (0.10)
V
e
h
i
,
t
(
3
)
−0.01 (0.02)
−0.003 (0.02)
−0.008 (0.02)
−0.01 (0.03)
V
e
h
i
,
t
(
4
)
−0.08 (0.05)∗∗
−0.09 (0.06)∗∗∗
−0.10 (0.06)∗∗
−0.11 (0.06)∗∗
Gradient
0.25 (0.07)∗∗
0.17 (0.09)∗∗
0.18 (0.09)∗
0.17 (0.09)∗∗
Curvature
0.06 (0.03)∗∗
0.04 (0.04)
0.04 (0.04)
0.04 (0.04)
Bridge
0.02 (0.08)
0.01 (0.11)
0.01 (0.10)
0.02 (0.10)
Access
0.07 (0.09)
0.03 (0.13)
0.04 (0.12)
0.04 (0.12)
σ
—
0.39 (0.06)∗
—
0.27 (0.12)∗
γ
—
—
0.72 (0.14)∗
0.46 (0.23)∗∗
σ
δ
—
—
0.37 (0.13)∗
0.37 (0.14)∗
D
θ
¯
2883
2790
2682
2683
pD
10
65
155
155
DIC
2893
2854
2837
2838
aEstimated mean (standard deviation) for the parameter; ∗significant at the 95% credible level; ∗∗significant at the 90% credible level; ∗∗∗significant at the 80% credible level.Although the temporal correlation is found to be significant in the random effect model and the AR-1 model, theDθ¯ 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 pD) 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 equivalentDθ¯ 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(4) 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 (4) vehicles would decrease the crash risk. Several factors may account for this: (1) drivers of large buses/trucks/trailers (Category (4) vehicles) generally hold a higher level of driving license and have better driving skills than passenger car (Category (1) vehicles) drivers; (2) 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 (3) 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.



---

*Source: 5391054-2017-10-24.xml*