by 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);