0

Suppose that I have fitted a linear regression model that takes the following general form:

enter image description here

where Y is my target, i = {1, ...n} is the number of explanatory variables Xs and t, is indexing time. So, is time series. beta is the coefficient of the estimated equation.

I want to do a Historical Variance decomposition to understand the contribution of each X on the evolution of y

For example like this: https://medium.com/bonothesauro/deficits-are-raising-interest-rates-but-other-factors-are-lowering-them-6d1e68776b7a

enter image description here

Can someone help me implement this in R or Python ? So, far I found no source only for VAR models. But I am interested in more simpler linear regressions.

user17880
  • 183
  • 1
  • 11

0 Answers0