# Unit Root - Bayesian Estimation

**URL:** <https://forum.dynare.org/t/unit-root-bayesian-estimation/5237>\
**Category:** Dynare help (legacy posts)\
**Created:** [22 January 2016 03:14 UTC](https://forum.dynare.org/t/unit-root-bayesian-estimation/5237 "2016-01-22T03:14:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElderSouza](https://forum.dynare.org/user_avatar/forum.dynare.org/eldersouza/32/9637_2.png) [@ElderSouza](https://forum.dynare.org/u/ElderSouza)\
**Post date:** [22 January 2016 03:14 UTC](https://forum.dynare.org/t/unit-root-bayesian-estimation/5237/1 "2016-01-22T03:14:52Z")

</div>

Hello ,  
I’m new in Bayesian estimation and I’ve made an code based on Gali and Monacelli 2008, but I have some doubts related to Unit Roots.  
In my model, i have data for inflation, GDP, nominal interest rate, term of trade and debt to GDP ratio. And all of it has an unit root or strutural break, how can I define it in my model? To mitigate unit roor I’ve put it in this way:

DLGDP = GDP - GDP(-1);  
DLINFLATION = Inflation\_H- Inflation\_H(-1);  
DLGDPGAP = GDP\_GAP - GDP\_GDP(-1);  
DLNOMINALINTEREST = nominal\_interest\_rate- nominal\_interest\_rate(-1);  
DLTOT = Term\_of\_trade - Term\_of\_trade(-1);  
DDEBT = debt(+1)- debt;

But, I am not pretty sure whether it is correct. Could someone help me?

Thanks in advanced,

Elder Souza

---

<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:** [24 January 2016 19:40 UTC](https://forum.dynare.org/t/unit-root-bayesian-estimation/5237/2 "2016-01-24T19:40:24Z")

</div>

Please have a look at Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” [sites.google.com/site/pfeiferecon/Pfeifer\_2013\_Observation\_Equations.pdf](https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf).  
You cannot deal with structural breaks this way. You have to purge the data of the break before estimation. Going for first differences to deal with non-stationarity is correct, although it is very unusual to use first differences of stationary variables like the nominal interest rate or inflation.

---

<div class="post-metadata">

**Author:** ![ElderSouza](https://forum.dynare.org/user_avatar/forum.dynare.org/eldersouza/32/9637_2.png) [@ElderSouza](https://forum.dynare.org/u/ElderSouza)\
**Post date:** [25 January 2016 14:46 UTC](https://forum.dynare.org/t/unit-root-bayesian-estimation/5237/3 "2016-01-25T14:46:49Z")

</div>

Sr. Pfeifer,  
I would like to thank you for your answer and give you congratulations about the document, it is very elucidative.
