Capturing Road-Level Heterogeneity in Crash Severity on Rural Two-Lane Highways: A Multilevel Statistical and Machine-Learning Analysis
Crash severity may vary across roads because crashes on the same road share contextual characteristics not fully represented by observed variables. This study examined road-level heterogeneity using 19,956 police-reported crashes from 100 rural two-lane highways in Iran during 2021-2024. Single-level logistic regression was compared with random-intercept and random-coefficient multilevel logistic models. A regression-based mixed-effects random forest (MERF) was also used for an exploratory assessment of nonlinear predictive relationships and road-level patterns. The null multilevel model produced an intraclass correlation coefficient of 20.3 percent, indicating meaningful latent between-road variation in crash severity. Pavement condition had the largest estimated random-slope variance, followed by lighting condition, driver education, and driver age. Logistic road-level random intercepts ranged from -2.87 to +1.51 on the log-odds scale. In a comparison excluding road-specific information, the ten-variable MERF random-forest component achieved an AUC of 0.701, compared with 0.638 for single-level logistic regression. Retaining MERF road-level corrections for roads represented during training increased AUC to 0.763. MERF road-level corrections were strongly associated with logistic random intercepts (Pearson r = 0.892; Spearman rho = 0.931), indicating similar relative road patterns, although the estimates are not numerically equivalent. The findings support complementary use of multilevel and nonlinear models. Road-level estimates may help prioritize further investigation, but they do not measure crash frequency, total road risk, or causal effects.