Page 1 of 1

Matlab and Dynare

PostPosted: Thu Mar 29, 2007 7:12 am
by Tike
Hi,

it's the first time that I use Matlab and Dynare. So, you can imagine that it is extremely difficult for me to run anything on matlab. I even have problems from the beginning - sorry to bother you with these very easy questions - but can someone help me started?
Whatever I do in Matlab, I can't open any of the files with extension .mod. So, I even can't open example1.mod. I always get the following message:

??? error using ==> dynare
DYNARE: could not open Example1.mod

Perhaps if I can open these example files I can learn the programme?

Tike

PostPosted: Thu Mar 29, 2007 8:53 am
by iacobellisf
Hi Tike,

when you want to open a file you have to go into the folder where the .mod file is. Chances are that this might be the problem.

On the left side of Matlab there is a section that allows to browse through folders and get into the folder where the .mod file is.

Best,

Fabrizio

PostPosted: Thu Mar 29, 2007 8:59 am
by Tike
Hi Fabrizio,

thank you very much for this fast answer. This makes indeed a huge difference. Now, I can open all existing files of Dynare.

But how can I make my own files. Finally, I need to work with my own model en so I need to make my own files, no?

Tike

PostPosted: Thu Mar 29, 2007 9:14 am
by iacobellisf
Tike,

My suggestion would be to familiarize with the example1.mod file. The of course you can start building your own model once you ahve derived it, I mean you derive your own DSGE model and then you input into "Dynare" language using the manual you can find in the website.

My suggestion is also to start buiding a very simple model, then run it and if everything is ok start addign new features to it and check everytime if everything is ok. This, at least, until you become confident enought with Dynare and most of all the DSGE theory. Recall that when you create your own file it must have ".mod" extension, and not the ".m" extension.

Best,

Fabrizio

PostPosted: Thu Mar 29, 2007 11:56 am
by Tike
Hi Frabrizio,

thank you very much. I begin to understand the most easy models on the site... ramst.mod; rbc.mod; ...

I wonder: How many equations can you use or do you need to use for declaring the model? Do you only have to write the first order conditions or can you give more information? Is it possible to write too many equations? I have read that you have to hand in as many equations as there are endogenous variables... but is it a problem if you would write more equations?

Tike

PostPosted: Thu Mar 29, 2007 1:25 pm
by iacobellisf
Tike,

You can use as many equtions as you model need, it depends whether it is a small or large model. Yes, you use the FOC. Looc at the model I put up for a Ramsey stochastic economy and you'll get another idea of what it is going on. I think the best answer to your question would come once you derive and solve the model first with pencil and paper. That is you first derive the FOC. Then you will input them into dynare.

Hope this helps.

Fabrizio

PS

Try to look at all the example files that are on the forum. To look at them you need to login first. They will give you a better idea on how to model.