Riccardo, thank you for the script. I will read it in detail and try it out.
Kind regards,
Jan
________________________________________
Von: Plus.line MailSystem [cyrus(a)mailer.plusline.de] im Auftrag von Riccardo (Jack)
Lucchetti [r.lucchetti(a)univpm.it]
Gesendet: Freitag, 6. Juli 2012 12:34
An: Gretl list
Betreff: Re: [Gretl-users] Restricting a sample to specific time series
On Fri, 6 Jul 2012, Jan Tille wrote:
Hello I am a new gretl user and have a question whether and how it
is
possible to run a loop only via a selection of time series that have
minimum length of 24 months. The series's have different start and end
dates and I want to run a regression for each series that has a minimum
of 24 data points. Is there anybody, who can hint me on how to restrict
or define the loop properly. On possibility is, to preselect the data
that I import into gretl but this would be tedious, because I will also
run a different model on all series that have a minimum of 12 data
point.
Maybe you can take a couple of ideas from the script below:
<hansl>
open AWM.gdt --quiet
smpl 1994:1 ;
loop foreach i EEN EEN_DIS EER FDD GCD GCN --quiet
scalar n = sum(ok($i))
printf "$i: %d\n", n
if n>16
printf "OK!\n"
else
printf "Oh, bother!\n"
endif
end loop
</hansl>
--------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
--------------------------------------------------