Could you help me with one problem? When I’m trying to check the model, DYNARE(at Matlab) shows error(see at the end).
I have Russian version of matlab. Error message talk that indexes must be natural number.
At dr1.m some of k0 are equal to zero. As I understand, “iy_” represents presents of lags, expectations ant current variables at system of equations (k0 is reordered row from that matrix as I understand).
At my model, when I use stationary variables, 2 of them exist only at form of future value expectation. Could you recommend me how to be? What could I do for checking and estimation of the model?

PS great thanks for help

the error message:

??? Индексы должны быть либо действительными положительными целыми, либо логическими.

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\matlab\dr1.m
В строке 139 ==> b = jacobia_(:,k0);

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\matlab\resol.m
В строке 48 ==> [dr,info] = dr1(dr,check_flag);

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\matlab\check.m
В строке 18 ==> [dr, info] = resol(ys_,1);

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\modeli\model.m
В строке 144 ==> check;

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\matlab\dynare.m
В строке 26 ==> evalin(‘base’,fname) ;

For a long time, I thought that no good model could be written without every variable being present at period t. This was wrong, such models do exist.

You should try to use Dynare version 4 snapshot with them. It is not possible to deal with them with Dynare version 3.



I’ve tried to use DYNARE4. But it shows new error message.
It shows warning about dividing by zero, and after that error message. This error happens at calculation of steady-state. Then I turn off my steady-state calculation (because there are some differences at DYNARE4, so I am not sure, that form of output of my steady-state is correct). But It doesn’t help (I use Steady-state values as initial). DYNARE shows same error.

What could I do for solving this problem?

Warning message:

Предупреждение: Деление на ноль.
(Type “warning off MATLAB:divideByZero” to suppress this warning.)

In C:\MATLAB6p5\work\dynare_4\07-04-02\solve1.m at line 86
In C:\MATLAB6p5\work\dynare_4\07-04-02\dynare_solve.m at line 73
In C:\MATLAB6p5\work\dynare_4\07-04-02\steady_.m at line 45
In C:\MATLAB6p5\work\dynare_4\07-04-02\steady.m at line 13
In C:\MATLAB6p5\work\dynare_v3\modeli\model.m at line 206
In C:\MATLAB6p5\work\dynare_4\07-04-02\dynare.m at line 49

Error message:

??? Ошибка использования ==> lnsrch1
Some element of Newton direction isn’t finite. Jacobian maybe singular or there is a problem with initial values

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\solve1.m
В строке 93 ==> [x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\dynare_solve.m
В строке 73 ==> [x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,varargin{:});

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\steady_.m
В строке 45 ==> [oo_.steady_state,check] = dynare_solve([M_.fname ‘_static’],…

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\steady.m
В строке 13 ==> steady_;

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\modeli\model.m
В строке 206 ==> steady;

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\dynare.m
В строке 49 ==> evalin(‘base’,fname) ;

Could you send me your *.mod file, please?



These are .mod file and steady file with additional “_” in the name.
model__steadystate.m (784 Bytes)
model.mod (2.11 KB)

  1. There are errors in model.mod that do that the coded model doesn’t have a steady state.

You can use

to check whether the values declared in initval or returned by model_steadystate.m satisfy the steady state equation. Look at model1.mod for usage.

  1. I spot a typo on equation 4 where q1_R should be q1_N but there must be more

  2. model_steadystate.m should have only one _ in its name

  3. For simulation with stoch_simul, initval provides the same information as model_steadystate.m. For estimation, it is necessary to have model_steadystate.m because the steady state needs to be recomputed quickly for many different values of the parameters.


model1.mod (2.13 KB)

Great thanks for informing about mistakes at steady-state calculation (I forgot about few “exp”, because calculations on paper was made with other variables).
So there is no problem with steady-state calculations now. I attached mod and steady-state files.

But we came back to initial error. When I tried to check model, I see mistake about natural indexes. Could you give any ideas about it?

Error message:
??? Индексы должны быть либо действительными положительными целыми, либо логическими.

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\dr1.m
В строке 120 ==> b = jacobia_(:,k0);

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\resol.m
В строке 61 ==> [dr,info] = dr1(dr,check_flag);

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\check.m
В строке 23 ==> [dr, info] = resol(oo_.steady_state,1);

Ошибка в ==> C:\MATLAB6p5\work\dynare_v3\modeli\model.m
В строке 207 ==> check;

Ошибка в ==> C:\MATLAB6p5\work\dynare_4\07-04-02\dynare.m
В строке 49 ==> evalin(‘base’,fname) ;
model_steadystate.m (800 Bytes)
model.mod (2.11 KB)

There is still a problem with models where some variables aren’t present at the current period, even in version 4.

For the time being, put these variables somewhere in the model and multiply them by zero so that they don’t have any effect but are formally present in the model



It’s working.
Thank you very much.