TSFILTER
Trend-cycle decomposition with the Hodrick-Prescott, Baxter-King or Christiano-Fitzgerald filter.
Syntax
Section titled “Syntax”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].Synopsis
Section titled “Synopsis”| 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 |
Examples
Section titled “Examples”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.
Related
Section titled “Related”Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.