# Occbin for a novice user.Is there a simple mod file?

**URL:** <https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385>\
**Category:** Occbin\
**Created:** [1 December 2021 06:58 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385 "2021-12-01T06:58:09Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [20 March 2024 08:43 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/42 "2024-03-20T08:43:57Z")

</div>

During the mode finding stage, I get a `[Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.171813e-16.]` error in the console (repeatedly – so much so that I think it’s causing MATLAB to crash after running for a day).

I’ve tried to suppress these messages with:  
`warning off;`  
`warning('off','MATLAB:singularMatrix');`  
`warning('off','MATLAB:nearlySingularMatrix');`

But these don’t seem to work. Is there a specific place in the mod file to place these commands?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [25 March 2024 10:50 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/43 "2024-03-25T10:50:06Z")

</div>

The solution is [🐛 make sure user-defined warning states are not overridden (!2285) · Merge requests · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/merge_requests/2285)

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [10 July 2024 11:21 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/44 "2024-07-10T11:21:11Z")

</div>

I keep running into the following error for an estimation exercise that does not involve the ZLB:  
`Piecewise linear Kalman filter: There was a problem in obtaining the likelihood`

I’ve taken a look at the slides and code for the 2022 Advanced Workshop for some advice. But are there any additional example mod files for OccBin estimation?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [12 July 2024 10:46 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/45 "2024-07-12T10:46:53Z")

</div>

No, I am not aware of other examples. Maybe you could provide me with the mod-file to look into the error message. I guess it could be more informative.

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [12 July 2024 12:59 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/46 "2024-07-12T12:59:29Z")

</div>

PM’d.

Also, a note to MATLAB users: there seems to be an issue that Mathworks is aware of where some commands cause the Command Window to be totally blank even if code is executed successfully.

Unfortunately, estimation (with OccBin) is one such case on both my Intel iMac and my Apple Silicon MacBook Air. Both are running MATLAB 2024a with Dynare 6.1 but with x86 and ARM builds, respectively.

It makes debugging even more difficult.

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [13 July 2024 12:52 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/47 "2024-07-13T12:52:16Z")

</div>

@jpfeifer

After doing some testing, there might be some kind of issue with Dynare OccBin (ver 6.1) and MATLAB, which causes output in the MATLAB Command Window to not properly show for both OccBin simulations and estimation.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [14 July 2024 13:12 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/48 "2024-07-14T13:12:38Z")

</div>

Your steady state file contains the line

```auto
varphi = 1/4; clc% 1/3 in ABK

```

The `clc` will clear the screen on every single call of the steady state file. That explains the missing output.

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [14 July 2024 13:18 UTC](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385/49 "2024-07-14T13:18:56Z")

</div>

Thanks @jpfeifer – a stupid typo on my end

[Previous page](https://forum.dynare.org/t/occbin-for-a-novice-user-is-there-a-simple-mod-file/19385.md?page=2)
