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.
Bivariate H-P Filter
Re: Bivariate H-P Filter
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,
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
Use TYPE=FILTER rather than TYPE=SMOOTH on the DLM instruction.
Last bumped by TomDoan on Thu Aug 31, 2017 11:56 am.