IRIS-Solutions-Team / IRIS-Toolbox

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

Endogenize, exogenize #384

Closed Usukhbayar13 closed 1 year ago

Usukhbayar13 commented 1 year ago

This error message appears when I am doing forecast with new version of Iris. Please help me. What is the problem and how i fix it?

Error using Plan.implementExogenize
The value of 'datesToExogenize' is invalid. It must satisfy the function: @(x)isequal(x,@all)||validate.date(x).

Error in extend.InputParser/parse (line 59)
            parse@inputParser(this, varargin{:});

Error in Plan/implementExogenize (line 219)
            pp.parse(this, dates, names, varargin{:});

Error in Plan/exogenize (line 21)
this = implementExogenize(this, dates, names, opt.SwapLink, unmatched{:});

Error in driver_forecast_baseline (line 215)
sp = exogenize(sp,{'d4l_cpi_f'},startfcast:startfcast+3);

Here is the code I am using.

sp = Plan(m, range);

sp = exogenize(sp,{'d4l_cpi_f'},startfcast:startfcast+3)
sp = endogenize(sp,{'shock_dl_cpi_f'},startfcast:startfcast+3);

And i have another question. If i use 'plan' instead of 'Plan', wil exogenize and endogenize work?

jaromir-benes commented 1 year ago

In the exogenize/endogenize functions of the new Plan objects, you need to use the dates first, and the list of names (preferably specified using the string arrays, not cellstr arrays), e.g.

sp = endogenize(sp, startfcast:startfcast+3, ["shock_dl_cpi_f", "shock_xxx"]);

On Fri, Aug 18, 2023 at 8:46 AM TuM @.***> wrote:

This error message appears when I am doing forecast with new version of Iris. Please help me. What is the problem? Error using Plan.implementExogenize The value of 'datesToExogenize' is invalid. It must satisfy the function: @@.*** https://github.com/ALL)||validate.date(x).

Error in extend.InputParser/parse (line 59) @.***(this, varargin{:});

Error in Plan/implementExogenize (line 219) pp.parse(this, dates, names, varargin{:});

Error in Plan/exogenize (line 21) this = implementExogenize(this, dates, names, opt.SwapLink, unmatched{:});

Error in driver_forecast_baseline (line 215) sp = exogenize(sp,{'d4l_cpi_f'},startfcast:startfcast+3);

Here is the code I am using. sp = Plan(m, range);

sp = exogenize(sp,{'d4l_cpi_f'},startfcast:startfcast+3) sp = endogenize(sp,{'shock_dl_cpi_f'},startfcast:startfcast+3);

— Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVKKUMZW2YP4M47UMDIGDXV4FVRANCNFSM6AAAAAA3VCVG2Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Usukhbayar13 commented 1 year ago

Thank you very much Jaromir. It works.