Hello,

I am working on a dynamic production network model with 43 industries, where I’m analyzing the effect of a permanent demand shock on a given industry and the transition path to the new steady state. This is a perfect foresight exercise because there is nothing stochastic in my model - hence I’m using the perfect foresight solver. I have a large number of variables due to the size of the network - 217, to be precise.

It’s easy to specify the initial values, because the model is in “exact hat” form (every variable is specified as its proportion relative to its initial steady state), so the initvals are all 1. I can solve for the new steady state (the end values) outside of dynare, but I don’t know how to import those values into dynare to specify the endvals - is there a way to do this?

I have another issue with this model. Dynare throws me the following error:

Index in position 2 is invalid. Array indices must be positive integers or logical values.

Error in dynprodnetmodel.driver (line 437)

set_param_value(‘Delta_1_1’,Delta(i,j));

Error in dynare (line 310)

evalin(‘base’,[fname ‘.driver’]);

Error in checkerdyn (line 94)

dynare dynprodnetmodel.mod

What could be causing this?

I attach two files. In the first one, checkerdyn.m, I construct a simple 2-sector dataset as an example to calibrate my model. The other one, dynprodnetmodel.mod, is the dynare model I’m using. I only included initial values, and not end values, for now.

checkerdyn.m (2.3 KB)

dynprodnetmodel.mod (2.9 KB)