------------------------------------------------------------------------------- help forcfitzrwSSC distribution 30 June 2006 -------------------------------------------------------------------------------

Apply Christiano-Fitzgerald Random Walk band pass filter to time series

cfitzrwvarlist[ifexp] [inrange],plo(#)phi(#)stub(abbrev)

You must

tssetyour data before usingcfitzrw; see helptsset. If a panel calendar is in effect, the filter can be applied if a single panel is specified using if or in qualifiers, or with thebyprefix.

varlistmay contain time-series operators; see helpvarlist.

cfitzrwfilters one or more time series using the Christiano-Fitzgerald Random Walk band-pass filter described in Christiano and Fitzgerald (2003). Theplo()andphi()arguments specify the minimum period of oscillation and maximum period of oscillation of the desired component of the time series, where 2 <=plo<phi< infinity.

Optionsplo(#)andphi(#)specify the minimum and maximum period of oscillation to be retained in the time series, and must be given. For quarterly data, common values are 6 and 32, which preserve the components of the data with period between 1.5 and 8.0 years. For monthly data, common values are 18 and 96, which preserves the component of the data with period between 1.5 and 8.0 years. For annual data, common values are 2 and 8.

stub(abbrev), which must be provided, specifies the "stub" from which new variable names will be created. Variables created bystubmust be new variables. If thevarlistcontains time-series operators, the dots in their names are replaced by underscores so that the resulting new variables' names are legal.

Examples. webuse lutkepohl,clear

. cfitzrw investment, plo(6) phi(32) stub(F)

. cfitzrw investment income consumption, plo(6) phi(32) stub(filt)

. cfitzrw D.investment, plo(4) phi(12) stub(fl)

. use http://fmwww.bc.edu/ec-p/data/hayashi/sheston91.dta,clear

. drop if country>4

. tsset

. by country: cfitzrw rgdppc, plo(2) phi(8) stub(SBY)

AuthorsChristopher F. Baum, Boston College, USA baum@bc.edu

Martha Lopez, Boston College, USA lopezmo@bc.edu

ReferencesLawrence J. Christiano and Terry J. Fitzgerald, The Band Pass Filter, International Economic Review, 2003, 44(2), 435-465. Pawel Kowal (2005). MATLAB implementation of commonly used filters, http://ideas.repec.org/c/wpa/wuwppr/0507001.html

AcknowledgementsThe Mata code of this routine was translated from MATLAB code made available by Pawel Kowal (2005).

Also seeOn-line: hprescott (if installed), bking (if installed), tsset