Page 1 of 1
Dealing with a two sector model
Posted:
Wed May 30, 2007 3:16 pm
by jcaro
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
Re:
Posted:
Thu May 31, 2007 1:17 am
by jcaro
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
Re:
Posted:
Thu May 31, 2007 3:15 am
by jcaro
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
Posted:
Thu May 31, 2007 9:22 am
by Assia
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.
Re
Posted:
Fri Jun 01, 2007 4:16 am
by jcaro
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
Posted:
Fri Jun 01, 2007 12:32 pm
by Assia
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
re:
Posted:
Fri Jun 01, 2007 7:05 pm
by jcaro
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.
Posted:
Fri Jun 01, 2007 9:21 pm
by Assia
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...
re:
Posted:
Sat Jun 02, 2007 8:04 pm
by jcaro
Thanks again, i think i could figure it out.
Carlos
Posted:
Wed Jun 06, 2007 3:21 pm
by nishi
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
RE:
Posted:
Wed Jun 06, 2007 4:34 pm
by jcaro
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
Posted:
Wed Jun 06, 2007 5:41 pm
by nishi
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
re:
Posted:
Thu Jun 07, 2007 1:52 am
by jcaro
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
Posted:
Thu Jun 07, 2007 8:33 pm
by nishi
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
Re:
Posted:
Fri Jun 08, 2007 12:47 am
by jcaro
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