Error using max Matrix. dimensions must agree.

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.

Error using max Matrix. dimensions must agree.

Postby mahone21 » Mon Oct 10, 2011 2:34 pm

I am really confused.i have a model, I still can compute an initial steady state and a final steady state, and the rank condition is still verified, but the following instructions:

Error using max
Matrix dimensions must agree.

Error in hessian (line 40)
h1=max(abs(x),sqrt(gstep)*ones(n,1))*eps^(1/6);

Error in dynare_estimation_1 (line 406)
hh = reshape(hessian('DsgeLikelihood',xparam1, ...

Error in dynare_estimation (line 62)
dynare_estimation_1(var_list,varargin{:});

Error in mahone211 (line 383)
dynare_estimation(var_list_);

Error in dynare (line 120)
evalin('base',fname) ;
Attachments
mahone.xls
(38 KiB) Downloaded 228 times
dsge.mod
(3.62 KiB) Downloaded 212 times
mahone21
 
Posts: 5
Joined: Mon Jun 27, 2011 8:27 am

Re: Error using max Matrix. dimensions must agree.

Postby SébastienVillemot » Thu Oct 27, 2011 3:07 pm

This is obviously a bug in Dynare, I have added it to our bug tracker: https://www.dynare.org/trac/ticket/222

We will solve it as soon as possible.

Thanks for reporting this.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Error using max Matrix. dimensions must agree.

Postby mahone21 » Sat Oct 29, 2011 2:14 pm

Thanks!
I am looking forward u replying!
mahone21
 
Posts: 5
Joined: Mon Jun 27, 2011 8:27 am

Re: Error using max Matrix. dimensions must agree.

Postby SébastienVillemot » Wed Nov 02, 2011 5:11 pm

Hi,

Actually you forgot to declare an "estimated_params" block! Dynare does not know which parameters to estimate, what are the priors...

Therefore it's not a bug in Dynare. But we will change the error message so that it becomes more explicit.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Error using max Matrix. dimensions must agree.

Postby mahone21 » Thu Nov 03, 2011 3:28 pm

thank u very much!

i can run it successfully now!
mahone21
 
Posts: 5
Joined: Mon Jun 27, 2011 8:27 am

Re: Error using max Matrix. dimensions must agree.

Postby alex » Mon Nov 04, 2013 9:47 pm

I get the same error. I have not an estimated_params section, but I am using the "smoother" option, which does not require to define parameters to estimate.

Any thought about how to solve this?

Best,
Alex
alex
 
Posts: 10
Joined: Sun Sep 15, 2013 3:41 pm

Re: Error using max Matrix. dimensions must agree.

Postby jpfeifer » Tue Nov 05, 2013 9:51 am

Try the recent snapshot. If it does not work, post the file
------------
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: Error using max Matrix. dimensions must agree.

Postby alex » Tue Nov 05, 2013 2:49 pm

solved thank you!

Alex
alex
 
Posts: 10
Joined: Sun Sep 15, 2013 3:41 pm

Re: Error using max Matrix. dimensions must agree.

Postby veronika » Mon Dec 07, 2015 11:15 am

Hi,

I am estimating a non-linear model with second order approximation using "pruning", and I also use the smoother option. But I get the same error :

Error using max
Matrix dimensions must agree.

Error in hessian (line 42)
h1=max(abs(x),sqrt(gstep(1))*ones(n,1))*eps^(1/6)*gstep(2);

Error in dynare_estimation_1 (line 620)
hh = reshape(hessian(objective_function,xparam1, ...

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in Flue (line 414)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin('base',fname) ;

what could be the problem and how I can solve it? I would appreciate your advice.
Attachments
Flue.mod
(6.94 KiB) Downloaded 125 times
veronika
 
Posts: 9
Joined: Mon Aug 24, 2015 3:48 pm

Re: Error using max Matrix. dimensions must agree.

Postby jpfeifer » Mon Dec 07, 2015 12:19 pm

Please use
Code: Select all
which hessian

to check whether the Dynare hessian.m is on top of your path. If not, eliminate the other hessian.m from your path.
------------
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: Error using max Matrix. dimensions must agree.

Postby veronika » Mon Dec 07, 2015 12:31 pm

I tried it and:

>> which hessian
C:\dynare\4.4.3\matlab\hessian.m
veronika
 
Posts: 9
Joined: Mon Aug 24, 2015 3:48 pm

Re: Error using max Matrix. dimensions must agree.

Postby jpfeifer » Mon Dec 07, 2015 12:38 pm

The steady state file is missing.
------------
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: Error using max Matrix. dimensions must agree.

Postby veronika » Mon Dec 07, 2015 12:44 pm

Sorry! Here they are:
Attachments
lddet.m
(1.99 KiB) Downloaded 100 times
Flue_steadystate.m
(3.2 KiB) Downloaded 96 times
veronika
 
Posts: 9
Joined: Mon Aug 24, 2015 3:48 pm

Re: Error using max Matrix. dimensions must agree.

Postby jpfeifer » Mon Dec 07, 2015 12:57 pm

And the data file.
------------
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: Error using max Matrix. dimensions must agree.

Postby veronika » Mon Dec 07, 2015 2:06 pm

This is the preliminary data file, we are not still finished with aggregating the data.
Last edited by veronika on Mon Dec 07, 2015 2:14 pm, edited 1 time in total.
veronika
 
Posts: 9
Joined: Mon Aug 24, 2015 3:48 pm

Next

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests