Error messages when solving the DSGE model

Hello,

I am currently using Dynare 4.4.5 & Matlab 2017a to solve a DSGE model. However, the error message below keeps popping out:
“File: baseline_V1_HHlender.m Line: 826 Column: 1
Unexpected MATLAB operator.”

I looked into the HHlender.m Line 826 and found “&&&&&&&&&&&&&&” right below M_.Sigma_e(11,11). Thus ,I manually removed “&&&&&&&&&&&&&&” and saved the m.file. However, “&&&&&&&&&&&&&&” appeared again when I run the program on Dynare.

Would there be any suggestions for this issue? Thanks in advance!

Best,
Suzie

Can you post the file?

Please see attached files. Thanks.

Try commenting out &&& part on line 317 and fixing syntax errors in line 415 (use of comma instead of semi-colon; redundant ' marks). See if that helps.

Thank you very much for your time and suggestion! Problem solved!

Best,
Suzie

Hello,

I have encountered another issue. Would you mind helping me out again? Thanks again!

After running Dynare, I kept seeing the warning message:
“Warning: The file ‘/Users/sw41/Dropbox/research/9-debt financing_CU/code/dynare/baseline_V1_HHlender.m’ could not be
cleared because it contains MATLAB code that is currently executing.”

This issue was discussed before on the forum, however, I still cannot proceed with simulation by having “noclearall” option. My Matlab is a 2017a version. Attached are the mod and m files, again! Thanks for the advice!
baseline_V1_HHlender.m (39.1 KB)
baseline_V1_HHlender.mod (18.2 KB)

Did you try the recent stable version of Dynare?

Yes, I switched the original version 4.5.5 to version 5.3. However, the same issue still exists so that I cannot run the program.

I also made sure that there is no conflict between two dynare versions in the path, and no other Matlab code is running. This is why I am confused why the warning message keeps saying there is another Matlab code is executing.

Thanks for the suggestion if you have any!

Can you please post the full log file/message.

Sure. The message below keeps showing repeatedly.

Starting Dynare (version 5.3).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Found 50 equation(s).
Evaluating expressions…done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
Processing outputs …
done
Preprocessing completed.

Starting Dynare (version 5.3).
Calling Dynare with arguments: none
Warning: The file ‘/Applications/Dynare/5.3/matlab/+baseline_V1_HHlender/driver.m’ could not be cleared because it
contains MATLAB code that is currently executing.

In dynare (line 243)
In baseline_V1_HHlender.driver (line 731)
In dynare (line 281)

and so on …

Best,
Suzie

And which OS are you using?

I use macOS Catalina
Version 10.15.7

That means I have neither access to the OS nor the Matlab version. Did you try with a newer Matlab version or Octave?

Hello Prof Pfeifer,

I haven’t tried a newer Matlab version (as it may cost more than the funds I have right now). Could the problem possibly be solved by using a different OS version? Or, was there anything wrong with my code?

Thanks again.

First of all, it’s just a warning and not an error. I am pretty sure it’s harmless and can be ignored, but there is no way to properly diagnose that right now.
Note that Octave is free.

Prof. Pfeifer,

Although it’s just a warning, the entire set of warning shows up repeatedly and never comes to an end. I had to press command plus period to stop the program from running. When I checked the workplace, I couldn’t find the output. Would be possible for me to obtain the results in this situation?

Thanks for further info!

Looking at your path

suggests you are running your mod-file within your Dynare installation folder. That may be the problem.

Prof. Pfeifer,

I just realized that having dynare filename on the mod file rather than typing it on the command window caused all the troubles I encountered. Thank you again for your constant help. I greatly appreciate your time.

Best,
Shu-Ling