Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: RE: Re: RE: Re: -hpfilter- question


From   Giorgio Ricchiuti <ricchiuti.g@tiscali.it>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: RE: Re: RE: Re: -hpfilter- question
Date   Fri, 27 Feb 2004 17:36:17 +0100

Thanks Nick,
I'll try to apply the filter for each country and then add all in a
variable. Could it be a good, even long, solution?
something like

hpfilter myvar if country==1, s(c1)
hpfilter myvar if country==2, s(c2)

and then

gen filtermyvar=H_c1
replace filtermyvar=H_c2 if country==2

thanks again
Giorgio

----- Original Message -----
From: "Nick Cox" <n.j.cox@durham.ac.uk>
To: <statalist@hsphsun2.harvard.edu>
Sent: Friday, February 27, 2004 5:15 PM
Subject: st: RE: Re: RE: Re: -hpfilter- question


> Sorry, Giorgio: I can't see your data from here
> to experiment. Nor am I an expert on that program.
>
> But I do know that -hpfilter- is full of bizarre
> things. Some interest was shown a while ago
> in rewriting it, but I'm not sure what became of
> that. Possibly good intentions were not enough,
> and the project was swamped by other things.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Giorgio Ricchiuti
>
> > I tried to use your programma and at the beginning I thought
> > it was ok.
> > However, I've found out that there are some countries for
> > which the programm
> > does not work, they present just missing values. Do you know
> > why? is it tsset?
>
> Nick Cox
>
> > > Almost certainly not.
> > >
> > > My code is, at best, applicable
> > > if your variables are called
> > >
> > > country
> > > year
> > > myvar
> > >
> > > and will probably need changing
> > > to match your variable names.
> > >
> > > Also, -hpfilter- is full of strange
> > > details, so I might easily be missing
> > > something.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index