## 3 Methodology  

### 3.1 Data sources and study period  
The empirical basis for the analysis is the **daily traffic‑volume and crash database maintained by the Estonian Road Administration (MA)**. The dataset contains a record for every calendar day of all road‑traffic crashes that occurred on public roads in Estonia. For this study we extracted observations covering the nine‑year interval **1 January 2010 – 31 December 2018**. This period encompasses both an economically stable phase and a politically active one, during which several traffic‑safety reforms were implemented (e.g., the expansion of the speed‑control system in 2014).

### 3.2 Variables collected  

| Variable | Type | Description |
|----------|------|-------------|
| **traffic_volume** | Quantitative, continuous | Daily number of motorised vehicles recorded on Estonian roads (`DAILY_VEHICLES`). |
| **total_accidents** | Count variable | Total number of registered traffic crashes per day (`TOTAL_ACC`). |
| **fatal_accidents** | Count variable | Number of crashes that resulted in at least one fatality per day (`FATAL_ACC`). |
| **fatalities** | Count variable | Daily count of persons killed in road‑traffic crashes (`DEATHS`). |

All variables are expressed on a **daily level**, which permits fine‑grained temporal and structural analyses.

### 3.3 Data cleaning and preprocessing  

1. **Missing values** – Days with missing traffic‑volume information (e.g., public holidays when no counts were reported) were imputed using the annual mean for that calendar year. Records lacking crash or fatality figures were excluded because they most likely reflected data‑entry errors.  
2. **Outlier detection** – The 1.5 × IQR rule was applied to `total_accidents` and `fatalities`. Days identified as extreme outliers (e.g., large mass‑gathering events) were retained for the main analysis but flagged for later sensitivity testing via bootstrapping.  
3. **Standardisation** – All count variables were transformed into Z‑scores in order to eliminate scale effects before they entered the path model and to facilitate construction of a composite RTS index.  
4. **Serial‑correlation check** – Autocorrelation functions (ACF) for `traffic_volume` indicated a lag‑1 autocorrelation below 0.2; consequently, differencing was deemed unnecessary.

### 3.4 Descriptive statistics  

* **Trend analysis:** Annual means of traffic volume and fatalities were plotted with linear trend lines to visualise long‑term changes.  
* **Correlation matrix:** Pearson’s *r* coefficients among the four daily indicators were computed to assess bivariate relationships prior to structural modelling.  
* **Distribution checks:** Histograms and Q–Q plots for the standardised `fatalities` and `total_accidents` variables were inspected to verify approximate normality, a prerequisite for maximum‑likelihood estimation in path analysis.

### 3.5 Construction of the composite RTS indicator  

The Road‑Traffic Safety (RTS) index was defined as the arithmetic mean of four equally weighted, standardised components:

$$
\text{RTS}_{i}= \frac{
z(\text{road fatality rate}_{i})+
z(\text{fatalities}_{i})+
z(\text{fatal accidents}_{i})+
z(\text{total accidents}_{i})
}{4},
$$

where each *z* denotes the Z‑score of the respective daily measure. By standardising first, every dimension contributes identically to the composite scale.

### 3.6 Structural equation modelling – path analysis  

#### 3.6.1 Model specification  
The hypothesised structural model contains two mediation pathways linking traffic volume to RTS:

```
traffic_volume → total_accidents → RTS
               ↘                ↙
                → fatalities   (indirect effect)
```  


```mermaid
flowchart TD
    A[traffic_volume<br>Liiklusmaht] --> B[total_accidents<br>Õnnetuste sagedus]
    A --> C[fatalities<br>Õnnetuste raskusaste]
    B --> D[RTS<br>Teede liiklusohutus]
    C --> D
    
    style A fill:#e1f5fe,stroke:#01579b,stroke-width:2px
    style B fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
    style C fill:#ffebee,stroke:#b71c1c,stroke-width:2px
    style D fill:#e8f5e8,stroke:#1b5e20,stroke-width:3px
    
    linkStyle 0 stroke:#2196f3,stroke-width:2px
    linkStyle 1 stroke:#f44336,stroke-width:2px
    linkStyle 2 stroke:#2196f3,stroke-width:2px,stroke-dasharray:5 5
    linkStyle 3 stroke:#f44336,stroke-width:2px
```

```mermaid
flowchart TD
    TV[traffic_volume<br>β = 1.00] -->|β = 0.62***| TA[total_accidents]
    TV -->|β = 0.38***| FA[fatalities]
    
    TA -->|β = 0.21*| RTS[RTS<br>R² = 0.64]
    FA -->|β = 0.57***| RTS
    
    subgraph "Indirect Effects"
        IE1[traffic_volume → total_accidents → RTS<br>β = 0.13**]
        IE2[traffic_volume → fatalities → RTS<br>β = 0.22***]
    end
    
    TV -.-> IE1
    TV -.-> IE2
    
    style TV fill:#e1f5fe,stroke:#01579b,stroke-width:3px
    style TA fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
    style FA fill:#ffebee,stroke:#b71c1c,stroke-width:2px
    style RTS fill:#e8f5e8,stroke:#1b5e20,stroke-width:4px
    style IE1 fill:#f5f5f5,stroke:#666,stroke-width:1px,stroke-dasharray:3 3
    style IE2 fill:#f5f5f5,stroke:#666,stroke-width:1px,stroke-dasharray:3 3
    
    linkStyle 0 stroke:#2196f3,stroke-width:3px
    linkStyle 1 stroke:#f44336,stroke-width:3px
    linkStyle 2 stroke:#2196f3,stroke-width:2px,stroke-dasharray:5 5
    linkStyle 3 stroke:#f44336,stroke-width:3px
    linkStyle 4 stroke:#666,stroke-width:1px,stroke-dasharray:3 3
    linkStyle 5 stroke:#666,stroke-width:1px,stroke-dasharray:3 3
```

* **Dependent variable:** `RTS` (composite index).  
* **Mediators:** `total_accidents` (frequency) and `fatalities` (severity).  
* **Exogenous predictor:** `traffic_volume`, which may affect RTS directly through either mediator.

#### 3.6.2 Software and estimation  

| Software | Package / function | Settings |
|----------|--------------------|----------|
| R 4.4    | **lavaan** (`library(lavaan)`) – `sem()` | Maximum‑likelihood estimator, bootstrap standard errors (5 000 resamples). |
| SPSS AMOS 28 | Graphical interface for model drawing and automatic fit‑index computation | Used for visualisation only; identical specification to the lavaan model. |

The lavaan syntax employed was:

```R
model <- '
  # Mediators
  total_accidents ~ a1*traffic_volume
  fatalities      ~ a2*traffic_volume

  # Dependent variable
  RTS             ~ b1*total_accidents + b2*fatalities

  # Indirect effects
  indirect_freq := a1*b1
  indirect_sev  := a2*b2
'
fit <- sem(model, data = clean_data,
           se = "bootstrap", bootstrap = 5000)

summary(fit, fit.measures = TRUE,
        standardized = TRUE,
        rsquare = TRUE, ci = TRUE)
```

#### 3.6.3 Model‑fit assessment  

Fit was evaluated using the conventional criteria (Hu & Bentler, 1999):

* **Chi‑square test** – non‑significant (*p* > 0.05) indicates no substantial misfit.  
* **Root Mean Square Error of Approximation (RMSEA)** – values ≤ 0.05 denote close fit; the 90 % confidence interval was inspected as well.  
* **Comparative Fit Index (CFI)** and **Tucker–Lewis Index (TLI)** – both required to be ≥ 0.95 for acceptable fit.  
* **Coefficient of determination (R²)** for `RTS` was reported to convey explanatory power.

#### 3.6.4 Comparison with a single‑indicator model  

A parsimonious alternative model used only the traditional road‑fatality‑rate as the dependent variable:

```R
simple_model <- '
  RTS_simple ~ traffic_volume
'
fit_simple <- sem(simple_model, data = clean_data,
                  se = "bootstrap", bootstrap = 5000)
```

Fit indices (χ², RMSEA, CFI, TLI) and R² from both models were compared. The differences ΔCFI and ΔRMSEA were computed to determine whether the multi‑indicator specification produced a statistically significant improvement.

### 3.7 Sensitivity and robustness checks  

* **Bootstrap confidence intervals** (95 %) were generated for all standardised path coefficients to assess their stability across resamples.  
* **Leave‑one‑out test:** Days with exceptionally high traffic volumes in 2015 were excluded; the resulting parameter estimates changed by less than 2 %, confirming robustness against extreme observations.

### 3.8 Ethical considerations  

The data are publicly available through Statistics Estonia and the Estonian Road Administration and consist solely of aggregated daily counts; no personal identifiers or vehicle‑specific information are present. Consequently, the study posed no risk to individual privacy. All analytical procedures were conducted in accordance with the ethical guidelines of the Estonian Academy of Sciences.

---  

**Summary of methodology:**  
The investigation employed a thoroughly cleaned, day‑level traffic and crash dataset spanning nine years, constructed a composite RTS index from four standardised indicators, and estimated a structural path model to disentangle the relative influence of accident frequency versus severity. Model fit was assessed with stringent criteria, benchmarked against a traditional single‑indicator approach, and subjected to extensive sensitivity testing, ensuring that the reported findings are both statistically sound and ethically compliant.