Page 1 of 1

automating input to conditional forecast command

PostPosted: Wed May 10, 2017 5:36 am
by clauper
Dear all,

I would like to automate conditional forecasts, such that I don't have to manually insert the vector of values into my .mod file.

The only way I can think of is to invoke the underlying matlab function icforecast(..) after I have run the estimation in dynare. Are there any caveats/problems with this approach?

Thanks in advance!

Re: automating input to conditional forecast command

PostPosted: Wed May 10, 2017 1:55 pm
by jpfeifer
That should work. A potential problem may be the global variables used by
Code: Select all
imcforecast
. You need to make sure they exist and are correctly set. The previous estimation-command you suggest should do that. What exactly do you mean with
automate
?

Re: automating input to conditional forecast command

PostPosted: Wed May 10, 2017 3:48 pm
by clauper
By automate I mean to have a routine that lets me do conditional forecasting for different (vectorized) variable paths without manually copying them to the "values"-line in the conditional_forecast block of the .mod file. Thanks for your help!

Re: automating input to conditional forecast command

PostPosted: Fri May 12, 2017 6:28 am
by jpfeifer
Yes, in that case you need to set the input argument
Code: Select all
constrained_paths

of the
Code: Select all
imcforecast

function.