Dynare++ optimal policy

Dear All,

I am trying to solve an optimal policy problem with three constraints. I have a few of issues I would appreciate help with.

  1. One of my constraints includes variables (‘zav’, ‘zc’, and ‘rho’ in the attached mod.file) which have mathematical definitions. Am I right to includes the definitions as 3 additional constraints for the problem?

  2. The paper my policy problem is based on states that capital at two different time periods K_t and K_t+1 are choice variables. How do I incorporate this into the problem? I have only come across choice variables occurring at one time period.

  3. Lastly, when I run the model, I get the error ‘A wrong lag/lead of a variable in VarOrdering::do_pbspbfbf’. Could you please help me with what this means?

Please find the mod and m files attached.

Many thanks in advance.
SP_problem_forum.m (153 Bytes)
SP_forum.mod (1.93 KB)

1.) That is impossible to tell without knowing more about these variables. If they are proper variables, you need equations determining them. At the current stage you have 11 variables, but only 3 equations. That seems strange.

2.) A choice variable is always dated time t. What changes is the timing of the other variables in the respective time period. An example would be time to build.

3.) That may have to do with problem 1). Please try to get the mod-file to run with regular Dynare first and then do Dynare++. That way, you have access to more debugging tools.

Dear Dr. Pfeifer,

Many thanks for your reply. I have tried to augment the model to include other definitional equations which I think are relevant. However, I am still experiencing some problems.

Firstly, dynare ++ keeps giving a crash message. Although, the MATLAB window doesn’t actually shut down and the program also provides an answer in the workspace, i’m not sure whether the answer given is accurate because of the prior error message.

Secondly, you suggested that I try using dynare. As far as I understand with dynare, I am not able to run a model that doesn’t have as many endogenous variables as equations. In the model I am working with, there are more variables than equations, which looks consistent with the way the problem is set up in the paper the model is based on. Is there a way I can keep this structure in dynare?

Please find my mod.file attached.

Many thanks.
SP_ver4.mod (2.31 KB)