# Thinning Factor for Constant Coefficient SBVAR

**URL:** <https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607>\
**Category:** BVAR\
**Created:** [11 April 2019 21:41 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607 "2019-04-11T21:41:12Z")\
**Posts on this page:** 8\
**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 April 2019 21:41 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/1 "2019-04-11T21:41:12Z")

</div>

Hello,

I am trying to estimate a simple constant coefficient SBVAR using the sbvar command. The code is up and running.

I was able to change the number of draws and burn-in via editing the master code.

However, is there anyway to thin the number of draws in the Gibbs sampling algorithm?

Thanks in advance!

---

<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:** [12 April 2019 08:33 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/2 "2019-04-12T08:33:30Z")

</div>

[constantSBVAR.mod](https://forum.dynare.org/uploads/default/original/2X/1/19373e594c0fde7f6483a3b9b9e3380b1a8cbc3c.mod) (403 Bytes)

Code attached.

---

<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:** [15 April 2019 16:51 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/3 "2019-04-15T16:51:59Z")

</div>

The data file is missing to run your code.

---

<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:** [15 April 2019 18:18 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/4 "2019-04-15T18:18:28Z")

</div>

Sorry about that! Hopefully it uploads this time.

[USmacroData400.mat](https://forum.dynare.org/uploads/default/original/2X/9/9b2f27bc9478476663701d4df5227562ca043ef2.mat) (6.8 KB)

---

<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:** [15 April 2019 20:02 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/5 "2019-04-15T20:02:27Z")

</div>

You would need to modify `ms_mardd` accordingly. But the question is for which statistic would you need the thinned draws?

---

<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:** [15 April 2019 20:31 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/6 "2019-04-15T20:31:10Z")

</div>

That is correct.

Which variable would I need to look for in the `ms_mardd` program?

Also, which of the codes generates the IRFs for the `sbvar` command?

---

<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:** [30 April 2019 19:54 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/7 "2019-04-30T19:54:02Z")

</div>

Hello,

Are there any updates?

---

<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:** [2 May 2019 08:25 UTC](https://forum.dynare.org/t/thinning-factor-for-constant-coefficient-sbvar/13607/8 "2019-05-02T08:25:40Z")

</div>

As far as I can see, the Gibbs part is only used to compute the marginal data density. The IRFs are governed by `msstart2`
