Hi Eviews users,
I am very puzzled by a strange results eviews 6 gives me: I want to access element "@first+t" (where t is a predefined scalar) of series x...
the same command :
scalar pr=@elem(x,"@first+t")
will give the right result in one workfile, and 0 in the other workfile, even if in both files the series x has no Na and obviously it has a finite value for the obsrvervation @first+t....is my syntax wrong in any way? can this be a bug?
If any of u has any idea of what's going on please let me know...
mistery in @elem function
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
Re: mistery in @elem function
Code: Select all
scalar pr=@elem(x,"@first+t")
Code: Select all
%date = @otod(t+1)
scalar pr = @elem(x, %date)
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: mistery in @elem function
I should also note that you can actually do:
although I don't recommend this, since it is confusing when using it with:
since the first example access the t+1th element of X, the second example access the t+1th lead of X, and it can be confusing to figure out which one you're doing.
Code: Select all
scalar pr = x(t+1)
Code: Select all
series pr = x(t+1)
Re: mistery in @elem function
Thanks!
I had the feeling that I was missing something stupid... :D
I had the feeling that I was missing something stupid... :D
Who is online
Users browsing this forum: No registered users and 2 guests
