I’ve read the previous post on this subject and i still don’t understand how to solve the problem when i put two sectors, i can calculate the steady state but i can’t make simulations or get the policy fuctions. My model is very simple, a real, two sector model of endowment. I take the example1.mod and add another sector just like the first one and also introduce real wage to make an equilibrium on the two kinds of labour. If someone has solve this problem please give me a hint on what is the issue. Later i will post my code.

it’s a pb relative to the timing of the capital variable, k(+1), that you have to write in Dynare at time t in order to make it predetermined in the sense that the capital stock is decided yesterday (take a look at the attached file).

Thanks for the tip, now i get it. However, now i put labor into the model and i think i have the same problem, how to put the variables in the right timing, but i have a diferent error, so i was hoping to get some help;

this is the error:

SOLVE: maxit has been reached
??? Error using ==> steady_
STEADY: convergence problems

Now the timing is correct but looking at your error message we can see the pb is associated with the calculation of the steady state (CV pbs).
You need to check the initial values of each variable in your model. See the mod-file I 'm attaching, the instruction “resid(1)” added before “steady” show you the residuals you obtain in comparison with the guess values. These residuals should be equal (close) to zero.

Thanks again Assia. I’m new with this and i didn’t know that those options existed. I’m wandering if there is a rule to choose the initial values, because no matter how close i get to zero, i’m still getting the same error. I hope you can say something about it, because later i want to do EMM, so i need a model that is stable to the parameters.

Thanks again

Carlos.

PD: I post the model where i change the initial values. model.mod (897 Bytes)

I guessed you did assign starting values as a result of some calculations by hand. I mean the determination of the steady state needs them.
From the top of my hand I would suggest you to find the exact values. I personally choose this way which consists in writing down the analytical solution of each variable in s.s after the instruction “parameters” (or directly into initval) and initializing then the variables at their s.s (e.g C=CSS means the guess value for the consumption,C, is fixed at its s.s value, CSS).

For instance, considering the market condition and production equations, Y=C and Y=L, in s.s we obtain
YSS=LSS;
CSS=YSS;

In general in the literature, we fix the labor LSS=1/3, such that the following should be determined…

I am getting the same error message as you did in May 31.

May31,2007 you wrote:
This is the error i get:

??? Subscript indices must either be real positive integers or logicals.

It seems that you have successfully overcame this error.
If you don’t mind, could you tell me how you overcame this error
message? What was causing this error?

In my case, i got that error because my FONC was time inconsistent. You have to check very carefully that in each equation, the variables are in the right time index, because if you put one of them wrong, then the index is probably a zero, i mean the index in the array or matrix, so the program is trying to find the element zero of that array, that obiously doesn’t exists.

If you want you can submit your model to check, anyway, i think that is the problem. Remember that in the equation for the capital accumulation, all the variables have to be in (-1), except the capital for the next period.

I have taken a brief look at your code and have noticed that you are not log-linearizing the model. DYNARE can, in principle, solve nonlinear system, but I think it is always a good idea to start from the log-linearized system. Good thing about log-linearized system is that, by construction, the steady states of each ‘hat’ enodogenous variables will be zero.

I appreciate the comment. My proyect change somehow so i’m back into paper trying to make everything coherent, however i hope we could still talk, is almost surreal change opinions with someone else who is in the same issues that myself, but so far away.