Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Hodrick-Prescott Filter
From
Matthew Baker <[email protected]>
To
[email protected]
Subject
st: Hodrick-Prescott Filter
Date
Wed, 28 Sep 2011 14:53:12 -0400
Dear Listers:
I have a question about the hprescott command in Stata. I have two
time series, and one series begins later than the other. When I issue
the command:
hprescott series1 series2, stub(hp)
I get different results from when I give the command:
hprescott series1, stub(hp):
Evidently, filtering two series together gives different results from
filtering them separately when the series have varying lengths.
Does asking the program to filter two series simultaneously, when the
series have different numbers of observations mean that the command
throws out the "extra" observations in one of the series so as to
ensure that both series have the same number of observations, and is
this all that is going on?
An example:
clear*
webuse dfex
tsset month
hprescott unemp, stub(hp)
hprescott unemp income, stub(hp1)
replace income=. in 1/40
hprescott unemp income, stub(hp2)
sum hp_unemp_1 hp1_unemp_1 hp2_unemp_1
The observation is that hp2_unemp_1 is different than the first two,
and the only change has been that there are fewer observations of the
income variable.
Thanks very much.
Matt Baker
--
Dr. Matthew J. Baker
Department of Economics
Hunter College and the Graduate Center, CUNY
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/