Replies: 2 comments 1 reply
-
Could you please post the files? Jaromir
…On Mon, Nov 14, 2022 at 4:42 PM pfjulio ***@***.***> wrote:
Dear Jaromir,
I used to run this piece of code in earlier versions of IRIS, but now I am
getting an error. Has the syntax changed or am I doing anything wrong?
pshadow = Plan(m,qq(2022,1):qq(2025,4),'anticipate=',false);
pshadow = condition(pshadow,qq(2022,1):qq(2025,4),'GDP_GRWTH');
I get the following error:
*** This name cannot be conditioned upon in the simulation Plan: GDP_GRWTH
This error holds for any endogenous variable I select.
Best
Paulo Júlio
—
Reply to this email directly, view it on GitHub
<#351>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGCVKKVE2HZWWZMRQ262PSTWIJMUXANCNFSM6AAAAAAR76VLCU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi - the syntax has indeed changed (sorry about that - but for a good
reason :)
p = Plan.forModel(m, range, method="condition");
p = exogenize(p, qq(2020,1):qq(2021,4), "variable_name");
p = endogenize(p, qq(2020,1):qq(2022,4), ["shock1_name", "shock2_name",
...]);
How it works:
Conditioning means simply exogenizing a smaller number of variables than
the number of shocks. This is by default not allowed in Iris (because this
is rather a rare case, and from my practical experience, if you have
#variables<#shocks, it's most of the time a mistake by the coder/economist,
so Iris throws an error for your benefit).
To allow conditioning, you have to specify that explicitly when creating
the Plan object, hence
method="condition" (by default, method="exogenize" meaning you have to have
#variables==#shocks)
Then, you exogenize/endogenize whatever you want. Only those shocks
explicitly listed will be used. This last point was exactly the reason why
we abandoned the function "condition" - it didin't allow to easily select
the shocks participating in the conditioning (you had to do it through
their stds).
Lastly, note that the date ranges can be different for each variable and
each shock... You could e.g. have
p = Plan.forModel(m, range, method="condition");
p = exogenize(p, qq(2020,1):qq(2021,4), "variable_name");
p = endogenize(p, qq(2020,1):qq(2022,4), ["shock1_name", ...]);
p = endogenize(p, qq(2022,3):qq(2023,1), ["shock2_name", ...]);
And of course, the anticipation status of the shocks matter.
Hope this helps
Best
Jaromir
…On Mon, Nov 14, 2022 at 6:27 PM pfjulio ***@***.***> wrote:
Code_model.zip
<https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/files/10005499/Code_model.zip>
Here is a simplified version of the code where this occurs.
—
Reply to this email directly, view it on GitHub
<#351 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGCVKKUQBO4BAX77NVY2YT3WIJY67ANCNFSM6AAAAAAR76VLCU>
.
You are receiving this because you commented.Message ID:
<IRIS-Solutions-Team/IRIS-Toolbox/repo-discussions/351/comments/4139183@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Jaromir,
I used to run this piece of code in earlier versions of IRIS, but now I am getting an error. Has the syntax changed or am I doing anything wrong?
pshadow = Plan(m,qq(2022,1):qq(2025,4),'anticipate=',false);
pshadow = condition(pshadow,qq(2022,1):qq(2025,4),'GDP_GRWTH');
I get the following error:
*** This name cannot be conditioned upon in the simulation Plan: GDP_GRWTH
This error holds for any endogenous variable I select.
Best
Paulo Júlio
Beta Was this translation helpful? Give feedback.
All reactions