Input exogenous variables
Posted: Thu Jun 15, 2006 10:05 am
Dear all,
I tried to input deterministic shocks using the command "shocks" by changing the "example1.mod". This is following code. However, this code didn't work. Please tell me that the way of inputing determistic shocks (exogenous variables) in stochastic simulation.
Best Wishes,
*************************************************************// example 1 from Collard's guide to Dynare
var y, c, k, a, h, b;
varexo u;
varexo_det e;
parameters beta, rho, beta, alpha, delta, theta, psi, tau;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b(-1) + e;
b = tau*a(-1)+rho*b(-1) + u;
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
a = 0;
b = 0;
e = 0;
u = 0;
end;
shocks(shock_file=shocks1);
//var e; stderr 0.009;
//var u; stderr 0.009;
//var e, u = phi*0.009*0.009;
//var e, u = phi*0.009*0.009;
var e;
periods 1:5;
values 0.01;
end;
stoch_simul(linear);
*************************************************************
**********************************
Naohisa Hirakata
Macro Modelling
Research and Statistics Department
Bank of Japan
TEL: +81-3-3279-1111 (ext. 3847)
FAX: +81-3-5255-6758
EMAIL: naohisa.hirakata@boj.or.jp
**********************************
I tried to input deterministic shocks using the command "shocks" by changing the "example1.mod". This is following code. However, this code didn't work. Please tell me that the way of inputing determistic shocks (exogenous variables) in stochastic simulation.
Best Wishes,
*************************************************************// example 1 from Collard's guide to Dynare
var y, c, k, a, h, b;
varexo u;
varexo_det e;
parameters beta, rho, beta, alpha, delta, theta, psi, tau;
alpha = 0.36;
rho = 0.95;
tau = 0.025;
beta = 0.99;
delta = 0.025;
psi = 0;
theta = 2.95;
phi = 0.1;
model;
c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
*(exp(b(+1))*alpha*y(+1)+(1-delta)*k));
y = exp(a)*(k(-1)^alpha)*(h^(1-alpha));
k = exp(b)*(y-c)+(1-delta)*k(-1);
a = rho*a(-1)+tau*b(-1) + e;
b = tau*a(-1)+rho*b(-1) + u;
end;
initval;
y = 1.08068253095672;
c = 0.80359242014163;
h = 0.29175631001732;
k = 5;
a = 0;
b = 0;
e = 0;
u = 0;
end;
shocks(shock_file=shocks1);
//var e; stderr 0.009;
//var u; stderr 0.009;
//var e, u = phi*0.009*0.009;
//var e, u = phi*0.009*0.009;
var e;
periods 1:5;
values 0.01;
end;
stoch_simul(linear);
*************************************************************
**********************************
Naohisa Hirakata
Macro Modelling
Research and Statistics Department
Bank of Japan
TEL: +81-3-3279-1111 (ext. 3847)
FAX: +81-3-5255-6758
EMAIL: naohisa.hirakata@boj.or.jp
**********************************