Dealing with a two sector model

Hi

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.

Thanks
Carlos

This is my model. I use only capital but the idea is to add labor too.

This is the error i get:

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

I hope someone could explain it to me.

Carlos
model.mod (646 Bytes)

Hi;

I’ve solve the previous error but now i got one that i don’t understand.

Blanchard Kahn conditions are not satisfied: indeterminacy

I hope someone could explain it to me. I think that my model is too simple to have a problem with my parameters.

Here is the model corrected, thanks again

Carlos
model.mod (606 Bytes)

Hi,

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).

Best.
model.mod (659 Bytes)

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

i attached the new model.

Thanks

Carlos
model.mod (920 Bytes)

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.

I hope this helps.

Best
model.mod (930 Bytes)

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…

Thanks again, i think i could figure it out.

Carlos

Dear jcaro,

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?

Thank you so much in advance,
Nishi

Dear Nishi;

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.

Regards
Carlos

Dear Carlos,

Thank you very much for yoru detailed and prompt reply.
I will check for the timing in my code and hopefully I can get over this
error.

I really appreciate your kindness.

sincerely,
Nishi

Dear Nishi;

I’m curious, are you working in a two sector model?, i’m getting a lot of trouble trying to get it right, maybe you could help me…

Regards
Carlos

Dear Carlos,

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.

Nishi

Dear Nishi;

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.

Regards
Carlos