Hi I'm a bit of a newbie with eviews programming and dont really get it!
I want to carry out a really simple thing.
Basically I have about 100 time series, OLS equations i want to estimate . For simplicity say I have a dependent variable Fruitprice, an explanatory variable vegetableprice and a specific fruit that i want for the additional explanatory variable which varies across each esimation eg.
Fruitprice c vegetableprice orange
Fruitprice c vegetableprice apple
x97 different fruits
Fruitprice c vegetableprice peach
Is there a loop i can use in which i can just copy all the fruit names into a list and loop through each one. I used to use Aremos and you could do something like:
For i = orange, apple, peach,...........;
equation "i".ls fruitprice c vegetableprice "i"
next i
Your help would be greatly appreciated!!!
Looping series
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Looping series
You could do it in a similar fashion to Aremos:
However, perhaps an easier approach would be to put all 97 fruits into a group, say called FRUITS, then do:
Code: Select all
for %i orange apple peach
equation eq_{%i}.ls fruitprice c vegtableprice {%i}
next
Code: Select all
for !i =1 to fruits.@count
%name = fruits.@seriesname(!i)
equation eq_{%name}.ls fruitprice c vegtableprice {%name}
next
Re: Looping series
That's amazing! thanks so much!!
I dont suppose there is a way of copying all the results to excel somehow?
many thanks again.
Howard
I dont suppose there is a way of copying all the results to excel somehow?
many thanks again.
Howard
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Looping series
There's lots of similar questions already posted, and I'm sure with a search you can find a more thorough answer, but the general reply is that the easiest thing to do is add all of your equation outputs to a spool, then print the spool to an rtf file.
Who is online
Users browsing this forum: No registered users and 2 guests
