As far as I can see, this is just a longer-winded
way of doing what was done with my loop. The
answers it gives should be the same, and thus no
better. In short, this approach will not solve any
problem with what -hpfilter- does.
Instead of finding a different way of using the
program, you may have to look inside it yourself
to see what it is going on.
Nick
n.j.cox@durham.ac.uk
Giorgio Ricchiuti
> 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.
*
* 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/