Page 1 of 1

Bivariate H-P Filter

Posted: Mon Mar 26, 2012 1:28 pm
by TomDoan
This is an example of a bivariate HP filter. There's a common growth component for both series. Each series has its own intercept and loading on the growth component, that is, the model has

y1(t) = a1 + g1 G(t) + v1(t)
y2(t) = a2 + g2 G(t) + v2(t)

where G(t) is a standard local trend state space model. If the "SV" matrix is the identity, the series are given equal weight in determining G(t). Changing that to a non-identity will force G to fit better the series with the smaller value for SV. It's based (loosely) upon Kozicki(1999), "Multivariate detrending under common trend restrictions: Implications for business cycle research," Journal of Economic Dynamics and Control, vol. 23(7), pages 997-1028. However, she collapses the model so the common trend can be estimated by a univariate HP filter on a weighted average of the series.

The setup actually will fit two or more series; you just have to change n=2 and redo the frml yf line.

This is covered in detail in the 2nd Edition of the State-Space/DSGE e-course.
ss_6_2.rpf
Program file
(2.13 KiB) Downloaded 835 times
oecdgdp.rat
Data file
(45.75 KiB) Downloaded 957 times

Re: Bivariate H-P Filter

Posted: Fri Apr 07, 2017 6:28 am
by BinhPham
Dear Tom,

First of all, I would say thank to your multivariate HP filter.

Yet, I would want to have multivariate one-sided HP filter. Is is possible in term of theoretical aspects?
Because I am really a new RATSer, could you guide me some RATS code?

Thank you and best regards,

Re: Bivariate H-P Filter

Posted: Thu Aug 31, 2017 11:56 am
by TomDoan
Use TYPE=FILTER rather than TYPE=SMOOTH on the DLM instruction.