error

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

error

Postby glucke » Sun Apr 01, 2007 7:16 pm

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) ;
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm

Postby MichelJuillard » Mon Apr 02, 2007 9:25 am

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.

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby glucke » Mon Apr 02, 2007 4:43 pm

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) ;
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm

Postby MichelJuillard » Mon Apr 02, 2007 7:24 pm

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

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby glucke » Tue Apr 03, 2007 5:12 am

These are .mod file and steady file with additional "_" in the name.
Attachments
model__steadystate.m
steady-file
(784 Bytes) Downloaded 84 times
model.mod
mod-file
(2.11 KiB) Downloaded 88 times
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm

Postby MichelJuillard » Tue Apr 03, 2007 3:50 pm

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

You can use
resid(1)

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.

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

3) model_steadystate.m should have only one _ in its name

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

Best

Michel
Attachments
model1.mod
(2.13 KiB) Downloaded 99 times
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby glucke » Tue Apr 03, 2007 8:22 pm

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) ;
Attachments
model_steadystate.m
(800 Bytes) Downloaded 84 times
model.mod
.mod
(2.11 KiB) Downloaded 91 times
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm

Postby MichelJuillard » Thu Apr 05, 2007 1:51 pm

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

Best,

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby glucke » Thu Apr 05, 2007 6:55 pm

It's working.
Thank you very much.
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests