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" <[email protected]>
To: <[email protected]>
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
> [email protected]
>
> 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/