Page 1 of 1

How call a function outside of .Mod file of Dynare?

PostPosted: Fri Jul 17, 2015 2:05 pm
by jack2015
How we can call a function (for example dynare_sensitivity();) in command prompt of MATLAB not in .Mod file of Dynare? I can see function in Command Prompt but How can i use it? Suppose that I simulate and estimate my model using mod file. Now I want sensitivity analysis or identification using command prompt of MATLAB. How can I do this?

Re: How call a function outside of .Mod file of Dynare?

PostPosted: Fri Jul 17, 2015 4:34 pm
by jpfeifer
You can do this, but is not recommended for high-level Dynare commands. You can find the correct way to call Dynare functions in the header of the respective m-file.
For dynare_sensitivity.m, this is
function x0=dynare_sensitivity(options_gsa)


So the call would be
Code: Select all
dynare_sensitivity(options_gsa)

where options_gsa is the options structure created by the Dynare preprocessor and passed to the function dynare_sensitivity command. This is the tricky part as you would have to manually set this options structure if you try to directly call it.

Re: How call a function outside of .Mod file of Dynare?

PostPosted: Sat Jul 18, 2015 10:58 am
by jack2015
Thank you for answer.