I have a research project that requires multiple runs of a Dynare model with different data-files, and I’d like to save results after each run as a csv-file.
Would the best practice be to put everything in one .m-script, and use matlab’s
writetable after each run on the relevant parts of the
oo_ structure or is there built-in functionality in Dynare for something similar.
Ideally, you run the loop with a Matlab
m-file and store the results, e.g. in a matrix or a cell before writing them to Excel at the end of the run. But what you describe above will also work. And no, Dynare does not have something prepackaged for this particular case.
Thanks for the answer. I agree it’s a better solution to store everything at once rather than per run. There’s a cli executable to call Matlab from script that I took advantage of like the snippet below. That allows me to interact easily with the output until I learn enough matlab to do it natively.
/Applications/MATLAB_R2015b.app/bin/matlab -nojvm -nosplash -nodesktop -r 'run ./dynare/world_domination_script;exit;'