A different approach for causal impact analysis on Python with Bayesian structural time-series and bidirectional LSTM models

Pasquale Fotia, Massimiliano Ferrara


In this paper, we propose using a combination of two models, the Google model, CasualImpact, and a Bidirectional LSTM, along with an Incremental Difference in Difference model, to infer information from time series data in order to analyse the causal impact of an event on a particular phenomenon over time. Our method identifies the causal influence of a treatment on an outcome variable by comparing the difference in result seen after "sham" therapy, but before genuine treatment. The models are regularly applied to each period of the time series to assess not only the effect of the event that occurred at a certain time t, but also the behaviour of the phenomenon around t. The Google model (CausalImpact) is based on a Bayesian framework, whereas the Bidirectional LSTM model use a neural network. The implementation of the two models in Python is easy to execute, but the cost of data processing time can be substantial. The findings from these two models must then be analysed in conjunction with the incremental difference in difference model in order to assess if the target event at time t had a greater influence than the impact seen for values close to time t. This study aims to integrate the use of these three models and iterate this approach in order to give a thorough analysis of the temporal causal influence of an event on a phenomena.


Causal impact analysis; Bi-LSTM, Deep Learning

Full Text:


DOI: https://doi.org/10.1478/AAPP.1012A12

Copyright (c) 2023 Pasquale Fotia, Massimiliano Ferrara

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.