Introduction

The ongoing global urbanization process is projected to lead to 60% of the world’s population living in cities by 2030 and 70% by 2050, according to the United Nations and the World Health Organization (UN 2018; City and Assessment 2010). Public transportation plays a vital part in people’s life and facilitates the acquisition of education, employment, and recreational opportunities (Mayer and Trevien 2017). Among the various transportation modes, bus services are common for short and medium-distance travel given their affordability and well-established network. Yet, one of the most ubiquitous challenges that confront bus commuters is the lack of punctuality. Bus delays not only cause inconvenience and emotional impact on passengers but also decrease the efficiency of the transportation network through propagation, resulting in increased operating costs (Amberg et al. 2019).

The causes of bus delays are multifaceted, ranging from traffic congestion to weather conditions (Park et al. 2020). Identifying and understanding the factors that contribute to bus delays is crucial for predicting bus arrival times, and also for improving the efficiency and reliability of bus services. The majority of research in this area has centered on specific bus lines and one-step regression models (i.e., next-stop delay prediction) utilizing real-time bus data (Tiong et al. 2023). Commonly, the models are utilized for proactive real-time management of bus routes based on external information (e.g., temporal, weather) (Achar et al. 2019; Zhang et al. 2021; Zhou et al. 2022; Ma et al. 2019; Rodriguez-Deniz and Villani 2022; Huang et al. 2021; Chen et al. 2020). Limited research has been conducted on the reliability of bus services from a network-level perspective. Chen et al. (Chen et al. 2009) conducted an analysis of bus service reliability in Beijing, proposing three performance parameters (punctuality index of routes, deviation and evenness index of stops) for evaluating and estimating reliability at the stop, route, and network levels.

Different from the planning-based factor analysis, this paper aims to examine the heterogeneous impact of factors that affect real-time bus arrival delays along the route by considering a regression set of variables, including operational information (e.g., origin delay, upstream delays, dwell time, etc.), calendar information (e.g., time of the day, day of the week) and external information (e.g., weather). Previous research analyzed the factors contributing to bus arrival delays/reliability using a single and generic equation for all bus stops, which fails to capture the heterogeneous impact of factors in the real-time bus arrival delay analysis. Theoretically, as buses move along the route, the factors used for bus arrival delay analysis may have varying levels of influence in both time and space. Additionally, while some research in this area has primarily focused on common bus operation factors (e.g., upstream stop delay), there is a limited number of comprehensive studies that aim to understand the heterogeneous impact of a regression set of factors, particularly the effects of initial delays and knock-on delays.

To bridge these research gaps, this study proposes a set of regression equations conditional on bus locations to explore the heterogeneous impact of a set of factors (such as operational factors, route, calendar variables, and weather) on bus arrival delays. Case studies are performed on a chosen bus route in Stockholm, Sweden. The major contributions of the study are:

  • Propose a set of regression equations to examine real-time bus arrival delays that take into account the bus location. Unlike previous research, it captures the heterogeneous impact of factors at different stops and conserves interpretability.

  • Develop a seemingly unrelated regression equations (SURE) approach to estimating the coefficients of all equations concurrently by considering the correlations of equation residuals caused by the common unobserved features in these equations.

  • Identify and measure the numerous significant factors that influence real-time bus arrival delays using real-time data from selected high-frequency bus routes in Stockholm, Sweden, and explore their potential practical implications.

The remaining part of this paper is organized as follows: “Literature review” section provides an overview of the relevant research literature. “Methodology” section formulates the problem and describes the SURE model. “Case study” section provides the selected case study of high-frequency bus routes in Stockholm, Sweden, encompassing the data preprocessing and outcomes, and analysis of the results. “Discussion” section discusses practical implications. Finally, “Conclusion” section summarizes the key findings of the study and future work directions.

Literature review

Numerous studies have been conducted on arrival time/delay prediction. Although there is limited research directly analyzing the factors affecting bus arrival delays, explanatory variables can be reviewed from the perspective of bus service reliability/variability/punctuality. Thus, the existing research is analyzed from two perspectives: the proposed models and the explanatory variables.

Prediction models

Accurate bus arrival time information can enhance service quality, reduce passenger anxiety and wait times, and attract more passengers, thus increasing competitiveness. Supplying bus arrival time data to riders not only enhances the quality of transit systems, but also enables operators to monitor schedule compliance, respond in real-time, and evaluate operational effectiveness (Singh and Kumar 2022). Currently, the majority of intelligent transportation systems (ITS) supported arrival time predictions mainly rely on GPS-based location data along with road, traffic, and passenger data. While offline prediction/estimation of bus arrival/travel times is possible, most of the literature focuses on online models for providing real-time information to passengers and operators. A recent review and comparative study shows that historical AVL (Automated Vehicle Location) records are useful for optimizing bus route design and scheduling through offline analysis (Pili et al. 2019). Although models solely based on demand data are uncommon in the literature, a regression model was developed by Zhou et al. (2017a) for predicting bus arrival times based on smart card data and seat occupancy ratios. The prediction and analysis of public transport demand in both space and time is currently an area of active research, which has the potential to be applied in solving the problem of travel time prediction (Qi et al. 2018; Karnberger and Antoniou 2020; Jin et al. 2022).

To make effective predictions of bus arrival times at stops, several factors have been taken into consideration, such as traffic conditions (e.g., location, number of intersections, traffic congestion, etc.) (Achar et al. 2019; Čelan and Lep 2020), dwell time at bus stops (Dai et al. 2019; Büchel and Corman 2022), scheduled travel time (He et al. 2018), and the actual travel time between previous stops (Yu et al. 2018; Pang et al. 2018). In terms of methodologies, with the increasing availability and complexity of data, more complex nonlinear models from conventional machine learning (Huang et al. 2021; Yu et al. 2018; Chen 2018), deep learning (Jin et al. 2022; He et al. 2018; Petersen et al. 2019), and hybrid methods (Alam et al. 2021; Xie et al. 2021) have become increasingly popular. Compared to probabilistic and statistical models (Hans et al. 2015; Wepulanon et al. 2018), the above models provide more accurate predictions. However, they are also accompanied by more intricate model architectures and associated high computational expenses.

Consistent findings across various studies suggest that current models are primarily developed to generate precise bus arrival time and delay predictions for real-time bus management, rather than investigating the root causes of bus delays along the entire route. Furthermore, existing factor analysis models are primarily aimed at improving model performance, and the single, generic equation model is not suitable for factor analysis in real-time bus arrival delays. This study proposes a set of equations for analyzing real-time bus arrival delays, which are conditional on the bus’s stop. The equations proposed in this study are capable of capturing the heterogeneous impact of stop delay factors, which can be leveraged to develop effective traffic management strategies.

Explanatory variables

As the research on bus arrival delays is scarce, we conducted a comprehensive analysis of the variables utilized in previous studies that focused on bus service reliability, variability in bus travel time, and prediction of bus states such as arrival time and travel time. To organize the explanatory variables, we classified them into three main categories: operations variables, planning variables, and external variables, which are presented in Table 1.

Bus operations variables refer to the set of variables that capture both the scheduled and actual activities of a bus during its trip, including the scheduled departure and arrival times at each stop, and the actual movement of the bus during its operation. These variables provide insights into the operational performance of the bus system, such as the arrival delays, dwell time, and scheduled and actual travel time (Rodriguez-Deniz and Villani 2022; Yu et al. 2017; He et al. 2020). Bus planning variables refer to variables that describe the bus route and stop, capturing the heterogeneity of bus traffic. Different bus routes and stops have varying specifications and operation conditions, which result in different operating frequencies and travel demand (Ma et al. 2017, 2015; Soza-Parra et al. 2021). The external variables consist of calendar, weather, and disturbance variables. Calendar variables aim to capture the distribution of bus states over different time periods (Kathuria et al. 2020). Weather variables quantify atmospheric conditions, including temperature, wind speed, snow depth, and rainfall (Yu et al. 2017). Disturbance variables convey information about disruptions and their impacts, such as accidents, local events, and bus malfunctions (Yang and Qian 2019).

Table 1 Categorization of explanatory variable

The study objective drives the selection of variables of interest. Table 2 categorizes the explanatory variables used in existing studies based on different research topics. Studies on travel time variability and bus service reliability focus on the planning and external variables. Ma et al. (2015, 2017) conducted a comprehensive study to identify and quantify the underlying determinants of bus travel time and its variability. They found that the recurrent congestion index, traffic signals, and passenger demand at stops are the most significant predictors. Furthermore, their study revealed that rain would decrease the variability on a busway and increase it in the CBD area. Other studies have found that independent variables such as route length, number of bus stops, and number of intersections have a significant impact on travel time reliability, especially among different route characteristics of bus rapid transit systems, with route length being the most significant factor (Kathuria et al. 2020). It is also found that the number of intersections and signal density have a higher impact on travel time reliability than the number of bus stops. Chen et al. (2009) conducted an in-depth analysis of service reliability based on bus operational characteristics in Beijing and estimated the service reliability at the stop, route, and network levels. Their results showed that as the route length increased, bus services became more unreliable, especially when the route distance exceeded 30 km. The provision of an exclusive bus lane can effectively enhance bus service quality and improve reliability. Calendar variables capture recurrent congestion, while disturbance variables and extreme weather lead to nonrecurring congestion, affecting travel time variability (Durán-Hormazábal and Tirachini 2016).

The dispatch at the terminals is the main source of irregularity for headway delays, which can worsen downstream as the irregularity propagates. The most effective measures to reduce headway variability are segregated lanes and off-board payment stops (Soza-Parra et al. 2021). Service overlap has been found to increase headway irregularity and consequently contributes to passengers’ waiting time. On the other hand, variables such as bus stop placement, reserved bus lanes, transit signal priority systems, and time points have statistically significant positive effects on decreasing headway delay (Diab et al. 2016).

When it comes to predicting the state of a bus (e.g., arrival time, travel time, or delay) operations variables and historical state data are crucial. To estimate the arrival or travel time of a bus, the travel time of preceding buses is an important factor to consider. Additionally, delays for upstream stops and preceding buses play a significant role in predicting bus arrival delays (Rodriguez-Deniz and Villani 2022). To improve the travel time prediction, planning variables, calendar variables, and weather variables should also be included (Yang and Qian 2019). Among these variables, the number of stops, distance, scheduled departure time, route identifier, week number, area type, and day of the week are ranked as the most important. Taking all of these factors into account is important to enhance the accuracy of bus state prediction (Alam et al. 2021).

Most studies have explored the influence of operations variables, planning variables, calendar variables, and weather on bus service reliability and arrival/travel time prediction. However, a complete and heterogeneous impact of the factors causing arrival delays is yet to be conducted, particularly for the impact of initial delays and knock-on delays. To provide a more comprehensive understanding of the relationship between various factors and bus arrival delays, this paper examines the impact of a broad range of factors, including bus operations, calendar variables, weather conditions, and traffic conditions. By analyzing the combined effects of these factors, this study aims to provide a deeper understanding of the causes of bus arrival delays.

Table 2 Categorization of the existing literature based on explanatory variable

Methodology

Problem formulation

Generally, bus delay prediction models can be classified into two categories: factor analysis and prediction models. The factor analysis models contribute insights into the impact of endogenous and exogenous factors on bus network performance, aiding in understanding and planning decisions. Conversely, prediction models focus on the delay prediction accuracy (not necessarily the interpretability) and targeting information provision to passengers and operators. In this study, the focus is on the factor analysis modelling, and the aim is to comprehend factors influencing real-time bus delays at the route level rather than maximizing prediction performance.

In the field of bus delay prediction, most current studies focus on exploring the impact of various factors and modeling the problem using a single, generic equation as below:

$$\begin{aligned} \begin{aligned} y_n=f({\textbf{X}},\beta ) \end{aligned} \end{aligned}$$
(1)

where \(y_n\) is the dependent variable (in this case, bus arrival delay at stop n), \({\textbf{X}}\) is a common set of explanatory variables (independent variables), and \(\beta\) is the set of parameters to be estimated that measure the effect of each independent variable on the dependent variable.

Equation (1) is capable of measuring the varying effect of variables on arrival delay at bus stop n. However, it has limitations in capturing the heterogeneity of the factors and their impact on bus arrival delays across different sections of the bus line. This is due to the fact that delays at consecutive upstream stops can have different effects on the current stop’s delays depending on, for example, where the bus is, the scheduling of operations at those stops, and the driver’s behavior. Therefore, it is important to take into account the heterogeneity of factors affecting bus delays at different bus stops.

The paper aims to analyze the bus arrival delay at stop n conditional on that the bus is at stop \(n-1\). We propose a series of regression equations to model the problem and capture the heterogeneous impact of variables at different bus stops. Mathematically, it is represented as:

$$\begin{aligned} \begin{aligned} {\textbf{y}}_n=f({\textbf{X}}_n,\beta _n \mid \text {bus is at stop} \ n-1), \forall n \in [1, N] \end{aligned} \end{aligned}$$
(2)

It is a regression set consisting of n linear equations that can be re-written as:

$$\begin{aligned} \left\{ \begin{array}{lc} {y}_1=\beta _1 {\textbf{X}}_1 + \varepsilon _1,\\ {y}_2=\beta _2 {\textbf{X}}_2 + \varepsilon _2,\\ \vdots \\ {y}_N=\beta _N {\textbf{X}}_N + \varepsilon _N \\ \end{array}\right. \end{aligned}$$
(3)

where \({y}_n\) \(\forall n \in [1, N]\) is the bus arrival delays from the origin to stop n, \({\textbf{X}}_n\) is a set of explanatory variables conditional on the bus at stop \(n-1\), \(\beta _n\) is the parameter vector to be estimated corresponding to the delay at stop n.

Equation (3) provides more flexibility in estimating delays and understanding the impacting factors at specific stops by incorporating different sets of explanatory variables \({\textbf{X}}_n\). Moreover, it can capture the heterogeneity of the impact of variables on bus arrival delays by allowing for adjustments to the coefficients \(\beta _n\). This enables a more accurate representation of the complex factors that contribute to bus delays and allows for more effective traffic management strategies to be developed.

SURE model

The seemingly unrelated regression equations (SURE) model, first introduced by Zellner (1962), consists of multiple regression equations, with each equation having its dependent variable and the option of using the same or different sets of exogenous regressors. The SURE model assumes that some common factors affect all the regression equations, in addition to some factors that affect each equation uniquely. The basic form is a system of N equations:

$$\begin{aligned} \begin{aligned} {Y}_i=\beta _i {\textbf{X}}_i + \varepsilon _i, \ i = 1,2,\ldots , N \end{aligned} \end{aligned}$$
(4)

Eq. (4) can be expanded into the following:

$$\begin{aligned} \begin{aligned} \left( \begin{array}{c} Y_{1} \\ Y_{2} \\ Y_{3} \\ \cdot \\ \cdot \\ \cdot \\ Y_{N} \end{array}\right) =\left( \begin{array}{cccc} X_{1} &{}\quad 0 &{}\quad \ldots &{}\quad 0 \\ 0 &{}\quad X_{2} &{}\quad \ldots &{}\quad 0 \\ \cdot &{}\quad \ldots &{}\quad \ldots &{}\quad \cdot \\ 0 &{}\quad 0 &{}\quad \ldots &{}\quad X_{N} \end{array}\right) \left( \begin{array}{c} \beta _{1} \\ \beta _{2} \\ \beta _{3} \\ \cdot \\ \cdot \\ \cdot \\ \beta _{N} \end{array}\right) +\left( \begin{array}{c} \varepsilon _{1} \\ \varepsilon _{2} \\ \varepsilon _{3} \\ \cdot \\ \cdot \\ \cdot \\ \varepsilon _{N} \end{array}\right) \end{aligned} \end{aligned}$$
(5)

where \(Y_i\) is an \(R \times 1\) vector of responses for the \(i^{th}\) equation, \(X_i\) is an \(R \times k\) matrix of exploratory variables, \(\beta _i\) is a \(k \times 1\) vector of coefficients, and \(\varepsilon _i\) is an \(R \times 1\) vector of errors, R is the number of observations in the sample, and k is the number of exploratory variables.

The SURE model assumes that the errors \(\varepsilon _i\) are correlated across equations and satisfy the following assumptions:

  • Mean of error terms: \(E[\varepsilon _i|X_1, X_2,\ldots ,X_N]=0\).

  • Variance of error terms in \(i^{th}\) equation: \(E\left[ \varepsilon _{i} \varepsilon _{i}^{\prime } \mid X_{1}, X_{2}, \ldots , X_{N}\right] =\sigma _i^2 I_{R}\).

  • Covariance of error terms across \(i^{th}\) and \(j^{th}\) equations: \(E\left[ \varepsilon _{i} \varepsilon _{j}^{\prime } \mid X_{1}, X_{2}, \ldots , X_{N}\right] =\sigma _{i j} I_{R}\) where \(i \ne j\).

Under these assumptions, the variance-covariance matrix is calculated as:

$$\begin{aligned} E\left[ \varepsilon \varepsilon ^{\prime }\right] =\left[ \begin{array}{cccc} \sigma _{1}^{2} I_{R} &{}\quad \sigma _{12} I_{R} &{}\quad \ldots &{}\quad \sigma _{1 N} I_{R} \\ \sigma _{21} I_{R} &{}\quad \sigma _{2}^{2} I_{R} &{}\quad \ldots &{}\quad \sigma _{2 N} I_{R} \\ \vdots &{}\quad \vdots &{}\quad &{}\quad \vdots \\ \sigma _{N 1} I_{R} &{}\quad \sigma _{N 2} I_{R} &{}\quad \ldots &{}\quad \sigma _{N}^{2} I_{R} \end{array}\right] =\Sigma \otimes I_{R} \end{aligned}$$
(6)

where \(\Sigma =[\sigma _{ij}]\) is a \(N\times N\) positive symmetric matrix, and \(I_R\) a \(R\times R\) identity matrix and \(\otimes\) is the Kronecker product.

Compared to estimating each equation separately in the ordinary least square (OLS) model, the SURE model allows for a more efficient estimation of the parameters in the system of equations. From the problem characteristics perspective, the SURE assumptions match the problem well. That is, although the equations in Eq. (3) are not directly related, they are expected to exhibit contemporaneous correlations in their disturbance terms due to common, unmeasured factors (e.g., driver behavior). This is because these equations model the arrival delays of the same bus traveling along the same route toward its destination. Since it is impractical to measure and include in the model all possible variables that could impact bus arrival delays, the error terms in these equations may share similar patterns and result in contemporaneous correlations across equations. In other words, the bus location-conditioned regression equations possess unobserved shared characteristics and should be treated as a group for simultaneous parameter estimation. The approach has also been utilized in various transport scenarios, including passenger travel demand (Sheng and Sharp 2019), commuting mode share (Nasri and Zhang 2019), and travel mode choice (Belgiawan et al. 2017).

In this study, the SURE model is a factor analysis model. We opt for a simpler and more interpretable SURE model over a nonlinear model, aligning with our objective of understanding rather than prediction. The SURE model facilitates statistical inference, assessing parameter estimate uncertainty and providing valuable insights into the relationships between explanatory variables and bus arrival delays. In contrast, nonlinear models, such as machine learning models, often yield intricate and less interpretable results despite their strong predictive capabilities.

Data and variables

The study aims to investigate the various factors that affect real-time information bus delays. To accomplish this, we carefully selected our explanatory variables by taking into account the existing body of literature on bus delay prediction (as outlined in “Explanatory variables” section) and considering data accessibility. Ultimately, we utilized two data sources, bus operations data, and weather data, to extract the variables that have the potential to contribute to bus delays.

The bus operational data were obtained through Trafiklab (https://www.trafiklab.se/), an open platform for innovation in Swedish public transport, and are based on the General Transit Feed Specification (GTFS) real-time vehicle location-based arrival time updates. Specifically, the data contain the actual arrival (and departure) times of each operating vehicle along its scheduled route. These updates provide a retrospective snapshot of operating vehicles, indicating deviations from scheduled arrival times in seconds. By updating the estimates in accordance with the feed update interval, we can obtain the latest arrival time information of each vehicle, which reflects any service delays during its operation.

The study collected weather data from the website ’Time and Date’ (www.timeanddate.com), which offers historical, current, and forecasted weather data for locations worldwide. In this study, the weather data was collected from the Vasastaden district (inner-city) of Stockholm. Consequently, the weather data are consistent across the entire studied bus route. The weather data set consists of historical meteorological observations, such as temperature, weather conditions, wind, and humidity, that were recorded every 30 min. Finally, the two datasets were merged based on the location and date-time of each bus trip. After thorough exploration and analysis of all variables, we found that only temperature and precipitation significantly impact bus delays. Furthermore, we conducted advanced analysis on these two factors. We found that the effects of weather and temperature on bus delays are interconnected rather than independent (e.g., snow indicates the temperature is low), and we opted for a combined approach. To address these, we design weather variable by different combination of physically reasonable weather and temperature variables, including rain, light rain, snow, light snow, cold, extra cold. After a through statistically modelling analysis, the significant weather variables kept in the model are shown in Table 3.

Regarding the accuracy of the weather data, we cross-validated the weather data obtained from timeanddate.com with data from reputable sources. We compared hourly weather data for the same location in Stockholm over the past week with the Swedish Meteorological and Hydrological Institute, an expert agency under the Ministry of the Environment. The precipitation data showed consistent results, and temperature discrepancies were within 2 degrees. Furthermore, we utilized range data (e.g., Cold: Temperature \([{-5}\,^\circ \text {C}, {0}\,^\circ \text {C}]\)) instead of direct numerical values to minimize the impact of potential errors in weather data on the analysis results.

Table 3 provides an overview of the response variable and the explanatory variables used in the model, along with their corresponding definitions. The response variable is defined as the arrival delay of a bus at a given stop. We selected and designed a set of explanatory variables that cover different aspects of the bus operations, calendar, and weather conditions. Among the variables, the ‘origin delay’ variable aims to capture the impact of the initial delay of the route, which helps to understand how delays at the beginning of the route can propagate and affect the current stop. The ‘arrival delay of preceding bus’ variable is included to reflect the concept of knock-on delays. It takes into account the delays experienced by the preceding bus and how they can influence the arrival time of the current bus. By including these variables in our model, we aim to understand the heterogeneous impact of operational factors on real-time bus arrival delays.

We recognize the importance of section characteristics (e.g., number of signals, road type, stop type) in understanding delays at various bus stops and drive infrastructure planning applications. Unlike previous studies that analyse factors influencing delays across bus stops using a single, generic equation, our study aims to capture contemporaneous correlations among different stops affected by shared unobserved characteristics as buses travel the on route. Each bus stop is treated as a separate equation within the SURE framework, enabling us to model the factors contributing to delays at each individual stop. As section characteristics for an individual stop are stationary and fixed, they cannot be considered as variables affecting that stop’s delays from the modelling perspective (i.e., the variable with no variability will not contribute to the regression model itself). Additionally, the SURE model cannot process stationary categorical variables. Consequently, these variables are not considered and incorporated into our study.

Table 3 Description of variables

Case study

Data preparation

The case study analyses bus arrival delays along the high-frequency inner-city bus line 4 in Stockholm, Sweden, shown in Fig. 1. Bus line 4 traverses the inner city area and is the busiest bus line in Stockholm, with buses departing every 4–6 min between 06:50 and 19:00 on weekdays. Spanning a distance of approximately 12.4 kms, bus line 4 comprises a total of 28 stops in both southbound (Radiohuset–Gullmarsplan) and northbound (Gullmarsplan–Radiohuset) directions. It takes around 60 min for a typical vehicle to travel the entire route in one direction. For the purpose of analysis, data on bus arrival delays along the selected route between 6:00 a.m. and 10:00 p.m. from January to June 2022 were collected.

Fig. 1
figure 1

The route of bus line 4, Stockholm. Source: OpenStreetMap

We selected six typical stops in each direction along the line as our studied stops. The stop selection criteria were twofold: first, to cover diverse locations, including the first stop, last stop, city centre, and stops connecting to transfer stations. Second, these stops were chosen to reflect varying impacts from the considered variables. While not exhaustive, this approach allowed us to showcase stops that capture a wide range of conditions and influences along the bus route. To prepare the input data for the SURE model, several data cleaning and transformation tasks were performed, including removing incomplete trip records and observations with values that deviate significantly from the mean (over 3 standard deviations away). By eliminating incomplete or inaccurate data, we can improve the accuracy and reliability of our model and gain a better understanding of the factors that contribute to bus arrival delays along these routes. In the end, a total of 20,189 bus records were included in the model for the north–south direction and 20,108 for the south–north direction.

The categorical variables were encoded using the one-hot encoding, which involves creating dummy variables. However, to avoid issues with perfect collinearity, a baseline feature was excluded, resulting in the creation of one dummy variable for each categorical variable. A Pearson correlation analysis was then performed on all variables to detect any multicollinearity. In cases where two variables are found to be highly correlated, the more significant one was used to prevent redundancy. Finally, the models were estimated using the SURE function, which is available through the systemfit package in R-studio (Henningsen and Hamann 2008). This ensures that the model accurately captures the complex relationship between the variables and produces reliable results.

For data pre-processing, we initially collected six months of bus trip data from the original GTFS dataset, arranging them chronologically and by stop sequence. Each row in the dataset represents a complete trip, encompassing delay data for each bus stop. Subsequently, we computed the values for each independent variable. Given that improper interpolation could lead to inaccurate values, to ensure accuracy, we excluded trips with missing values and outliers. Outlier trips were identified based on experience: a trip is deemed an outlier if the initial delay exceeds twenty minutes, or if the absolute value of the delay difference between two consecutive bus stops is greater than ten minutes. These missing values and outlier trips constitute a minimal percentage (about 0.5% of the total), and their removal has negligible effects on the experimental results. Finally, we refined the dataset by selecting daily observations from 6:00 a.m. to 10:00 p.m. for the experimental analysis.

Breusch–Pagan test

To ensure the reliability of our SURE model over its ordinary least squares (OLS) counterpart, we performed the Breusch–Pagan test of independence, which was first introduced by Breusch and Pagan (1980). This statistical test evaluates the significance of the correlation matrix of residuals and verifies if the covariance matrix disturbance in the SURE model is diagonal. The test serves as a robustness check for our findings. Table 4 displays the outcomes of the Breusch–Pagan test for independent equations.

The result of the Breusch–Pagan test for independent equations indicates that there is a statistically significant correlation between regression errors (reject the null hypothesis of diagonality at a 5% significance level). This means that the error terms of the delays at each of the six stops are contemporaneously dependent on each other. If we estimate each equation separately using OLS, we will obtain consistent but inefficient coefficients (described in “Which model should be trusted?” section). The results from the SURE model are theoretically more convincing by considering the correlated residuals and it also provides both consistent and efficient estimated coefficients.

Table 4 Correlation matrix of residuals between equations for northbound direction

Results

The effect of bus operations on arrival delays can be influenced by a multitude of other factors, such as traffic conditions, travel demand, and time periods. For example, the same bus stop may exhibit distinct arrival delays during the morning peak for the city-bound direction compared to the out-of-city-bound direction. Therefore, to conduct a thorough and accurate analysis, it is crucial to test each direction separately.

Tables 5 and 6 show the SURE model estimation results for bus arrival delays in the southbound and northbound directions, respectively. The SURE model exhibits promising performance, as indicated by a low RMSE and high R2 value. The RMSE for arrival delay at the next stop is within 42 s for the northbound direction and 30 s for the southbound direction. For context, the average scheduled inter-stop travel time is approximately 135 s, though this may vary for specific stop pairs and different time periods. The high R2 values, ranging between 92% and 99%, suggest that the model is able to account for a significant portion of the variability in bus arrival delays. Compared to a recent study by Rodriguez-Deniz and Villani (2022) that used regression models to predict bus arrival delays for a single stop (R2 of 0.63 and MAE of 42.45), the proposed local models through conditional regressions significantly outperforms the global model.

Table 5 Summary of SURE model estimation results for the northbound direction
Table 6 Summary of SURE model estimation results for the southbound direction

One possible reason for the high R2 value can be attributed to the inclusion of real-time operation variables, which effectively capture the factors influencing arrival delays. To further investigate this, we conducted tests focusing solely on operation factors, excluding calendar and weather factors. The results revealed minimal changes in both RMSE and R2 for both southbound and northbound directions. The outcome is logical as the operation factors are specifically designed to reflect arrival delays, which can effectively capture arrival delay factors explained by calendar and weather factors.

Another reason could be the representation of the dependent variable. Studies have indicated that models predicting the deviation of origin–destination (OD) flows tend to outperform models that directly predict OD flows (Jiang et al. 2022). Similarly, it may happen that predicting the arrival delay at a stop (i.e., the discrepancies between actual arrival times and scheduled times) is easier compared to directly predicting the actual arrival time at a stop or the travel time between two consecutive stops. To investigate this, we developed models to predict the arrival time at a stop or travel time between stops using the same set of explanatory variables in Table 6. The results show the R2 values ranging from 0.439 to 0.474 for arrival delays and 0.055–0.36 for travel times. These results confirm the hypothesis that predicting arrival delays is easier compared to predicting arrival time or travel time directly. Then, the question is what basis schedule one should use to calculate the arrival delays. Does the schedule quality influence the model prediction performance?

To answer these questions, we further examined the influence of bus schedules on arrival delays prediction performance. We used various percentiles (median, 75th, 85th, and 95th) of historical travel times for trips with the same departure time as the segment’s scheduled travel time. Table 7 provides a summary of the impact of different schedules for the northbound direction. Interestingly, the results show that adjusting the schedule design has a negligible impact on bus arrival delay prediction performance (i.e., the model performance is similar regardless of the calculation of scheduled travel time). This is expected from the prediction modeling perspective since the systematic bias induced by the ill-designed time schedule is basically a constant and easily tackled in the prediction. However, it is still essential to carefully design and optimize the scheduled timetable to ensure both timely and safe operations since the timetable can influence the driver’s behavior. For instance, if the schedule is too tight, drivers may feel pressured to stay on time, which could potentially lead to risky driving behavior or compromises in passenger comfort and safety.

Table 7 Influence of different schedules for northbound direction

Impact analysis

Impact of bus operations variables

Delays at the origin stop have a positive impact on the arrival delays of downstream stops due to the propagation of delays along the bus route. Similar findings have been reported in previous studies, for instance, Schmöcker et al. (2016). The delay propagation can result from a range of factors, such as slow boarding times, increased congestion, or slower travel times. Bus line 4 is designed to be regularity-based, which means that buses try to maintain equal intervals between each other instead of following a fixed schedule (Jenelius 2018). Therefore, the delay experienced by preceding trips at the origin stop will also impact the current trip at the origin stop. With more trips affected by the delay, the origin delay may accumulate and increase, resulting in larger delays at downstream stops.

As expected, delays at the nearest upstream stop have a notable effect on current delays, as they can directly propagate to the current stationy. This finding reinforces the notion that delays can have a domino effect, where small delays at one station can accumulate and lead to larger delays at downstream stations. By preventing small delays from accumulating and growing, it is possible to ultimately reduce delays at downstream stations. While delays from further stops have a minimal effect, this can be attributed to the fact that upstream delays further away are absorbed by the delay at the consecutive upstream stop.

The analysis consistently indicates that delays of preceding buses have a statistically positive impact on current bus delays. This suggests the importance of understanding the interactions between buses and how they affect bus arrival delays. Preceding buses typically operate under similar traffic conditions as the current bus and delays or issues with the preceding bus can impact the demand for the current bus service, leading to either more or fewer passengers boarding the current bus at the current stop. For example, delays in preceding buses could result in longer wait times or overcrowding at the current stop, which could in turn impact the demand for the current bus service.

A significant and positive correlation exists between current arrival delays and the actual dwell time at the previous stop. This finding aligns with previous studies (Glick and Figliozzi 2017; Luo et al. 2022), which identified stop dwell time as a significant factor contributing to bus delays. Longer dwell times, resulting from passengers boarding and alighting, can cause departure delays and increase the likelihood of arrival delays at the following stop. Furthermore, for buses traveling towards their final destination in the northbound direction, the impact of dwell time on delays is more pronounced. This may be due to the fact that passengers who boarded at earlier stops are more likely to alight at later downstream stops.

Buses operate within a complex system of traffic conditions and travel patterns, where delays in one section can positively affect subsequent stops. When a bus experiences delay in a previous section, it has less time to complete the remaining sections of its route before its scheduled arrival time at the current stop. This can lead to the bus arriving late at the current stop, causing delays for passengers waiting to board. Additionally, delays at previous sections can also lead to increased passenger demand at the current stop, resulting in longer boarding times and further delaying the bus’s departure. On the other hand, shorter-than-scheduled travel time at previous sections could lead to the bus arriving earlier than expected at the current stop. It is noteworthy that in the southbound direction, the effect of actual travel time at previous sections appears to be mitigated. This could be attributed to the driver having more time to make necessary modifications in subsequent sections of the route, such as adjusting the bus speed, in order to adhere to the schedule.

There is a significant negative correlation between current arrival delays and the scheduled travel time for the current section, which is consistent with the findings of Strathman et al. (2002). Our results indicate that increasing the scheduled running times can reduce bus arrival delays. This is because an increase in scheduled running time provides the bus with more buffer time to accommodate unforeseen delays that may occur during its journey. With more buffer time, the bus can adhere to its schedule even if it experiences minor delays, thereby reducing the overall delay at its arrival time.

To represent the current traffic condition, we take the mean of the actual travel time of preceding buses during the same hour between the upstream and current stops. The study found that current traffic conditions can also contribute to current delays. This positive relationship can be explained by the fact that buses often encounter similar traffic congestion, road conditions, and other factors (e.g., weather, incidents, and emergencies). For example, if preceding buses experience longer-than-normal travel times due to traffic conditions, it is likely that the current bus will also experience delays. Furthermore, the influence of traffic conditions on various stops and directions differs considerably. This can be attributed to the substantial discrepancies in traffic and road conditions across different stop locations, road segments, and directional flows.

The recurrent congestion, as introduced in a previous study (Ma et al. 2015), is a measure of within-day traffic variations based on historical travel time observations. This metric was found to be strongly associated with travel time reliability, and this study has established a significant positive correlation between recurrent congestion and current delays. Unlike current traffic conditions, recurrent congestion is reflective of inherent factors that impact traffic flow and conditions during specific times of the day, such as frequent congestion during morning peak and afternoon peak hours on the same day of the week. Hence, it is understandable that higher levels of recurrent congestion result in longer travel times and increased delays at current stations.

Impact of calendar variables

As expected, weekday operations result in more delays compared to the weekend, as many studies have shown (Ma et al. 2017; Rodriguez-Deniz and Villani 2022; Lee and Miller 2018). Weekdays tend to cause longer bus delays due to increased traffic congestion, higher passenger demand, and a more rigid schedule. The heavy traffic during weekdays, mainly caused by people commuting to and from work, school, and other activities, slows down buses. Additionally, many bus routes have a tight schedule during peak hours on weekdays, leaving little room for deviations. Furthermore, increased passenger demand during weekdays can also contribute to delays as it takes longer for buses to stop and pick up passengers. These factors make it challenging for buses to stay on schedule during weekdays. It is worth noting that not all stops are affected by weekdays, and this can be attributed to the comprehensive set of operations variables that capture traffic conditions on weekdays.

Similarly, peak hours cause more delays compared to off-peak hours, for the same reasons that cause weekday delays. Moreover, the impact of bus route direction during morning peak and afternoon peak periods may differ due to variations in traffic patterns and passenger demand. Buses traveling towards central business districts or other work/school destinations may experience more delays during morning peak hours, while buses traveling away from these areas may experience more delays during afternoon peak hours. In the studied bus route, there was a higher travel demand towards the university (Östra station) during the morning peak hours, indicating that more people were likely commuting to the university at this time. Conversely, during the afternoon peak hours, the demand was higher in the opposite direction, indicating that more people were leaving the university. This pattern of higher demand in one direction during peak hours and lower demand in the opposite direction is common in many urban transport systems and is often driven by commuting patterns and schedules. For the first and last stops, there were fewer delays during peak hours compared to non-peak hours. This could be because the scheduled travel time is longer during peak hours but with less passenger demand and traffic congestion at these two stops.

The influence of seasonal variables on traffic behavior and demand is significant (Eren and Uz 2020), particularly regarding fluctuations in temperature and weather conditions. To prevent collinearity issues arising from seasonal variables and temperature variables, we opted to exclude the seasonal variables.

Impact of weather

Public transportation is known to be affected by weather conditions, however, the effect is more complex compared to private and non-motorized transport modes.

Our study found that colder temperatures and light snow during cold weather were associated with longer delays. Poor traffic conditions can contribute to bus delays during snow and cold weather, as the slippery roads can make it challenging for buses to maneuver and maintain their speed. Previous research has also shown that severe weather conditions can hinder traffic flow by reducing free-flow speeds and triggering congestion (Rehborn and Koller 2014). In addition, a case study conducted in Stockholm demonstrated that winter weather, including snowfall and low temperatures, was associated with longer travel times (Jenelius and Koutsopoulos 2013). Similarly, a study conducted in Harbin, China found that winter weather had a significant impact on bus travel time in cold regions, leading to increased travel times (Wang et al. 2018). Thus, the increase in travel time during cold weather can also contribute to bus delays. It should be noted that the increase in travel time is more likely due to weather conditions rather than increased traffic, as demand levels in Stockholm are typically lower during the winter (Jenelius and Koutsopoulos 2013).

Passenger flow or ridership is the ultimate macroscopic manifestation of weather’s impact on transportation systems. Several studies have indicated that precipitation, whether in the form of rain or snow, can have a negative impact on outdoor activities and travel demand (Zhou et al. 2017b). However, our research found that precipitation did not contribute significantly to bus delays. The variation in the impact of weather on traffic could be attributed to the operational variables, especially the traffic condition variable, which is capable of capturing the changes in traffic conditions caused by precipitation. The effect of weather on traffic can vary depending on the urban spatial layout and geographical conditions. Thus, it is essential to conduct a regression analysis and consider local climate conditions when formulating effective strategies to address weather-related bus delays.

Which model should be trusted?

In this study, we compared the SURE model with the OLS model to further explore the model’s performance. Table 8 presents the estimation results of the OLS model for the northbound direction. While the OLS model and the SURE model show no significant difference in terms of RMSE and R2, there are variations in the coefficients of factors, which raises the question of which model should be trusted.

Table 8 Summary of the OLS model estimation results for the northbound direction

Additionally, taking stop 10 as an example, we compared the importance ranking of variables with the study (Ranjitkar et al. 2019), which analyzed the bus arrival time (equivalent problem with arrival delays) using other models. Table 9 shows the comparison of the importance ranking of variables. The results indicate that the importance ranking of variables varies significantly and highly depends on the choices of variables and models selected in the studies, raising the question of which model should be trusted.

Table 9 Comparison of the importance ranking of variables

The OLS model and the models in the literature (Ranjitkar et al. 2019) assume that each stop along the route is an independent equation that encompasses all bus stops with a general model without considering the correlation between stops. In contrast, the SURE model takes into account the correlation between stops and shared factors such as driver behavior, which can influence arrival delays. “Breusch–Pagan test” section explicitly states that stops along the route are correlated and may share some common factors such as driver behavior. Therefore, the SURE model is more reliable in capturing the complex relationships and dependencies between variables that affect delays in a public transportation system. By comparing the two models, the study provides transportation planners and policymakers with insights for making informed decisions based on more accurate and reliable delay time predictions.

Discussion

The factor of upstream stop delay emerges as the primary contributor to current bus delays, emphasizing the importance of having timely information on delays at the nearest stop. This information provides a more accurate reflection of current traffic conditions and enables effective operations control and driver adjustments. By understanding how delays in preceding buses affect passenger behavior, transit agencies can anticipate and respond to changes in demand for their services. Therefore, ensuring the punctuality of all buses and their on-time arrival at each stop becomes crucial for overall operational advantages.

While analyzing the impact of travel time in the previous section, it becomes evident that transit agencies should consider the intricate interactions between sections and anticipate potential delays. This approach could improve the reliability and efficiency of the services, leading to enhanced passenger experiences and increased usage. The findings regarding scheduled travel time hold significant policy implications for optimal capacity utilization. Allocating more scheduled running times to later stretches of the bus route can absorb accumulated delays and provide flexibility for delay recovery by adjusting bus speeds. This strategy enhances the reliability and efficiency of services, ultimately resulting in higher ridership and customer satisfaction.

Considering the actual travel time of preceding buses as an indicator of current traffic conditions proves to be useful. This information assists transit agencies and bus drivers in adjusting schedules and driving speeds at different stops, thereby providing real-time updates. Recurrent delays serve as an indicator for transport authorities and bus operators to develop schedules that minimize the impact of repeated congestion on bus arrival times by addressing the inherent factors contributing to delays.

Reserving dwell time at stops is a crucial control measure to improve bus punctuality and minimize delays within the bus system. Furthermore, recognizing that the impacts of these factors vary depending on the location of the stops highlights the need to tailor different bus operating strategies to different stops. Formulating a more reasonable timetable requires careful consideration of the specific conditions of each stop section, taking into account factors such as dwell time and recurrent congestion.

To ensure an accurate estimation of the impact of variables on bus delays at each stop location, a seemingly unrelated regression equation (SURE) model is employed in this study. The SURE model takes into account the correlations between contemporaneous model residuals caused by shared unobserved feature variables, such as driver behaviors. This approach allows for a more precise estimation of regression coefficients and helps uncover the specific factors that influence bus delays, along with their relative importance. By utilizing the SURE model, the study provides valuable insights that can inform targeted strategies for reducing delays more effectively.

Regression models offer distinct advantages compared to machine learning or deep learning-based methods for single-step bus delay prediction task (Pang et al. 2018; Büchel and Corman 2021). Firstly, regression models provide interpretable coefficients that allow for insights into the relative importance of predictor variables, making them well-suited for decision-making and policy planning. Additionally, regression models with rich input information demonstrate higher computational efficiency, delivering quick and accurate predictions without requiring extensive computational resources or training time. This makes them particularly suitable for applications such as real-time traffic management systems that require timely and reliable predictions.

The study demonstrates that the explored regression models achieve excellent prediction performance in single-step delay prediction. This finding suggests that employing more intricate approaches may not be necessary, especially considering the interpretability and computational efficiency offered by regression models with comprehensive input information. Such findings have significant implications for the development of real-time traffic management systems, which can greatly benefit from the quick and reasonably accurate predictions provided by regression models.

Conclusion

To better understand the heterogeneous effects of different factors on bus arrival delays, the paper formulates the bus delay prediction problem as a set of regression equations conditional on the bus location. This allows for a more detailed and regression analysis of the heterogeneous impact of factors on bus delays. We also developed the SURE method for simultaneous regression coefficient estimations considering the contemporary correlations of regression residuals.

The case study was conducted on a high-frequency inner-city bus route in Stockholm, Sweden. It shows that developing a group of stop-specific delay prediction models is essential for a deep understanding compared to using a single, generic model. We summarize the empirical findings and practical implications as follows:

  1. 1.

    Various bus operations variables, such as delays at consecutive upstream stops, dwell time, scheduled travel time, recurrent congestion, and current traffic conditions, have been found to have significant impacts on the arrival delays of buses at downstream stops. Since the impacts of these factors vary depending on the location of the stops, it is crucial to tailor different bus operating strategies to different stops.

  2. 2.

    Peak hours and weekdays, which correspond to high demand for both passengers and bus services, were found to have a positive impact on current stop delays. To alleviate congestion during these periods, it would be advantageous to consider implementing strategies such as real-time data-based timetable planning, optimizing traffic signal timings, and implementing dedicated bus lanes.

  3. 3.

    Bus arrival delays are impacted by weather variables, including weather conditions and temperature. To mitigate delays caused by weather-related factors, implementing measures such as dedicated bus lanes and signal priority systems can help to reduce delays during heavy traffic caused by weather events.

One unique insight from our study is that for most factors the impact directions (positive/negative) remain consistent, while their impact levels and the importance ranking of variables vary significantly depending on stop locations. Based on this, generalized management recommendations could be made to reduce bus arrival delays, for example, enhancing the terminal dispatch punctuality. The empirical findings can aid policymakers in making informed decisions to enhance bus punctuality. However, a limitation of the SURE model used in our study is its inability to handle location-specific stationary section characteristics, such as the number of signals, road type, stop type. Moreover, the interpretation of the results is limited to the case study of the high-frequency bus route in Stockholm, Sweden. Future studies should explore more factors that impact arrival delays for more bus lines. Also, advanced interpretable learning-based models could be developed to capture complex interactions and non-linear relationships among explanatory and response variables.