Hello all. I am new to Matlab and Dynare and I am trying to run a model but get stuck when NaNs that appear in the steady state. I have looked at other posts relevant to the topic but because the advice is specific to different mod files and equations, I haven’t been able to find a solution yet.
I post here my mod file, m file, and Excel file with the data. If anyone could let me know what the error might be, I would greatly appreciate it.
Thank you and best wishes,
Karen
project2_proper.m (622 Bytes) project2.mod (4.8 KB) UKdataxlsx.xlsx (18.8 KB)
- Add
steady_state_model;
Yobs = const_y;
Robs = const_r;
PIobs = const_pi;
Cobs = const_c ;
Iobs = const_i ;
end;
- Use
diffuse_filter
instead of lik_init
- You cannot observe Y, C, and I at the same time as it will cause stochastic singularity. Your equation
y = (const_c/const_y)*c + (const_i/const_y)*i ;
implies an exact linear combination between these observables.
Dear Professor Pfeifer,
thank you for your help! I am now getting different errors because of the rank condition which is not satisfied. I added an equation for the variable “lab” in the model specification but now there are still 6 eigenvalues > 1 for 6 forward-looking variables. Could there be other issues in the mod file as it stands? From what I understand reading on the forum, it could be a time issue which (if I understand correctly) means that we could have an equation that is forward-looking that should be backward-looking, or the other way around. Or is it an error with the parameters? Guidance on this issue would be greatly appreciated.
Thank you!
project2_noss.mod (7.0 KB) project2_proper.m (714 Bytes) UKdataxlsx.xlsx (18.8 KB)
It’s hard to tell. Try simplifying the model to see where the problem appears, e.g. remove habits and adjustment costs.
Thank you. I have simplified the model and taken out habits and adjustment costs but a similar error exists–now there are 5 eigenvalues greater than 1 for 5 forward-looking variables. How can one tell where the problem is appearing? Are there any steps to follow or tests to check?
project2_case2.mod (6.7 KB) project2_proper.m (715 Bytes) UKdataxlsx.xlsx (18.8 KB)
Then why is there still an h
in the model? And why is q=1
if adjustment costs are 0?