IRIS-Solutions-Team / IRIS-Toolbox

[IrisToolbox] for Macroeconomic Modeling
Other
92 stars 42 forks source link

Initial conditions in shock decomposition #220

Open AndreyDO opened 4 years ago

AndreyDO commented 4 years ago

Hi, guys!

I'm doing a shock decomposition exercise via the command 'simulate'. Why might the contribution of 'initial conditions & constant' term increase over time while theoretical autocorrelation for the variable that is being decomposed is below unity?

Best, Andrey Orlov

jaromir-benes commented 4 years ago

Hi Andrey

It's increasing because it's a combined contribution of both the initial condition AND the constant term (which is added every period). The contribution of the initial condition alone would be decreasing over time but the constant term is added every period.

Let's say you have an autoregressive equation x = 0.9*x{-1} + 1 + shock;

If you start your simulation from x=0, then the contribution of the initial cond+constant term is

1, 1.9, 2.71, 3.439, ..., 10

Note that the contributions will depend on the value of the initial condition itself - if you instead start at x=10, then the contributions will remain constant

10, 10, 10, ....

while starting above 10 will produce a declining contribution.

Best Jaromir

On Wed, Oct 23, 2019 at 11:33 AM AndreyDO notifications@github.com wrote:

Hi, guys!

I'm doing a shock decomposition exercise via the command 'simulate'. Why might the contribution of 'initial conditions & constant' term increase over time while theoretical autocorrelation for the variable that is being decomposed is below unity?

Best, Andrey Orlov

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKS4S5Y5DZONAMIHMW3QQAK5TA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HTYIISQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKXS4TEGBUPP2FCBDYTQQAK5TANCNFSM4JD6RUYA .

AndreyDO commented 4 years ago

Thanks for the clarification, Jaromir! Just one question more :). This constant term, is it the same as the steady-state value of the variable?

jaromir-benes commented 4 years ago

Not exactly. Using the previous example again, the relationship between the constant term and the steady state of a variable depends also on the autoregression

x = rho * x{-1} + const + shock

x_ss = const / (1 - rho)

(assuming rho is stable)

Best Jaromir

On Wed, Oct 23, 2019 at 1:26 PM Andrey Orlov notifications@github.com wrote:

Thanks for the clarification, Jaromir! Just one question more :). This constant term, is it the same as the steady-state value of the variable?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKWPPWBLQ4RQSC7X2F3QQAYERA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECBBZZA#issuecomment-545397988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKVEIBNBBEPBFYM4AMLQQAYERANCNFSM4JD6RUYA .

AndreyDO commented 4 years ago

Got it! Thanks!

ripatti commented 4 years ago

Strangely, I get complex numbers as the contribution of 'initial conditions & constant' term (imaginary part is "large"). Is this related to some trends (there should not be one) or non stationary (there should not be one)?

jaromir-benes commented 4 years ago

Strange, indeed. Can you please share the codes (or a simplified variant of those)?

Thanks Mirek

On Sun, Jan 12, 2020 at 12:35 PM Antti Ripatti notifications@github.com wrote:

Strangely, I get complex numbers as the contribution of 'initial conditions & constant' term (imaginary part is "large"). Is this related to some trends (there should not be one) or non stationary (there should not be one)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKR7CLAXILICKPREW7DQ5L57BA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWXXPY#issuecomment-573406143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKXH5AGBZG26Q5OV5DTQ5L57BANCNFSM4JD6RUYA .

ripatti commented 4 years ago

Thanks for the prompt reply Mirek!

I forgot to add important info: this concerns Iris version iris20180629 Since this is part of a large codebase (BOF model code environment), I have not yet been able to test it with newer version. I will try this first and then try to isolate the problem to a smaller set. I figured out the problem after changing two data series.

I will come back later.

Cheers,

Antti

su 12. tammik. 2020 klo 14.58 Jaromír Beneš (notifications@github.com) kirjoitti:

Strange, indeed. Can you please share the codes (or a simplified variant of those)?

Thanks Mirek

On Sun, Jan 12, 2020 at 12:35 PM Antti Ripatti notifications@github.com wrote:

Strangely, I get complex numbers as the contribution of 'initial conditions & constant' term (imaginary part is "large"). Is this related to some trends (there should not be one) or non stationary (there should not be one)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKR7CLAXILICKPREW7DQ5L57BA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWXXPY#issuecomment-573406143 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AGCVKKXH5AGBZG26Q5OV5DTQ5L57BANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AADFU44VLYHP37366ZLXOB3Q5MHX5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWZMRI#issuecomment-573412933, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADFU46KGIRHRIAQTOCFEHDQ5MHX5ANCNFSM4JD6RUYA .

jaromir-benes commented 4 years ago

Ok, Antti - I'll wait for you message...

On Sun, Jan 12, 2020 at 8:50 PM Antti Ripatti notifications@github.com wrote:

Thanks for the prompt reply Mirek!

I forgot to add important info: this concerns Iris version iris20180629 Since this is part of a large codebase (BOF model code environment), I have not yet been able to test it with newer version. I will try this first and then try to isolate the problem to a smaller set. I figured out the problem after changing two data series.

I will come back later.

Cheers,

Antti

su 12. tammik. 2020 klo 14.58 Jaromír Beneš (notifications@github.com) kirjoitti:

Strange, indeed. Can you please share the codes (or a simplified variant of those)?

Thanks Mirek

On Sun, Jan 12, 2020 at 12:35 PM Antti Ripatti <notifications@github.com

wrote:

Strangely, I get complex numbers as the contribution of 'initial conditions & constant' term (imaginary part is "large"). Is this related to some trends (there should not be one) or non stationary (there should not be one)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKR7CLAXILICKPREW7DQ5L57BA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWXXPY#issuecomment-573406143

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AGCVKKXH5AGBZG26Q5OV5DTQ5L57BANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AADFU44VLYHP37366ZLXOB3Q5MHX5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWZMRI#issuecomment-573412933 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADFU46KGIRHRIAQTOCFEHDQ5MHX5ANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKQUNH6K6ORSKNAITFTQ5NYB5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXCSHA#issuecomment-573450524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKX5C33ZB4GRWAFBHDTQ5NYB5ANCNFSM4JD6RUYA .

ripatti commented 4 years ago

This was my mistake. I manage to recycle my data such that - in the end - I took log of negative numbers. Embarrassing. Sorry for bothering you.

Best,

Antti

su 12. tammik. 2020 klo 22.13 Jaromír Beneš (notifications@github.com) kirjoitti:

Ok, Antti - I'll wait for you message...

On Sun, Jan 12, 2020 at 8:50 PM Antti Ripatti notifications@github.com wrote:

Thanks for the prompt reply Mirek!

I forgot to add important info: this concerns Iris version iris20180629 Since this is part of a large codebase (BOF model code environment), I have not yet been able to test it with newer version. I will try this first and then try to isolate the problem to a smaller set. I figured out the problem after changing two data series.

I will come back later.

Cheers,

Antti

su 12. tammik. 2020 klo 14.58 Jaromír Beneš (notifications@github.com) kirjoitti:

Strange, indeed. Can you please share the codes (or a simplified variant of those)?

Thanks Mirek

On Sun, Jan 12, 2020 at 12:35 PM Antti Ripatti < notifications@github.com

wrote:

Strangely, I get complex numbers as the contribution of 'initial conditions & constant' term (imaginary part is "large"). Is this related to some trends (there should not be one) or non stationary (there should not be one)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKR7CLAXILICKPREW7DQ5L57BA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWXXPY#issuecomment-573406143

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AGCVKKXH5AGBZG26Q5OV5DTQ5L57BANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AADFU44VLYHP37366ZLXOB3Q5MHX5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWZMRI#issuecomment-573412933

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AADFU46KGIRHRIAQTOCFEHDQ5MHX5ANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKQUNH6K6ORSKNAITFTQ5NYB5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXCSHA#issuecomment-573450524 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AGCVKKX5C33ZB4GRWAFBHDTQ5NYB5ANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AADFU424UHHHDIN3YQ574DLQ5N2XNA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXDBHQ#issuecomment-573452446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADFU45WPHWYP4JIWCQYECLQ5N2XNANCNFSM4JD6RUYA .

jaromir-benes commented 4 years ago

Happens all the time... :)

On Tue, Jan 14, 2020 at 4:19 PM Antti Ripatti notifications@github.com wrote:

This was my mistake. I manage to recycle my data such that - in the end - I took log of negative numbers. Embarrassing. Sorry for bothering you.

Best,

Antti

su 12. tammik. 2020 klo 22.13 Jaromír Beneš (notifications@github.com) kirjoitti:

Ok, Antti - I'll wait for you message...

On Sun, Jan 12, 2020 at 8:50 PM Antti Ripatti notifications@github.com wrote:

Thanks for the prompt reply Mirek!

I forgot to add important info: this concerns Iris version iris20180629 Since this is part of a large codebase (BOF model code environment), I have not yet been able to test it with newer version. I will try this first and then try to isolate the problem to a smaller set. I figured out the problem after changing two data series.

I will come back later.

Cheers,

Antti

su 12. tammik. 2020 klo 14.58 Jaromír Beneš (notifications@github.com) kirjoitti:

Strange, indeed. Can you please share the codes (or a simplified variant of those)?

Thanks Mirek

On Sun, Jan 12, 2020 at 12:35 PM Antti Ripatti < notifications@github.com

wrote:

Strangely, I get complex numbers as the contribution of 'initial conditions & constant' term (imaginary part is "large"). Is this related to some trends (there should not be one) or non stationary (there should not be one)?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKR7CLAXILICKPREW7DQ5L57BA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWXXPY#issuecomment-573406143

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AGCVKKXH5AGBZG26Q5OV5DTQ5L57BANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AADFU44VLYHP37366ZLXOB3Q5MHX5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWZMRI#issuecomment-573412933

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AADFU46KGIRHRIAQTOCFEHDQ5MHX5ANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKQUNH6K6ORSKNAITFTQ5NYB5A5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXCSHA#issuecomment-573450524

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AGCVKKX5C33ZB4GRWAFBHDTQ5NYB5ANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AADFU424UHHHDIN3YQ574DLQ5N2XNA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXDBHQ#issuecomment-573452446 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADFU45WPHWYP4JIWCQYECLQ5N2XNANCNFSM4JD6RUYA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220?email_source=notifications&email_token=AGCVKKUSIV7FQ3TT5LCEYP3Q5XJYTA5CNFSM4JD6RUYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI47SVI#issuecomment-574224725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKVJKDQRIAQ7B32YFCLQ5XJYTANCNFSM4JD6RUYA .

nfaqs commented 2 years ago

Hi,

Is it possible within IRIS to separate the contribution of initial conditions from the contribution of constants? I checked the tutorials

https://github.com/IRIS-Solutions-Team/Tutorial-Simple-SPBC-Model/blob/master/run15_filterHistData.m

and

https://github.com/IRIS-Solutions-Team/Tutorial-Simple-SPBC-Model/blob/master/run16_moreKalmanFilter.m

and don't see any documentation of that, but perhaps I missed something.

Thanks!

jaromir-benes commented 2 years ago

No, unfortunately not. The main reason is that it would make sense only in stationary models. In models with one or multiple unit roots or log unit roots, the initial conditions would have to be expresses in terms of some underlying deviations of cointegrating combinations of variables, plus arbitrary terms related to the underlying unit root processes (there are, in general, infinitely many representations/rotations separating unit-root processes, corresponding to the infinitely many Schur decompositions).

If you have a stationary model, you can run this manually, by setting up a number of simulations with replacing all initials with their steady state values except one at a time.

Best, Jaromir

On Thu, Dec 16, 2021 at 7:50 PM nfaqs @.***> wrote:

Hi,

Is it possible within IRIS to separate the contribution of initial conditions from the contribution of constants? I checked the tutorials

https://github.com/IRIS-Solutions-Team/Tutorial-Simple-SPBC-Model/blob/master/run15_filterHistData.m

and

https://github.com/IRIS-Solutions-Team/Tutorial-Simple-SPBC-Model/blob/master/run16_moreKalmanFilter.m

and don't see any documentation of that, but perhaps I missed something.

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/220#issuecomment-996086415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKWDU2UIHEKMLMLE73LURIYH7ANCNFSM4JD6RUYA . You are receiving this because you commented.Message ID: @.***>