I am trying to run the attached NK model with some form of non Ricardian consumers with Dynare (version 4.6.4). The intention is to run the calibrated model first then later run the model with real data. The code runs fine when I exclude the aspect on foreign economy data related equations (last 5 equations). However, I keep getting the error below when I include those equations. I have read a lot of useful solutions on this platform (thanks to @jpfeifer and the team) and understand that the issue is most likely about timing or parameter values. But truth is I have tried for days and I don’t think I know how to fix it. Please help!
I managed to run the codes with my data. However, I am concerned about a number of my trace and MCMC univariate graphs. I would be grateful if you could take a look at the attached sample graphs and advise on the possible ways to resolve them.
Are the trace graphs ok? most of them are very fine, however I feel these ones are not good enough.
The mode check plots shows that most of my AR(1) parameters have a corner solution. I read from previous post here that rescaling the parameters or using the mode of the previous estimates could resolve this. What do you suggest I do in such situations. I have read a number of post on this but did not really understand them well.
MCMC univariate graphs like SE_EOBS_D_OBS are trending upwards. Is this issue link to the many corner solution in the mode check plots? How do I fix that?
I used this command for the estimation:
estimation(datafile=ghusdata, prefilter=1, mode_compute = 4, mh_replic=100000, mh_nblocks=2,prior_trunc=0,mh_drop=0.45,mh_jscale = 0.30, first_obs = 22, mode_check)
I managed to run the identification as suggested and got the results below. The video was really helpful.
My model contains specifications for the standard errors of the observables in the estimated_param block so Dynare did not allow for me to run the identification initially. I deleted the standard errors specifications and focused on the parameters to be estimated as suggested in the video.
See attached the mode file used for running the identification. I would appreciate your advise on whether I did the identification well, and what I can do to fix the issue of irregular mode plots.
I also would like to know if it is good practice to not include the standard errors of the observable variable in the estimated_param block.
I hope you are well. I will be grateful if you could take a look at my last post and let me know what you think about the identification and mode. Thanks in advance.
Can you provide the data file. It’s a bit strange that everything is identified, but the likelihood seems flat.
For the purpose of identification, a workaround is to specify measurement errors like structural shocks instead of using the Dynare interface. Those two options are isomorphic.
Thanks for pointing this out. I am new to DSGE modeling and my understanding was stationary data means it has a mean of zero. I guess it I lacked understanding in that regard. Please how to I fix that?
The data is already seasonally adjusted and log first differenced. How do I get a mean zero for such data. Or do I maintain the data and rather do something to the model.
Should I simply subtract the mean of each sample from each observation to obtain a zero mean and then use the data in the model? Will doing this affect my data properties?
So, I read your paper in detail and tried all options of transforming the data (log difference, the HP filter and the demeaned method, but none of the data used gave me a well behaved mode plots. Everything else ( including the MCMC and trace plots) are fine. Is it the case that I cannot use the model for anything useful if all the mode plots are not well behaved., or I can simply restrict my analysis to the parameters with good enough mode plots.
Apologies for the delay in reply. I encountered an emergency which required my full attention. Please find attached the mode and data file. Model_Linear2.mod (7.8 KB) Data_demean.mat (3.9 KB)
So my model is log-linearised and according to your guide, the variables are log deviations from a steady of zero and they have zero means. These are how I transformed the variables:
Output: I log real output and applied the one sided HP filter. The resulting variable had a positive mean so I demeaned it using the procedure in your guide. The results are similar if I use the variable without demeaning.
Inflation: demeaned after calculating the log difference as log(cpi/cpi(-1)) - mean(log(cpi/cpi(-1))
Depreciation: use same method as inflation
Interest rate: transformed to quarterly series using the formula (1 + (r / 100))^0.25 -1
Your assistance in fixing my poor mode plots would be very much appreciated.