Dear Prof. Pfeifer,
I am working with a non-linear toy RBC model with the government. I am trying to estimate the model parameters using SMM. The data moments and the model moments do not match at all—in fact, the moments are very different. The data file contains seasonally adjusted, detrended, HP-filtered data. I am attaching the code and data for your reference. Please guide through my mistakes.
Thanks and regards
Saurav Kumar
Macrodata.xlsx (13.0 KB)
SMM.mod (3.7 KB)
Dear Prof. Pfeifer.
Thank you for your reply.
However, I don’t understand what to do next. Would it be possible for you to elaborate on your comments? Also, please guide me on how to work with data for the SMM. I have raw data with me.
With regards
Saurav Kumar
Thank you Prof. Pfeifer for your suggestion. I also appreciate your patience.
I have updated my code. However, I am still encountering some issues. Optimization problem still persists. Dynare is saying that my estimation may not be correct and hessian matrix at mode is not positive definite. This persists for all mode_compute. Additionally,
- When I do not match the mean of C, Y, I, G and match variances and autocovariances and covariances, the model does a good job except for a 3-4 moments. Additionally, I do not get standard deviation for any parameter. I have worked with different mode_compute methods.
- When I also try to match mean, model mean are too far from the data. Rest other are similar to previous case.
Please let me know what could be the possible cases and how to work around this. I have uploaded updated code and data.
Macrodata.xlsx (13.0 KB)
SMM.log (325.6 KB)
SMM.mod (4.6 KB)
Thanks and regards
Saurav Kumar
You still did not fix parameter dependence. Use
SMM.mod (4.6 KB)
Thank you Prof. Pfeifer. The code is working now.
However, my Ph.D. chapter has a more complex model and because of high non-linearity one cannot solve steady state. Earlier, I have used fsolve to find steadystates.
In this case, I do not know how to work with SMM and still use fsolve. I am finding it difficult to call the steady state values calculated by fsolve in .m file. I have earlier tried to work with initval block.
I am requesting help with my code. (I am not feeling comfortable to share my Ph.D. chapter code here. I can send .mod and .m file on your personal email. But I assure you that the system of equations gives steady state values, as I have checked. ) I am attaching the toy model. Please let me know how to write .mod file and .m file such that I can use SMM. If possible, please suggest other alternative ways to call steady state values in the steady_state_model block.
Thanks and regards
Saurav Kumar
Macrodata.xlsx (13.0 KB)
SMM_fsolve.mod (4.4 KB)
SMM_steady.m (455 Bytes)
In that case, you should write a full steady state file. An example would be Large DSGE model calibration - #5 by jpfeifer
Thank you Prof. Pfeifer. SMM is working for me now.
With regards
Saurav Kumar