Eviews gives different number of iterations for same model??

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Eviews gives different number of iterations for same model??

Postby strypste » Fri May 16, 2014 7:19 am

Hi

I came across something very strange... When I open EViews and I estimate a GARCH-M model with some initial values I get an output that says "Failure to improve likelihood after 34 iterations". No big deal.. But here is the weird thing: When I open EViews again (while the other "EViews" is still open), and I estimate the same GARCH-M model with the same initial values then I get an output that says "Failure to improve likelihood after 40 iterations".

Does somebody have an idea about why this happens??

Cheers
Steven

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Eviews gives different number of iterations for same mod

Postby startz » Fri May 16, 2014 8:44 am

Possibly different starting values in the c vector.

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Fri May 16, 2014 8:57 am

Hey Starz

Thanks for your reply.. So how would you deal with this then? Setting the c matrix to 0 every time I perform a new estimation?

Cheers
S

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Eviews gives different number of iterations for same mod

Postby startz » Fri May 16, 2014 9:17 am

That's a very reasonable approach.

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

Re: Eviews gives different number of iterations for same mod

Postby EViews Glenn » Fri May 16, 2014 11:09 am

A reasonable approach but I will throw out a warning that in some settings, 0 may not be good starting value since it cause problems when coefficients are not identified under that null.

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Eviews gives different number of iterations for same mod

Postby startz » Fri May 16, 2014 11:23 am

Perhaps just run least squares without the Garch term first to get good starting values?

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Fri May 16, 2014 2:38 pm

Thanks for your replies!

I thought about your suggestion... In my program, however, I use the "s=number" option. The help says the following about this option: "Specify a number between zero and one to determine starting values as a fraction of preliminary LS estimates (out of range values are set to “s=1”)". Setting s=1 and showing the initial values in the output (by using "shopopts" as an option), shows that this is indeed the case. So I think it is not needed to estimate the model with OLS first, as EViews does this automatically...

Maybe it is a good idea to give a bit more detail about what I am actually trying to do to figure out what is going on here. I want to perform a fixed window rolling estimation (initial sample period 1962m01-2004m12) for 7 countries. My program uses two main loops. The first one determines the sample (this loops makes sure that the start date and end date move up with one). Once the sample is determined I estimate GARCH models for each country using a loop. In that loop, I estimate AR(p) models (the models also include shift dummies in the mean and variance equation + cross country weighted averages in the mean equation) with various initial values. So I set s=1 and estimate, s=0.9 and estimate , ... s=0.1 and estimate. After the all the estimations I select the best model (i.e. using the initial values that maximise the likelihood I pick the model that minimises the AIC.).

When does my problem occur, i.e. when do I get different "best" models caused by a change in number of iterations?

If I run the program with all the loops activated, i.e. for all the possible windows and all the countries I get some results...
If I run the program with only the rolling regression loop activated, i.e. I allow the country loop to only do the regressions for 1 country, then I get different results (models are estimated with a different number of iterations).
if I run the program setting the country loop to one country AND the regression loop to one sample period, then I get also different result (models are estimated with a different number of iterations).

How is this possible?

Please let me know if something is unclear or you want to check the actual program.. I am very eager to solve this issue.

Cheers
s

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Mon May 19, 2014 7:41 am

I am using EViews 8.

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Mon May 19, 2014 9:27 am

Maybe this piece of information is also useful..

If I follow the following procedure I get the same results.

I open EViews once and I open the program three times. Then I adjust the three programs accordingly. So adjust the first program so that it uses all the loops (so for all sample periods and all countries), then the second so that it only uses the sample loop (so for one country and for all sample period) and finallyt the third program so that it uses only the country loop (so for one sample period and all countries). If I run these three programs and I look at the same country and sample period, then I get the same results..

This makes me think that when starting EViews, some variables gets selected.. Maybe some seed for random number generation??

Hope this helps..
S

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

Re: Eviews gives different number of iterations for same mod

Postby EViews Glenn » Mon May 19, 2014 12:48 pm

Post the workfile and programs with a complete description of how to replicate the differences.

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Tue May 20, 2014 2:35 am

I posted the workfile and two programs. (The first line calls the program as it is organised on my computer.. and the last line saves the workfile. I did not change this as I did not want to change anything to my program for posting.. But you should adjust these lines to run it on your computer I think.) Thanks for checking the programs!

The two programs are exactly the same, except that program 1 does the estimations for all sample periods and all countries and program 2 only does the estimation for 1 sample period and one country (in particular I set the country loop to fr (so France) and sample period 49).

The actual loop code can be find on line 95 (sample period loop) and line 113 (country loop).

In the output of program 1, you find the information on the best model for sample period 49 for France in the second column of matrix object "bestmodel_49". In the output of program , you find the information on the best model for sample period 49 for France in the first column of matrix object "bestmodel_49". (This is because I use a counter and if you only run the program for one country the counter is equal to 1, if you do it for all countries the counter for France is 2)

The first row is the index number of the best model. The second row is the optimal number of AR lags, the third row is the initial value used (this goes from 1 to 10.) and finally the last row specifies what variance model that is used (1=arch;2=arch with t distribution; 3=garch;4=garch with t distribution).

If you look at the freezed object "best3_fr49" you find the actual estimated model. Here you can find the number of iterations.

The programs should give different results.. Meaning different third row of matrix object "bestmodel_49", different number of iterations and sometimes it will pick a complete different model (for example an arch instead of garch), because it could not estimate the optimal garch model (as it did not do enough iterations and so it did not converge properly.)
Note, however, that the mistakes happen at random. So sometimes it is possible that the program gives the same results.. In that case, try another sample period (45 suffers from the same problem on my computer)..

Hope this helps...

Thanks!
Attachments
adjusted_data_g7.wf1
(193 KiB) Downloaded 306 times
program2.prg
(39.78 KiB) Downloaded 337 times
program1.prg
(39.76 KiB) Downloaded 347 times

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Tue May 20, 2014 8:59 am

I also should mention that for some models EViews is not able to find convergence and so you get an error (The error you get is: Log of non positive number in...). Because this error should not stop the program, you should set "Maximum numbers before halting" to a high number.

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

Re: Eviews gives different number of iterations for same mod

Postby EViews Glenn » Tue May 20, 2014 10:58 am

What version of EViews are you using (and what is the build date)?

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

Re: Eviews gives different number of iterations for same mod

Postby EViews Glenn » Tue May 20, 2014 11:27 am

I need zilc_noystar_m3_forecast.prg to run your program.

strypste
Posts: 53
Joined: Tue Jan 24, 2012 8:54 am

Re: Eviews gives different number of iterations for same mod

Postby strypste » Tue May 20, 2014 12:08 pm

I am so sorry to have forgotten to upload that file.. I uploaded it now..

I use EViews 8. If I open the menu "Help" and click on "About Eviews" I get: Standard Edition - April 5 2013 Build.
Attachments
zilc_noystar_m3_forecast.prg
(6.93 KiB) Downloaded 354 times


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests