# Particle filter & estimation at 3rd order

**URL:** <https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835>\
**Category:** Stochastic simulations\
**Created:** [3 December 2019 03:03 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835 "2019-12-03T03:03:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mxecon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@mxecon](https://forum.dynare.org/u/mxecon)\
**Post date:** [3 December 2019 03:03 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/1 "2019-12-03T03:03:46Z")

</div>

Dear all,

I have two related questions:

1. As of now, is Dynare allowing estimation at order 3 based on some particle filter? Or is it planned to be made possible soon?
2. Dynare has a particle filter module, used in estimation at order = 2. Even if estimation is not yet possible at order 3, are some of those filters still working with order = 3 already, or are some such versions available somewhere? (Glimpsing at the code, it seems that most is for order 2, but I may have missed something.)

Basically, I am looking for a particle filter that can be applied to decision rules from Dynare at order 3 somewhat naturally and I really want to make sure that none exists (even some crude version) before coding it myself.

My goal is for now to back out shocks from a 3rd-order model whose parameters have been estimated in another way (SMM), but I could be interested in doing the estimation itself with the particle filter further down the line.

(Note: I am aware of the particle filter code by Professor Pfeifer, but this code is applied to an AR process with stochastic volatility, as far as I am aware. Instead, here, I really want to apply the filter/smoother to Dynare decision rules.)

Thank you very much!

---

<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:** [6 December 2019 10:51 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/2 "2019-12-06T10:51:07Z")

</div>

We are working on it. See [https://git.dynare.org/Dynare/dynare/issues/1673](https://git.dynare.org/Dynare/dynare/issues/1673)

But it seems that estimation in itself would not be sufficient for you. You seem to be interested in the smoother, which is not there yet.

---

<div class="post-metadata">

**Author:** ![mxecon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@mxecon](https://forum.dynare.org/u/mxecon)\
**Post date:** [6 December 2019 23:51 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/3 "2019-12-06T23:51:50Z")

</div>

Dear Prof. Pfeifer,

Ok, thank you for the information. I am indeed interested mostly in the smoother for now, although the estimation is already great news.

Let me know if you have a sense of whether/when the team will work on the smoother.

Thanks!

---

<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:** [8 December 2019 18:37 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/4 "2019-12-08T18:37:14Z")

</div>

This is mostly in @frederic.karame’s wheelhouse. He might know more.

---

<div class="post-metadata">

**Author:** ![mxecon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@mxecon](https://forum.dynare.org/u/mxecon)\
**Post date:** [8 December 2019 22:16 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/5 "2019-12-08T22:16:58Z")

</div>

Sounds good, thank you!

---

<div class="post-metadata">

**Author:** ![frederic.karame](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/53a042/32.png) [@frederic.karame](https://forum.dynare.org/u/frederic.karame)\
**Post date:** [9 December 2019 09:33 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/6 "2019-12-09T09:33:19Z")

</div>

No particle smoother for the moment.  
Order 3 is nearly ready but has not been tested with particle filtering.

---

<div class="post-metadata">

**Author:** ![mxecon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/d9b06d/32.png) [@mxecon](https://forum.dynare.org/u/mxecon)\
**Post date:** [9 December 2019 17:18 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/7 "2019-12-09T17:18:54Z")

</div>

Sounds good, thank you both for the information. I’ll have a look at the order 3 estimation in a little while.

---

<div class="post-metadata">

**Author:** ![abilov001](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@abilov001](https://forum.dynare.org/u/abilov001)\
**Post date:** [12 August 2021 11:33 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/8 "2021-08-12T11:33:46Z")

</div>

Hello!  
Want to catch up: has the order 3 estimation with particle filtering been done yet?

---

<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 August 2021 12:27 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/9 "2021-08-12T12:27:16Z")

</div>

Yes, but as of Dynare 4.7 not together with `pruning` yet.

---

<div class="post-metadata">

**Author:** ![abilov001](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@abilov001](https://forum.dynare.org/u/abilov001)\
**Post date:** [13 August 2021 02:57 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/10 "2021-08-13T02:57:31Z")

</div>

Dear Prof. Pfeifer,  
Thank you for your answer! I looked for ‘particle filter’ in the manual but could not find any mention of it. I just know that ‘mode\_compute=11’ has something to do with it. Could you please tell what the estimation command should look like for particle filter estimation? I presume it estimates only with second-order approximation or there is the possibility of doing it at third-order?

---

<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:** [13 August 2021 08:00 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/11 "2021-08-13T08:00:45Z")

</div>

You can set `order=3`. See also the examples at [tests/particle · master · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/tree/master/tests/particle)

---

<div class="post-metadata">

**Author:** ![abilov001](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@abilov001](https://forum.dynare.org/u/abilov001)\
**Post date:** [13 August 2021 09:54 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/12 "2021-08-13T09:54:21Z")

</div>

Thank you so much, prof! You’re the best!

---

<div class="post-metadata">

**Author:** ![AdrianGM](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@AdrianGM](https://forum.dynare.org/u/AdrianGM)\
**Post date:** [11 February 2026 11:02 UTC](https://forum.dynare.org/t/particle-filter-estimation-at-3rd-order/14835/13 "2026-02-11T11:02:00Z")

</div>

Hello dears,

Could be possible to estimate a simple RBC model that includes uncertainty shocks using that third-order aproximation in Dynare?? How the code would look like???

Thanks in advance
