# Different Results of A0 using SBVAR

**URL:** <https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359>\
**Category:** BVAR\
**Created:** [11 March 2020 19:41 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359 "2020-03-11T19:41:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmrich](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@kmrich](https://forum.dynare.org/u/kmrich)\
**Post date:** [11 March 2020 19:41 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359/1 "2020-03-11T19:41:25Z")

</div>

Hello:

I am currently trying to estimate a (recursive) constant-coefficient SBVAR using Sims and Zha (1998)'s prior.

I am running into an issue when using `contemp_reduced_form` option. If the option is selected, the code with crash just before the Gibbs sampling step.

If I instead run the code without the `contemp_reduced_form` option, the code finishes. However, the point estimates of the A0 matrix have different signs on some of the columns compared to the one produced with the `contemp_reduced_form` option on.

How is this possible?

Attached are the code and data.  
[constantRecursiveBVAR.mod](https://forum.dynare.org/uploads/short-url/mBsBOYkmoT1vSmTuXwFRf6xqWrm.mod) (462 Bytes)

[MacroData.mat](https://forum.dynare.org/uploads/short-url/4u7tydAvw4Ppqnl0zN8eZHFgNCL.mat) (18.4 KB)

The results of both cases are also included.  
Results with `contemp_reduced_form`  
[CRFoutdata\_a0dp\_const.mat](https://forum.dynare.org/uploads/short-url/r5kvSNCZehRDsTh1tUYw4LUUdLB.mat) (2.4 KB)

Results without `contemp_reduced_form`  
[outdata\_a0dp\_const.mat](https://forum.dynare.org/uploads/short-url/1t9Qr5KNBu2w49M0qCTt4lC65ts.mat) (2.4 KB)

Thank you in advance!

---

<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:** [16 March 2020 08:30 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359/2 "2020-03-16T08:30:30Z")

</div>

This is almost surely a bug. Thanks for reporting it. I opened a ticket at [https://git.dynare.org/Dynare/dynare/issues/1716](https://git.dynare.org/Dynare/dynare/issues/1716)

---

<div class="post-metadata">

**Author:** ![kmrich](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@kmrich](https://forum.dynare.org/u/kmrich)\
**Post date:** [27 April 2020 16:03 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359/3 "2020-04-27T16:03:46Z")

</div>

Hello again,

I was wondering if there has been any progress on this issue?

From what I can tell, I think the problem is how the code is constructing linear restrictions.

---

<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 May 2020 08:34 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359/4 "2020-05-14T08:34:16Z")

</div>

We forwarded the issue to Zha/Waggoner. They are working on it, but we haven’t heard back with a solution yet.

---

<div class="post-metadata">

**Author:** ![kmrich](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@kmrich](https://forum.dynare.org/u/kmrich)\
**Post date:** [14 May 2020 14:46 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359/5 "2020-05-14T14:46:33Z")

</div>

Thank you for the update.

---

<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:** [26 May 2026 15:22 UTC](https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359/6 "2026-05-26T15:22:20Z")

</div>

I finally proposed a fix at [Making sure you're not a bot!](https://git.dynare.org/Dynare/dynare/-/merge_requests/2618).  
Note that the sign switch in A0 is expected as the shock vectors are identified up to the sign.
