Dynare++ example file not working

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.

Dynare++ example file not working

Postby Ana » Thu May 28, 2015 5:56 pm

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
];
Ana
 
Posts: 3
Joined: Wed May 27, 2015 10:33 pm

Re: Dynare++ example file not working

Postby jpfeifer » Fri May 29, 2015 3:11 pm

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
------------
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: Dynare++ example file not working

Postby Wenli Xu87 » Sat Jul 09, 2016 12:54 pm

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
];
Wenli Xu87
 
Posts: 2
Joined: Wed Dec 02, 2015 1:28 pm


Return to Dynare User Guide

Who is online

Users browsing this forum: No registered users and 0 guests