On Tue, 13 Jun 2006, Riccardo Jack Lucchetti wrote:

> On Tue, June 13, 2006 22:40, Daniel wrote:

>> Im a novice at this so my question might be kind of simple but 
>> does anyone know how to apply the HP-filter in gretl to alot of 
>> time series. I have like 200 series to filter so doing it 
>> manually is pretty time consuming...
>
> Loops are your friends; try this in the console or, better 
> still, in a script:
>
> loop foreach i x y z
>  series cyc_$i = hpfilt($i)
>  series tre_$i = $i - cyc_$i
> end loop

Or if the series are contiguous in the data set:

loop foreach i firstv..lastv
   stuff

Allin Cottrell

Reply via email to