Hallo,

I have a model which can be solved using the stoch_simul command.

But when I try to estimate it there seem to be problems related to matrix dimension and I get the following error message.

??? Error using ==> mtimes

Inner matrix dimensions must agree.

Error in ==> DsgeLikelihood at 120

Pstar = lyapunov_symm(T,R*Q*transpose®);

My model is in linear form. The Kalman-Filter does not seem to work properly on it. How can I make the matrix dimensions agree?

Is there anything I have to consider when estimating a model in linear form? What difference does it make if I declare only one or all parameters under “estimated_params”? Or if I have one or two observables?

linearmodel_psiPM.mod (3.49 KB)

EstoniaToT.m (1.38 KB)

linearmodel_zahlen.mod (3.12 KB)

You forgot to specify the standard errors of the shocks v and w. You must either calibrate them or estimate them

Best

Michel

Hallo,

Thank you for the hint.

I have added the standard errors of the shocks to the estimated_params section. Now he is telling me that:

??? Assignment has more non-singleton rhs dimensions than non-singleton

subscripts

Error in ==> set_prior at 42

estim_params_.var_endo(i,1) = strmatch(deblank(lgy_(estim_params_.var_endo(i,1),:)),deblank(options_.varobs),‘exact’);

Error in ==> dynare_estimation at 87

[xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_);

Error in ==> linearmodel_psiPM at 167

dynare_estimation(var_list_);

Error in ==> dynare at 26

evalin(‘base’,fname) ;

What does that mean?

If I want to calibrate instead of estimate the stderrs how do I have to code this?

linearmodel_psiPM.mod (3.36 KB)

You can’t use inf as the standard error of the normal distribution. It only makes sense with the inverted gamma

Best

michel

Oh thanks, I did not consider that. My prior specifications are just for trial purposes at this stage.

I corrected that but that does not seem to be the problem.

The same error message occurs.

Best,

Minkyu

linearmodel_psiPM.mod (3.29 KB)

The mistakes comes from the fact that you have W as endogenous variable and w as a shock. You can’t count on version 3 to always take the difference into account. Version 4 doesn’t have a problem with this, but it is a confusing practice to differentiate two variables only by their case.

In addition, if you use a beta prior, the prior mean must be contained between 0 and 1.

Best

michel

Thank you very much for your detailed help.

The estimation is finally working