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

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

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

Postby jack2015 » Fri Jul 17, 2015 2:05 pm

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?
jack2015
 
Posts: 13
Joined: Fri Jul 17, 2015 2:02 pm

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

Postby jpfeifer » Fri Jul 17, 2015 4:34 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

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

Postby jack2015 » Sat Jul 18, 2015 10:58 am

Thank you for answer.
jack2015
 
Posts: 13
Joined: Fri Jul 17, 2015 2:02 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests