EconPapers    
Economics at your fingertips  
 

HAMILTONFILTER: Stata module to calculate the Hamilton Filter for a Single Time Series or for a Panel Dataset

Ibrahima Diallo

Statistical Software Components from Boston College Department of Economics

Abstract: hamiltonfilter calculates the Hamilton filter for a single time series or for a panel dataset. The command uses the Hamilton filter to separate a time series into trend and cyclical components. The Hamilton filter is utilized as an alternative to the Hodrick-Prescott high-pass filter. The theory behind the command hamiltonfilter is provided by Hamilton (2017). The paper also gives the criticisms of the Hodrick-Prescott filter and explains why the Hamilton filter is a superior alternative.

Language: Stata
Requires: Stata version 14
Keywords: Hamilton filter; time series; panel; Hodrick-Prescott (search for similar items in EconPapers)
Date: 2018-01-04, Revised 2020-04-01
Note: This module should be installed from within Stata by typing "ssc install hamiltonfilter". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations: View citations in EconPapers (1)

Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/h/hamiltonfilter.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/h/hamiltonfilter.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/h/hamiltonfilterdyearly.dta sample data file (application/x-stata)
http://fmwww.bc.edu/repec/bocode/h/hamiltonfilterdquarterly.dta sample data file (application/x-stata)
http://fmwww.bc.edu/repec/bocode/h/hamiltonfilterdmonthly.dta sample data file (application/x-stata)
http://fmwww.bc.edu/repec/bocode/h/hamiltonfilterdgseven.dta sample data file (application/x-stata)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s458449

Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php

Access Statistics for this software item

More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum (baum@bc.edu).

 
Page updated 2025-03-30
Handle: RePEc:boc:bocode:s458449