Table to series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

acsbarnabas
Posts: 4
Joined: Wed Nov 25, 2009 2:36 pm

Table to series

Postby acsbarnabas » Sat Jan 02, 2010 6:17 am

Dear All,
I have a table with results of previous calculations. The first column is string type, and the second column contains numbers. The table contains 36 observations. I would like to make a series from the second column so that I can use it for further calculations. However I have not found any functions in the manual, which could help me solve this problem.
Any idea about this??
Thank you in advance,
Brgds and Happy New Year,
Barnabas

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Table to series

Postby EViews Gareth » Sat Jan 02, 2010 7:05 am

There is no built-in function to do that (I can't recall anyone ever wanting to do it before either!). You'll have to create an empty series, then loop through the cells of the table one at a time, setting the series value equal to the corresponding table cell.

acsbarnabas
Posts: 4
Joined: Wed Nov 25, 2009 2:36 pm

Re: Table to series

Postby acsbarnabas » Sat Jan 02, 2010 10:22 am

Thank you Gareth, I have thought about this possibility, unfortunately I do not know :(, how to reference different values (cells) of the series...:((
Could you please give a short example on that?

Please have a look at my table creating program..

equation test.ls econv3 c econv1 econv2
!k=1
for !i=0 to 8
for !j=1 to 4
freeze(testtab) test.chow() 200{!i}q{!j}
table tchowresult
tchowresult(!k,1)=testtab(1,1)
tchowresult(!k,2)=testtab(6,2)
delete testtab
!k=!k+1
next
next

brgds,
B

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Table to series

Postby EViews Jason » Wed Jan 06, 2010 2:46 pm

series myseries
myseries(@dtoo("2008Q1")) = tchowresults(1,2)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests