- Regarding another issue apart from the other model which still is not running, I had a question, suppose I want to generate impulse response functions and various descriptive statistics (moments, variance decomposition,correlation and autocorrelation coefficients) after bayesian estimation, what can I do apart from using"bayesian_irf" command?
- I am also hoping if I can get help on the above model - which equation I might be missing?
- Also, I went through Smets and Wouters dynare codes, there measurement equations have been defined separately, do we need to do that always? If not when do we do so and why?
- For the previous model, when I was getting red dots in mode check plots, debug option revealed following that
"For one parameter, “it could not solve model at 3 particular values, error code-3.”
"For the second paramter,it could not solve model at 9 particular values, error code-7. "What does that mean and what can I do?
- You can simply run
stoch_simul
afterestimation
. - You need to cross-check the coefficients and timing of variables in the lineare model with SOECB-MARKOV/codes/model_solve.m at master · phantomachine/SOECB-MARKOV · GitHub
- What exactly do you mean?
- Please use a recent Dynare 6. It would show the associated message.
For (4) Do we truncate priors so that model is solved for all values in a given range? where can we read on error code 3 and 7?
For 2) I cross-checked once, will do so again and try. The thing is that they do not have the code for simple taylor rule but the loss function.
For 3) Measurement equations have been written in codes separately. Do we set it separately always?
For 1) Thank you Prof., I will try and implement.
matlab/get_error_message.m · master · Dynare / dynare · GitLab shows the error codes.
The measurement equations are usually separate in the sense of defining auxiliary variable describing the mapping of the data to the model. Only in very simple cases can model variables be directly observed so that no measurement equations are needed.
Thank you Prof. Pfeifer for clarifying. I will keep that in mond about measurement equations when I can get my model to work.
Do we have MATLAB / dynare codes only for linearization separately which I can refer to? I could finally write a linearization code in python but I wanted to cross-check it with MATLAB/ dynare codes just to be sure it is doing exactly the same thing and is correct.
I am only aware of Automatic Solution and Log Linearisation of DSGE Models - File Exchange - MATLAB Central
Yeah, I saw that one but that does only log-linearization and not linearization.
When dynare implements linearization, there must be a set of codes it must be implementing to linearize the non-linear model. Is that avaiable some where? I could not find it.
- Pretty much all models are loglinearized, not linearized.
- Dynare uses symbolic differentiation to compute the required derivative matrices for the solution. It never computes a linearized version or representation of the model.
Thank you Prof. Pfeifer. Regarding log-linearization v/s linearization, there is a paper which favors linearization over log-lineaization (PAPER ATTACHED). Also, some posts on the forum discuss that linearization is a preferred route over log-linearization.
One condition where linearization is preferred over log -linearization is a case where staedy state is not strictly positive. Is there any other reason, condition where linearization is preferred over log-linearization. Having gone through posts as well as the paper, I though linearization is preferred over log linearization.
Aruoba, villaverde and ramirez (1).pdf (818.4 KB)
The result of that paper does not generalize. There is no general result that linearization is preferable. Usually, you only selectively linearize variables with zero or negative steady states or that are already in percent.
Thank you Prof. Pfeifer. Appreciate your help and clarification.
Also, I re-worked on the monetary model. Re-checked with available Matlab codes and also other related paper. I am attaching the revised version of the model but it still gives the “eigenvalues error”.
Blockquote
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 0.0000!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.
Blockquote
Requesting you to please help. I have cross checked with all possible resources but I do not detect any problem with timing of the variables. Also, I added an extra equation to possibly define relationship of e with other variables in the model.
Monetary_model_v07.mod (4.8 KB)
r-r(-1) = r - r(-1) + epsilon_r;
cannot be correct unless epsilon_r=0
forever.
Yeah, I agree. It was there in the Matlab codes for a different purpose.
I referred to other related papers and models, added the equation which might be missing. The model does simulation but estimation command throws some error. I think I might be missing out on a minor error which I am still not able to figure out.
I am attaching the revised model file. Apart from the equations mentioned I am no sure what else i might be missing. If you can please take a look and help.
Monetary_model_v09.mod (5.7 KB)
Your model has a unit root. You need to use the diffuse_filter
option.
When I use the diffuse filter option; kalman_algo=3; I get the following error:
dynare_estimation_init.m:: diffuse filter is incompatible with a qz_criterium<=1. Resetting it to 1+1e-6.
Error using dynare_estimation_init
analytic derivation is incompatible with diffuse filter
What might be going wrong?
It is basically not able to carry out identification analysis although it does estimation. I need to run the identification analysis to be sure that all parameters are identified. Further, there still might be problem with estimation results. I am attaching the revised file. Since this is a log-linear model and variables are log deviations from steady states - is the mapping of variables correct? I haven’t created a separate block for measurement equations. I guess there might be a problem there ?Also, the acceptance rate for MCMC is 0 and I do not get trace plots . There are still problems and if you can help.
Monetary_model_v10.mod (6.4 KB)
Most of your observables have a unit root. That is highly unusual and not supported in identification
.
Is there a way to deal with it. Estimation does not work properly in this case. Given that authors have estimated this model, it should be possible to do so?
I would be surprised if they estimate a model with a unit root affecting all relevant variables.