Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Hodrick-Prescott Filter


From   Matthew Baker <matthew.baker@hunter.cuny.edu>
To   statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index