I use a standard New Keynesian model, i would like to run the model with and without (flexible model) nominal rigidities. Then, i would like to use specific variables, i.e. output, of the flexible model as a target variable in the rigid model. Any ideas how to do this while running only a mod. file?
You can invoke dynare twice from a matlab script. By using the macroprocessing language in your mod file and passing macro values on the dynare command line with the -D option you can do what you want. See the manual for the macroprocessing language and dynare invocation options.
Thanks a lot.
I tried this and it works fine.
Actually, there are other ways out.
If the model if not so complex, you can actually calculate the flexible output and get a closed form for the flexible output. And then you can define this flexible output as another variable in the same mod file without using two mod file.
If you have capital in the model, usually, flexible output does not has a closed form solution.