Error using max Matrix. dimensions must agree

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) ;
mahone.xls (38 KB)
dsge.mod (3.62 KB)

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

We will solve it as soon as possible.

Thanks for reporting this.

Thanks!
I am looking forward u replying!

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,

thank u very much!

i can run it successfully now!

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

Try the recent snapshot. If it does not work, post the file

solved thank you!

Alex

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.
Flue.mod (6.94 KB)

Please use

to check whether the Dynare hessian.m is on top of your path. If not, eliminate the other hessian.m from your path.

I tried it and:

which hessian
C:\dynare\4.4.3\matlab\hessian.m

The steady state file is missing.

Sorry! Here they are:
lddet.m (1.99 KB)
Flue_steadystate.m (3.2 KB)

And the data file.

This is the preliminary data file, we are not still finished with aggregating the data.

That does not matter. I need it to reproduce the crash.

Sorry for the delay and thank you for your time!
Fluedata.xls (52.5 KB)

Your mod-file is missing an estimated_params-block.

Dear Dr.Pfeifer,

I attache again the mod file. As I mentioned before I am trying to estimate the model with the calibrated parameters at the moment. That’s why I use the smoother option.
Flue.mod (6.94 KB)

You cannot

If you want to run the Kalman smoother on a calibrated model, use the calib_smoother command. See e.g. github.com/DynareTeam/dynare/blob/master/tests/fs2000/fs2000_calib.mod