## 3 Results
The root mean square error (\(\varepsilon_{RMS}\)) was employed as the measure of goodness of fit between the _RFC_ and estimated dynamic _GC_:  
\[\varepsilon_{RMS}=\sqrt{\frac{1}{N}\sum_{i=1}^{N}(RFC-GC)^{2}}, \tag{7}\]  
where _RFC_ represents the reference Granger causality value calculated over a predefined time period, and _GC_ represents the estimated dynamic _GC_ value. The root mean square error (\(\varepsilon_{RMS}\)) was chosen as the primary metric for evaluating dynamic _GC_ estimates because of its sensitivity to deviations of varying magnitudes from reference connectivity values, which offers a more comprehensive measure of estimation accuracy. While we also considered mean absolute error (_MAE_), \(\varepsilon_{RMS}\) provided better differentiation between the tested methods due to its squared error component that amplifies larger discrepancies. Figure 3: Dynamic _GC_ values estimated using a sliding window analysis with a window size of 2 s (**a**) and 400 ms (**b**); _RFC_ stands for reference functional connectivity, which is computed for the whole interval of the generated signals [29]. The performance of the model improves with increasing regression order up to a certain point, as higher orders can capture more complex relationships in the data. However, beyond order 9, we observed diminishing returns and an increased risk of overfitting, which negatively affected the generalizability of the model. The selection of order 9 as optimal was based on minimizing the root mean square error across different window sizes, balancing model complexity with estimation accuracy. The change in \(\varepsilon_{RMS}\) error values with respect to different window sizes and regression orders is presented in Figure 4. High \(\varepsilon_{RMS}\) values are observed when using narrower windows and lower regression orders. Figure 5 illustrates the behavior of the estimated dynamic _GC_ value for the minimum \(\varepsilon_{RMS}\) value (window size of 875 ms, \(M_{GC}\) of 9). Figure 6 shows the optimum window size considering \(\varepsilon_{RMS}\) for different \(M_{GC}\) and respective \(\varepsilon_{RMS}\). It can be seen that the optimum window size increases as the order \(M_{GC}\) is increased. Moreover, the minimum value of \(\varepsilon_{RMS}\) is obtained for order 9, and only slightly increases for further increases in the order. The transition time (\(TT\)) metric is calculated as the duration required for the dynamic _GC_ measure to change from 10% to 90% (rise time) of a step change in the reference connectivity value (and the fall time, the time needed to change from 90% to 10%). This metric provides insight into the responsiveness of the connectiv  
Figure 4: \(\varepsilon_{RMS}\) values for window sizes ranging from the minimal value to 3000 ms with a step of 25 ms, and for different regression orders ranging from 5 to 35 with a step of 1. Figure 5: Dynamic _GC_ values estimated using sliding window analysis with a window size of 875 ms, a regression order of 9, and a minimal \(\varepsilon_{RMS}\) value of 0.13.  
which is crucial for real-time monitoring applications, such as brain-computer interfaces (_BCIs_) and neurofeedback, where rapid detection of changes in brain connectivity can enhance system performance. The change in _TT_ values with respect to different window sizes and regression orders is presented in Figure 7. As before, dynamic GC was calculated for various window sizes ranging from the minimal window size to 3000 ms with a step of 25 ms, and for different regression orders (during estimation) \(M_{GC}\) ranging from 5 to 35. Figure 6: Optimum window size in terms of the minimal \(\varepsilon_{RMS}\) with respect to selected regression order \(M_{GC}\) (blue asterisks) and corresponding minimal \(\varepsilon_{RMS}\) (red triangles). Figure 7: _TT_ values for window sizes ranging from the minimal to 3000 ms with a step of 25 ms, and for different regression orders \(M_{GC}\) from 5 to 35.