Page 1 of 1

Dynare++ example file not working

PostPosted: Thu May 28, 2015 5:56 pm
by Ana
Hi,

I am trying to run the example Dynare++ mode file by inputting "Dynare++ [example.mod]" into the Matlab command window as advised. However, Matlab gives the error:

"Error using dynare
Too many output arguments"

The example file provided is below. Can someone help?

Thanks very much,
Ana

------------------------------------
// Dynare ++ Example file taken from website

var C G K TAU Z;
varexo EPS;
parameters eta beta alpha delta phi a rho;

eta = 2;
beta = 0.99;
alpha = 0.3;
delta = 0.10;
phi = 2.5;
a = 0.1;
rho = 0.7;

planner_objective C^(1-eta)/(1-eta) + a*G^(1-phi)/(1-phi);
planner_discount beta;

model;
K = (1-delta)*K(-1) + (exp(Z(-1))*K(-1)^alpha - C(-1) - G(-1));
G = TAU*alpha*K^alpha;
Z = rho*Z(-1) + EPS;
C^(-eta) = beta*C(+1)^(-eta)*(1-delta +
exp(Z(+1))*alpha*K(+1)^(alpha-1)*(1-alpha*TAU(+1)));
end;

initval;
TAU = 0.70;
K = ((delta+1/beta-1)/(alpha*(1-alpha*TAU)))^(1/(alpha-1));
G = TAU*alpha*K^alpha;
C = K^alpha - delta*K - G;
Z = 0;

order = 4;
vcov = [
0.01
];

Re: Dynare++ example file not working

PostPosted: Fri May 29, 2015 3:11 pm
by jpfeifer
Dynare++ is not called from Matlab. If you try to call it from Matlab, you have to preface the call with a "!",
Code: Select all
!dynare++ example.mod

Re: Dynare++ example file not working

PostPosted: Sat Jul 09, 2016 12:54 pm
by Wenli Xu87
Dear Ana,
I am trying to use dynare++ in matlab, and there is the same problem as yours.
Can you help me?
Thank you very much!

Ana wrote:Hi,

I am trying to run the example Dynare++ mode file by inputting "Dynare++ [example.mod]" into the Matlab command window as advised. However, Matlab gives the error:

"Error using dynare
Too many output arguments"

The example file provided is below. Can someone help?

Thanks very much,
Ana

------------------------------------
// Dynare ++ Example file taken from website

var C G K TAU Z;
varexo EPS;
parameters eta beta alpha delta phi a rho;

eta = 2;
beta = 0.99;
alpha = 0.3;
delta = 0.10;
phi = 2.5;
a = 0.1;
rho = 0.7;

planner_objective C^(1-eta)/(1-eta) + a*G^(1-phi)/(1-phi);
planner_discount beta;

model;
K = (1-delta)*K(-1) + (exp(Z(-1))*K(-1)^alpha - C(-1) - G(-1));
G = TAU*alpha*K^alpha;
Z = rho*Z(-1) + EPS;
C^(-eta) = beta*C(+1)^(-eta)*(1-delta +
exp(Z(+1))*alpha*K(+1)^(alpha-1)*(1-alpha*TAU(+1)));
end;

initval;
TAU = 0.70;
K = ((delta+1/beta-1)/(alpha*(1-alpha*TAU)))^(1/(alpha-1));
G = TAU*alpha*K^alpha;
C = K^alpha - delta*K - G;
Z = 0;

order = 4;
vcov = [
0.01
];