* tsfiltering examples cfb 7621 cd /Users/baum/doc/Stata/TSFiltering/ insheet using reer,clear tsmktim ym,start(1979m1) rename dataval usREER label var ym date label var usREER "US Real Effective Exchange Rate, monthly" desc su tsline usREER graph export fig1.pdf, replace * HP hprescott usREER, stub(HP) tsline usREER HP_usREER_sm_1, ti("Hodrick-Prescott estimated trend, lambda=129600") graph export fig2.pdf, replace tsline HP_usREER_1, ti("HP-filtered US REER") graph export fig3.pdf, replace * BK bking usREER, plo(18) phi(96) stub(BK) tsline BK_usREER_1, ti("Baxter-King filtered US REER, plo=18, phi=96") graph export fig4.pdf, replace * CFITZRW cfitzrw usREER, plo(18) phi(96) stub(CF) tsline CF_usREER_1, ti("Christiano-Fitzgerald filtered US REER, plo=18, phi=96") graph export fig5.pdf, replace * Butterworth butterworth usREER, freq(18) stub(BW) tsline BW_usREER_1, ti("Butterworth filtered usREER, freq=18") graph export fig6.pdf, replace * combined tsline HP_usREER_1 BK_usREER_1 CF_usREER_1 BW_usREER_1 if tin(1982m1,1989m12), /// ti("Alternate time series filters for US REER, 1982-1989") graph export fig7.pdf, replace