# Demean the series or not

**URL:** <https://forum.dynare.org/t/demean-the-series-or-not/11130>\
**Category:** ML/Bayesian estimation\
**Created:** [20 December 2017 01:40 UTC](https://forum.dynare.org/t/demean-the-series-or-not/11130 "2017-12-20T01:40:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [21 December 2017 07:33 UTC](https://forum.dynare.org/t/demean-the-series-or-not/11130/2 "2017-12-21T07:33:41Z")

</div>

First of all (as always): do not use the two-sided HP filter for estimating DSGE models. See Pfeifer (2013): “[A Guide to Specifying Observation Equations for the Estimation of DSGE Models](https://drive.google.com/file/d/1r89OU5OE3CBa6tOlj6l3hNVWEaRH5Anv/view?usp=sharing)". If you must, use the one-sided HP filter  
Depending on the filter you use, your data will be mean 0 (true for the one-sided and two-sided HP filter). Prefiltering in this case is not needed, because the empirical mean you subtract will be 0. Thus `prefilter=1` will be harmless, but useless.

---

_[View the full topic](https://forum.dynare.org/t/demean-the-series-or-not/11130)._
