@elem(ser,j) can not use integer J

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

@elem(ser,j) can not use integer J

Postby maxchen » Tue Oct 29, 2013 5:06 pm

EV8 32bit build 2013-10-22

in p481 of "EViews 8 Object Ref.pdf" , to access the j-th observation of the series, using @elem(ser,j)

Code: Select all

pagecreate(page=ar1) u 4 rndseed(type=mt) 12347 genr e = 0.6*nrnd 'sig=0.6 'c(1) = @elem(e,1) 'error c(2) = @elem(e,"2") c(3) = @elem(e,@str(3)) c(4) = @elem(e,@otod(4))
However, the line "c(1) = @elem(e,1)" will not work, the error info says we need a string. Is it possible to support integer to retrive j-th element?

etienne
Posts: 19
Joined: Wed Jun 12, 2013 10:32 am

Re: @elem(ser,j) can not use integer J

Postby etienne » Wed Oct 30, 2013 7:35 am

Hi,

I've not checked if the documentation is correct, it may not be, but at least you can easily work around this with the @str function.

So,

Code: Select all

c(1) = @elem(e,@str(1))
would work.

Example,

Code: Select all

for !i = 1 to @obsrange c(!i) = @elem(e,@str(!i)) next

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: @elem(ser,j) can not use integer J

Postby EViews Glenn » Wed Oct 30, 2013 11:01 am

The docs are wrong. It should be a string. We'll get them corrected.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest