Bivariate H-P Filter

Use this forum for posting example programs or short bits of sample code.

Bivariate H-P Filter

Postby TomDoan » Mon Mar 26, 2012 1:28 pm

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.

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

bivariatehp.rpf
Program file
(1.67 KiB) Downloaded 91 times

oecdsample.rat
Data file
(243.5 KiB) Downloaded 71 times
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Return to Examples and Sample Code

Who is online

Users browsing this forum: No registered users and 1 guest