Floating points in @elem
Posted: Tue Aug 02, 2011 10:11 pm
I am writing a program that requires estimation over a number of different sample periods. I have successfully coded this using a series of nested while loops, with code such as:
smpl 1998:1 200!i:!j
where !i and !j are the floats I'm using to index the while loops. This works. However, when I try and call an element from a series using a similar expression:
scalar forerror = @elem(pi, "200!i:!j")
eviews doesn't like this, and says I've entered an illegal date. Am I doing something stupid here, or is it just that the @elem value doesn't allow floating points when one calls a date? I can work around this, by calculating the numerical indice of the element, but it seems strange.
Thanks,
Nikhil
smpl 1998:1 200!i:!j
where !i and !j are the floats I'm using to index the while loops. This works. However, when I try and call an element from a series using a similar expression:
scalar forerror = @elem(pi, "200!i:!j")
eviews doesn't like this, and says I've entered an illegal date. Am I doing something stupid here, or is it just that the @elem value doesn't allow floating points when one calls a date? I can work around this, by calculating the numerical indice of the element, but it seems strange.
Thanks,
Nikhil