Dear Pfeifer

Thank you for all the help. I have faced a new problem, I changed my datas from Quarterly to yearly ones and I could finally ran my model with also some other changes in the equations. now, my posterior mean for one of my parameters is not meaningful. landa is share of rule of thumb families, with prior equal to .26 I get posterior mean of .0089!

what can be done? what does it mean?

thanks in advance

# Invalid posterior mean

**Start**#1

**jpfeifer**#2

It seems your data is really informative. Apparently, you have a very strong prior that the RoT-share must be higher. So you should also make the prior in your estimation tighter. But before doing that, check whether the model works as expected. Do the steady states and IRFs make sense?

**Start**#3

dear prof. Thank you very much

I would check the irfs thank you, But Ive got a question, could the reson be lack of the number of observations? for yearly data that i have chosen to use, I have 23 observations (and only 15 for another work). I used to use Quarterly data but I could never reach posteriors, several errors i got…

**jpfeifer**#4

That is very unlikely. Usually, with just a few observations, you expect the posterior to be close to the prior. This is not the case here. But it is strange that you cannot get the model to run with quarterly data. That suggests deeper problems.

**Start**#5

thanks… what do you suggest?

may I send you my code? could you please take a look and tell me your opinion?

rgh97f.mod (2.9 KB)

rgh_year1.m (922 Bytes)

rgh_Quarterly2.m (1.2 KB)

rgh_Quarterly1.m (2.5 KB)

rgh_year2.m (627 Bytes)

**Start**#6

Dear prof…would you please take a look at my code? it has been 5 months i am working on it… totally disappointed… you could give a helpful suggestions

**jpfeifer**#7

The variable `y`

in the `_Quarterly`

-files still has a trend and is not mean 0. It thus, does not match the data. Search the forum on “observation equations”

**Start**#9

dear prof. I fixed the data, and changed some priors, now what I get is posteriors, which mean better than before and my mcmc curves just converges. but

- mode check plots are worsen, I have red dots everywhere
- using options_.debug=1, i get error codes 3 and 4 for most of my parameters… pointing at “no stable equilibrium " and " indeterminacy” with print_info help
- I get this error code in the end:

```
Inner matrix dimensions must agree.
Error in compute_Pinf_Pstar (line 61)
B = R1*Q*R1';
Error in DsgeSmoother (line 182)
[Pstar,Pinf] =
compute_Pinf_Pstar(mf,T,R,Q,options_.qz_criterium,oo_.dr.restrict_var_list);
Error in dynare_estimation_1 (line 536)
[atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp,Trend,state_uncertainty,M_,oo_,options_,bayestopt_]
=
DsgeSmoother(xparam1,dataset_.nobs,transpose(dataset_.data),dataset_info.missing.aindex,dataset_info.missing.state,M_,oo_,options_,bayestopt_,estim_params_);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in rgh97kh (line 252)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 223)
evalin('base',fname) ;
```

which I dont know the meaning. what can be done?

**jpfeifer**#10

- If you are sure your data treatment is correct, you need to understand why your mode-estimate is very close to the indeterminacy and instability regions.
- Are you using the most recent Dynare version (4.5.4). A crash like this looks like a bug.

**Start**#11

hello dear prof. and thanks for the comment, I was using 4-5-1 vision, after downloading the new version I still got the same errors, But then I decided to eliminate landa (the parameter for share of ROT consumers) From estimated_parameters-block, I no longer saw the red dots nor that error again, here is my question:

- does it mean that my model is unable to estimate landa? should I only calibrate it? bcz some say that our data for Iran is not suitable for its estimation…
- in my mode check plots some plots are rarely linear with no maximum, whats the reason? what can be done? does it mean that th estimation is not valid?
- this is something else that I received, and did not found the similar problem in the questions asked, what does it mean?

stoch_simul:: The IRF of z to e_u is smaller than the irf_plot_threshold of 0.000 and will not be displayed.

stoch_simul:: The IRF of u to e_z is smaller than the irf_plot_threshold of 0.000 and will not be displayed.

stoch_simul:: The IRF of u to e_m is smaller than the irf_plot_threshold of 0.000 and will not be displayed.

stoch_simul:: The IRF of z to e_m is smaller than the irf_plot_threshold of 0.000 and will not be displayed.

u is aggregate demand shock,z is NKPC shock, e_m is a shock to money growth , the first two with AR(1) process and exogenous variable e_u, e_z and e_m.

thank you

**jpfeifer**#12

- I would need to see the codes
- There must be something wrong with the estimation
- You will get that message if a variable does not react to a shock.

**Start**#13

thank you, I would send the codes, would appriciate if you take a look at itrgh_2.m (1.9 KB)

a1.mod (3.3 KB)

rgh_1.m (1.8 KB)

**jpfeifer**#14

- I cannot replicate the crash you mentioned in Dynare 4.5
- Your estimation has problems with mode-finding. That seems to be due to your odd and rather tight prior for some parameters like
`rho_y`

. Using`prior_trunc=0`

already alleviates some of the issues, showing that the posterior is located in regions considered very unlikely by the prior.

**Start**#15

hello dear prof. jpfeifer

due to your helps I could estimate my model, but the graph for orthogonalize shocks are having a sin. function like shape, is it OK to have such graphs?

orthogonalized shock to eu.pdf (15.9 KB)

orthogonalized shock to ez.pdf (15.1 KB)

Copy_of_a1.mod (3.5 KB)

I sent the PDF of graphs and code, if needed

I would appreciate your help if possible

thank you

**jpfeifer**#16

That is hard to tell. Often oscillating behavior indicates a timing issue. But in your case, there is no strong oscillating behavior. Hence, it might be a matter of economics. Does you monetary policy rule have the right signs and parameter values?

**Start**#17

Yes. What I have used for monetary policy is widely used in Iran dsge models… So is it right? Or it has some problems? Due to timing or etc.? If it is right how can it be analyzed?

**jpfeifer**#18

Only you as the model builder can tell whether the results make sense. Check whether the IRFs conform to your intuition and are consistent with the previous literature.

**Start**#20

Hello dear prof.

I need to know for which inputs of one especial parameter, my model faces indeterminacy(which leads to blanchard kahn error), can I plot determinacy region for that parameter? How can it be done? Where is the srticle or guideline that can help me more ?

Tbanks in advance