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
Floating points in @elem
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Floating points in @elem
You can't have ! variables inside quotes. Try:
Code: Select all
%s = "200" + @str(!i) + ":" + @str(!j)
scalar forerror = @elem(pi, %s)
Re: Floating points in @elem
Brilliant, nice trick. Also, the promptness of your response was startling. Many thanks.
Nikhil
Nikhil
Who is online
Users browsing this forum: No registered users and 2 guests
