[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Re: hodrick prescott filter
From
Kit Baum <[email protected]>
To
[email protected]
Subject
st: Re: hodrick prescott filter
Date
Sun, 1 Nov 2009 07:29:31 -0500
On Nov 1, 2009, at 2:33 AM, Michael wrote:
On Oct 29, 2009, at 12:45 PM, Marwan Elkhoury wrote:
I have a panel data with 180 countries over 10 years (annual data)
and I tried to run a hodrick prescott filter over it to smooth data
by typing the following command in stata 10:
H-P filtering 12 annual observations seems a highly dubious practice,
even if it were possible. Even detrending such a short sample with a
quadratic or cubic trend seems to be asking quite a lot -- if not too
much -- from those data.
by cntry: hprescott realgdomcred realgdpgrowth if tin(1997, 2008),
stub(HP) smooth(6.25)
and I get error 3301 subscript invalid;
I've tried to increase memory size to 100M
and maxvar size to 10000
as well as matsize to 6500 (could not increase it to more)
Kit Baum, the author of -hprescott-, would be the best person to
answer this question. Nonetheless, I would not be surprised if the -
hprescott- code implicitly assumes a much longer time series, for the
reason stated above.
I agree wholeheartedly with Michael that time series filtering
techniques like the HP filter make little sense in the context of 10
observations. However I cannot reproduce the error:
. webuse grunfeld,clear
. by company:hprescott invest kstock if tin(1935,1947), stub(HP) smooth
(6.25)
does indeed generate results for each company. Return code 3301 is a
Mata error, but without an example of how this error can be generated,
I don't know where it might be generating a problem.
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming
| http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* 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–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |