error message

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 message

Postby gir » Mon May 17, 2010 10:15 pm

I receive the following error message when I execute the attached HW1_Macro_pr1.mod file. I am running dynare 4.0.4 on matlab 7.10 (R2010a). Do you know why this is? Thanks.

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.

Starting Dynare ...
Starting preprocessing of the model file ...
7 equation(s) found
Processing derivation ...
Processing Order 1... done
Processing Order 2... done
Processing outputs ...
Preprocessing completed.
Starting Matlab computing ...

??? Error: Unexpected MATLAB operator.

Error in ==> dynare at 102
evalin('base',fname) ;
Attachments
HW1_Macro_pr1.mod
(830 Bytes) Downloaded 67 times
gir
 
Posts: 3
Joined: Mon May 17, 2010 10:06 pm

Re: error message

Postby jpfeifer » Tue May 18, 2010 5:29 am

Hi,
I use Dynare 4.1.1 and your code runs without difficulties. Either you posted the wrong mod-file or there is a problem with your Dynare installation. Try installing Dynare 4.1.1.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: error message

Postby gir » Tue May 18, 2010 2:51 pm

Thanks. I still have the same problem even after installing dynare 4.1.1.

I notice though that when I execute the installation of dynare and the "choose components" window opens up there is a box "Dynare core (pre-processor and M-files)" that is unchecked and that I cannot check. Could this be creating problems?

Thanks
gir
 
Posts: 3
Joined: Mon May 17, 2010 10:06 pm

Re: error message

Postby gir » Tue May 18, 2010 3:37 pm

I have solved my problem. Thanks.
gir
 
Posts: 3
Joined: Mon May 17, 2010 10:06 pm

Re: error message

Postby marcio_fr » Thu Jun 03, 2010 8:56 pm

Hi,

I´m trying to simulate the RBC model from King and Rebelo (2000) - "RESUSCITATING REAL BUSINESS CYCLES" - with Octave. But every time a run the algorithm, the follow mensage appears: "numerical initial values incompatible with the following equations 4 10 13". If someone could help me, I realy appreciated.

Thanks.


% RBC - Modelo Básico

close all;

%---------------------------------------------------
% Definindo as variáveis
%---------------------------------------------------

var y, i, c, k, r, N, w, rs, y_N, ks_Ns, ys_Ns, ks_ys, is_ys, cs_ys;

varexo A;

parameters sigma, b, teta, eta, gama, alpha, delta, rho, sigma_epsilon, Ls, Ns;

%--------------------------------------------------
% Calibração
%--------------------------------------------------

sigma = 1;
b = 0.984;
teta = 3.48;
eta = 1;
gama = 1.004;
alpha = 0.667;
delta = 0.0025;
rho = 0.979;
sigma_epsilon = 0.0072;
Ls = 0.8;
Ns = 0.2;

%-------------------------------------------------
% Modelo
%-------------------------------------------------

model(linear);

% Razões de Steady-State

rs = (gama/(b*(gama)^(1-sigma))) - 1;

ks_Ns = ((1-alpha)/(rs+delta))^(1/alpha);

ys_Ns = (ks_Ns)^(1-alpha);

ks_ys = (ks_Ns)/(ys_Ns);

is_ys = (gama-1+delta)*(ks_ys);

cs_ys = 1 - is_ys;

% Equações do Modelo

y = A + alpha*N + (1-alpha)*k;

(is_ys)*i = (ks_ys)*gama*k(+1) - (1-delta)*(ks_ys)*k;

(cs_ys)*c + (is_ys)*i = y;

r = (gama*(1-c(-1))*(cs_ys)^(-1))/(b*(gama)^(1-sigma)*(1-c)*(cs_ys)^(-1));

w = A + (1-alpha)*(k-N);

(cs_ys)*c + (is_ys)*i = A + alpha*N + (1-alpha)*k;

y_N = y/N;

N = (Ls/eta*Ns)*(w-c);

end;

%-------------------------------------------------
% Computação
%-------------------------------------------------

initval;

y = 0;
i = 0;
c = 0;
k = 0;
r = rs;
N = 0;
w = 0;

end;

shocks;

var A = (1/(1-rho))*sigma_epsilon;

end;

steady;

check;

stoch_simul(hp_filter = 1600, irf = 10, order = 1);
marcio_fr
 
Posts: 22
Joined: Fri Nov 27, 2009 7:14 pm

Re: error message

Postby jpfeifer » Fri Jun 04, 2010 6:02 am

Hi,
if you look for example in equation 4, you divide by ys_Ns. As you did not set it in initval, it is initialized with 0. This results in a division by 0, leading to the error message. Try specifying correct initial values for all endogeneous variables.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests

cron