Page 1 of 1

Problematic warnings and a mysterious error message

PostPosted: Fri Aug 17, 2012 8:35 pm
by Schaller
I am just getting started with Dynare. To get the basic mechanics right, I started by using the sample program for the stochastic model in section 3.9.1 of the User Guide.

Each time I run Dynare, I receive the following warnings:

Warning: Function C:\dynare\4.2.5\matlab\missing\bsxfun\bsxfun.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\dynare\4.2.5\matlab\missing\ordeig\ordeig.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\dynare\4.2.5\matlab\missing\rcond\rcond.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict

I don't know if I can safely ignore these warnings. If not, I don't know how to fix the problem, since these are functions that do not directly appear in my program.

The error message that appears to stop my program is:

Error using dynare (line 120)
Error: Unexpected MATLAB operator.

This is a mysterious error message, because line 120 is a simple assignment of an initial value to the variable z:

z = 0;

I suspect the problem is elsewhere, but, as a beginner, I have no idea where to locate the problem.

In case it may be helpful, here is the log file from my program:

%
% Status : main Dynare file
%
% Warning : this file is generated automatically by Dynare
% from model file (.mod)

clear all
clear global
tic;
global M_ oo_ options_ ys0_ ex0_
options_ = [];
M_.fname = 'p:\hs_sample_prog';
%
% Some global variables initialization
%
global_initialization;
diary off;
logname_ = 'p:\hs_sample_prog.log';
if exist(logname_, 'file')
delete(logname_)
end
diary(logname_)
M_.exo_names = 'e';
M_.exo_names_tex = 'e';
M_.endo_names = 'y';
M_.endo_names_tex = 'y';
M_.endo_names = char(M_.endo_names, 'c');
M_.endo_names_tex = char(M_.endo_names_tex, 'c');
M_.endo_names = char(M_.endo_names, 'k');
M_.endo_names_tex = char(M_.endo_names_tex, 'k');
M_.endo_names = char(M_.endo_names, 'i');
M_.endo_names_tex = char(M_.endo_names_tex, 'i');
M_.endo_names = char(M_.endo_names, 'l');
M_.endo_names_tex = char(M_.endo_names_tex, 'l');
M_.endo_names = char(M_.endo_names, 'y_l');
M_.endo_names_tex = char(M_.endo_names_tex, 'y\_l');
M_.endo_names = char(M_.endo_names, 'w');
M_.endo_names_tex = char(M_.endo_names_tex, 'w');
M_.endo_names = char(M_.endo_names, 'r');
M_.endo_names_tex = char(M_.endo_names_tex, 'r');
M_.endo_names = char(M_.endo_names, 'z');
M_.endo_names_tex = char(M_.endo_names_tex, 'z');
M_.param_names = 'beta';
M_.param_names_tex = 'beta';
M_.param_names = char(M_.param_names, 'psi');
M_.param_names_tex = char(M_.param_names_tex, 'psi');
M_.param_names = char(M_.param_names, 'delta');
M_.param_names_tex = char(M_.param_names_tex, 'delta');
M_.param_names = char(M_.param_names, 'alpha');
M_.param_names_tex = char(M_.param_names_tex, 'alpha');
M_.param_names = char(M_.param_names, 'rho');
M_.param_names_tex = char(M_.param_names_tex, 'rho');
M_.param_names = char(M_.param_names, 'gamma');
M_.param_names_tex = char(M_.param_names_tex, 'gamma');
M_.param_names = char(M_.param_names, 'sigma');
M_.param_names_tex = char(M_.param_names_tex, 'sigma');
M_.param_names = char(M_.param_names, 'epsilon');
M_.param_names_tex = char(M_.param_names_tex, 'epsilon');
M_.exo_det_nbr = 0;
M_.exo_nbr = 1;
M_.endo_nbr = 9;
M_.param_nbr = 8;
M_.orig_endo_nbr = 9;
M_.aux_vars = [];
M_.Sigma_e = zeros(1, 1);
M_.H = 0;
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
erase_compiled_function('p:\hs_sample_prog_dynamic');
M_.lead_lag_incidence = [
0 3 0;
0 4 12;
1 5 0;
0 6 0;
0 7 0;
0 8 0;
0 9 0;
0 10 13;
2 11 0;]';
M_.equations_tags = {
};
M_.exo_names_orig_ord = [1:1];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(9, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(1, 1);
M_.params = NaN(8, 1);
M_.NNZDerivatives = zeros(3, 1);
M_.NNZDerivatives(1) = 28;
M_.NNZDerivatives(2) = 25;
M_.NNZDerivatives(3) = -1;
M_.params( 4 ) = 0.33;
alpha = M_.params( 4 );
M_.params( 1 ) = 0.99;
beta = M_.params( 1 );
M_.params( 3 ) = 0.023;
delta = M_.params( 3 );
M_.params( 2 ) = 1.75;
psi = M_.params( 2 );
M_.params( 5 ) = 0.95;
rho = M_.params( 5 );
M_.params( 7 ) = 0.007/(1-M_.params(4));
sigma = M_.params( 7 );
M_.params( 8 ) = 10;
epsilon = M_.params( 8 );
%
% INITVAL instructions
%
options_.initval_file = 0;
oo_.steady_state( 3 ) = 9;
oo_.steady_state( 2 ) = 0.76;
oo_.steady_state( 5 ) = 0.3;
oo_.steady_state( 7 ) = 2.07;
oo_.steady_state( 8 ) = 0.03;
oo_.steady_state( 9 ) = 0;
oo_.exo_steady_state( 1 ) = 0;
oo_.endo_simul=[oo_.steady_state*ones(1,M_.maximum_lag)];
if M_.exo_nbr > 0;
oo_.exo_simul = [ones(M_.maximum_lag,1)*oo_.exo_steady_state'];
end;
if M_.exo_det_nbr > 0;
oo_.exo_det_simul = [ones(M_.maximum_lag,1)*oo_.exo_det_steady_state'];
end;
steady;
check;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = M_.params(7)^2;
M_.sigma_e_is_diagonal = 1;
options_.periods = 2100;
var_list_=[];
info = stoch_simul(var_list_);
save('p:\hs_sample_prog_results.mat', 'oo_', 'M_', 'options_');
diary off

disp(['Total computing time : ' dynsec2hms(toc) ]);

Re: Problematic warnings and a mysterious error message

PostPosted: Sat Aug 18, 2012 4:56 pm
by jpfeifer
You can ignore the warnings. To get rid of them, make sure that only the dynare\matlab folder is added to your path, but not the dynare\matlab\missing folders. Regarding your error message: how do you call dynare? You should be in the directory where the mod file is located and then use
Code: Select all
dynare hs_sample_prog

If you are in a different directory, it will crash. If this is not the source of your problem, please post the mod file.

Re: Problematic warnings and a mysterious error message

PostPosted: Mon Aug 20, 2012 2:36 pm
by Schaller
jpfeifer,

Thanks for your reply. I will ignore the warnings for now.

I am using Dynare on a server. As far as I can tell, I am not able to put my programs (or other files) on the directory that contains the Matlab and Dynare code (because I do not have administrator rights on this directory). Instead, I call Dynare as follows:

Dynare P:\{my file name}

If you can provide any further help, I would be very grateful.

Huntley