Page 1 of 1

Solve loop in model

Posted: Thu Dec 17, 2015 2:01 am
by bsg9
Hi,

I am using Eviews 8.

I try to make a loop in which I create several models that differ in their estimation and forecast samples.
It looks like :

Code: Select all

for !i = 0 to 12
smpl 2000Q1 2010Q4+!i (estimation sample)
model modelname{!i}

(...)

smpl 2011Q1+!i 2011Q4+!i (forecast sample)

modelname{!i}.append ....
modelname{!i}.merge ....

solve(d=s, s=a) modelname{!i}

next


My problem is that Eviews only stores the results of each model "modelname" for the last forecast sample (in the example 2014Q1 2014Q4). Whereas I want to have modelname1 solved only for 2011Q2 2012Q1; modelname2 solved for 2011Q3 2012Q2, etc.
Do you know what is the problem ? How can I force Eviews to store my results each time ?

Thank you very much

Re: Solve loop in model

Posted: Thu Dec 17, 2015 7:11 am
by bsg9
I have tried several things and I have noticed that Eviews erases each time the baseline solution (the variable in _0) with the new one. That is why at the end of the loop I get only the solution with the last sample.

But is there a way to give other aliases to the baseline solution ? Or at least to store anyhow different baseline solutions for different models in a same workfile ? How can I do it please ?

I have tried to create several scenarios at each iteration but Eviews does not seem to accept that only the sample varies from one scenario tothe other (I think he wants me to shock a variable).

If you have an idea, it would be of great help.

Thank you again.

Re: Solve loop in model

Posted: Thu Dec 17, 2015 10:40 am
by EViews Gareth
Scenarios cannot have different samples - Scenarios don't have samples at all.

You cannot change the baseline alias.

Perhaps the best thing to do is simply copy the results of each solve into a new series each time.