Skip to content

TSFILTER

Trend-cycle decomposition with the Hodrick-Prescott, Baxter-King or Christiano-Fitzgerald filter.

TSFILTER varlist /METHOD=HP [(LAMBDA=1600)] | BK [(LOW=6 HIGH=32 K=12)] | CF [(LOW=6 HIGH=32 DRIFT=YES|NO)] [/PLOT=SERIES NONE] [/SAVE=TREND CYCLE].
Kind Procedure (reads data, produces output)
Body main /SUBCOMMAND[=] …
Changes data yes, undoable
Subcommands /METHOD, /PLOT, /SAVE
Menu Analyze ▸ Forecasting
Slot: Variables 1+ variable(s); levels: scale; types: numeric
TSFILTER gdp /METHOD=HP (LAMBDA=1600) /SAVE=TREND CYCLE.
TSFILTER output employment /METHOD=BK (LOW=6 HIGH=32 K=12) /SAVE=CYCLE.
  • Baxter-King leaves the first and last K cycle values missing.
  • Results match statsmodels’ hpfilter, bkfilter and cffilter.

SPECTRA, SEASON


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.