Page 1 of 1

how to easily loop over a sample

Posted: Mon Apr 28, 2014 3:04 am
by ginanjar
Hi all,

suppose I have sample 2008m1 2013m12
I want to make table object
like below

================================================
2008m1 2008m2 2008m3 .... 2013m12
===============================================
eksogen

behavioral

identity
===============================================
I already have the group for all variable, eksogen, identity, and behavioral so I can loop over it.
But how do I make the title column for the sample object.

thanks for any hints.

with kind regards,
ginanjar

Re: how to easily loop over a sample

Posted: Mon Apr 28, 2014 8:33 am
by EViews Gareth
A little tricky...

Code: Select all

!startdate = @dateval("2008m1") !enddate = @dateval("2013m12") create u 10 table a !num = @datediff(!enddate, !startdate, "MM")+1 for !i=1 to !num a(1,!i) = @datestr(@dateadd(!startdate, !i-1, "MM"), "YYYY/MM/DD") next

Re: how to easily loop over a sample

Posted: Mon Apr 28, 2014 8:16 pm
by ginanjar
Thanks Gareth