Page 1 of 1

Starting values may be too far from a solution

Posted: Thu Jan 07, 2016 5:30 am
by tvonbrasch
Hi

I have a model where the solve command terminates because "Solver has stalled: starting values may be too far from a solution" (See attached workfile):

Model: AAMODEL
Date: 01/07/16 Time: 13:18
Sample: 2005Q1 2008Q4
Solve Options:
Dynamic-Deterministic Simulation
Solver: Newton
Max iterations = 5000, Convergence = 1e-08

Scenario: Baseline
Solve begin 13:18:19
Solve terminated - Solver has stalled: starting values may be too far from a solution


I pinned down the problem to the last equation in the model
0 * pM92C + pv92S = (m92u * pM92U + m92c * pM92C + pE92S * e92S + pFT92S * ft92S + pF92S * f92S) / x92S + zlw92S * w92S / 1000


The model aamodel01 is a copy of aamodel but without this last equation. There is no problem in solving model aamodel01.

Can you please provide some guidance of why this problem occurs? Is there anything I can do to change starting values or do you have any suggestions on how I should proceed when I see the error message ""Solver has stalled: starting values may be too far from a solution".

Thomas

Re: Starting values may be too far from a solution

Posted: Thu Jan 07, 2016 6:29 am
by EViews Gareth
Enter it as:

Code: Select all

 pv92S = (m92u * pM92U + m92c * pM92C + pE92S * e92S + pFT92S * ft92S + pF92S * f92S) / x92S + zlw92S * w92S / 1000

Re: Starting values may be too far from a solution

Posted: Thu Jan 07, 2016 7:01 am
by tvonbrasch
Thanks for your reply.

Why cannot pM92C be the endogenous variable? (thats why i added 0 * pM92C at the beginning of the equation, see viewtopic.php?f=10&t=9601)

Or put differently, why can I not add the equation
pM92C * m92c = (pv92S - zlw92S * w92S / 1000) * x92S - (m92u * pM92U + pE92S * e92S + pFT92S * ft92S + pF92S * f92S)


to the model aamodel01?
T

Re: Starting values may be too far from a solution

Posted: Thu Jan 07, 2016 7:17 am
by EViews Gareth
Well you can, but then the model becomes too complicated/unrealistic to be able to solve (given the actual data).

Re: Starting values may be too far from a solution

Posted: Thu Jan 07, 2016 7:40 am
by tvonbrasch
Hi again

I dont understand, ...., this relationship almost follows by definition. In the following table i provide the data for the actual series and the right hand side of the equation
pM92C = ((pv92S - zlw92S * w92S / 1000) * x92S - (m92u * pM92U + pE92S * e92S + pFT92S * ft92S + pF92S * f92S))/m92c


PM92C ((PV92S-ZLW92S*W92S/1000)*X92S-(M92U*PM92U+PE92S*E92S+PFT92S*FT92S+PF92S*F92S))/M92C
2002Q1 0.766998 0.768092
2002Q2 0.743449 0.742099
2002Q3 0.769983 0.771445
2002Q4 0.743004 0.741777
2003Q1 0.741436 0.740055
2003Q2 0.745366 0.744482
2003Q3 0.775363 0.776849
2003Q4 0.767769 0.768562
2004Q1 0.967892 0.986053
2004Q2 0.847001 0.852646
2004Q3 0.720763 0.713141
2004Q4 0.628816 0.612173
2005Q1 0.838080 0.841934
2005Q2 0.805068 0.805660
2005Q3 0.796182 0.794577
2005Q4 0.778560 0.775110
2006Q1 0.859367 0.860716
2006Q2 0.879038 0.882223
2006Q3 0.847881 0.845665
2006Q4 0.851436 0.849187
2007Q1 0.871425 0.869945
2007Q2 0.884953 0.884025
2007Q3 0.894669 0.894776
2007Q4 0.914535 0.916788

Can you provide some intuition to why setting pM92C as en endogenous variable makes the model so unrealistic, or why it is so difficult for Eviews to solve the model when PM92c is endogenous?

Im trying to learn the model object in Eviews and any help on this matter is highly appreciated
Thomas

Re: Starting values may be too far from a solution

Posted: Fri Jan 08, 2016 1:44 am
by tvonbrasch
Hi again

Im sorry but I cannot leave this issue until I have understood it properly.

I took the same model and used TROLL to solve it. It was not a problem for TROLL (see attached file). The interesting question is then, why is it difficult for EVIEWS to solve this model when TROLL solves it easily....? Is there a bug somewhere in the EVIEWS solver routine?

MODEDIT Command: lkord;
Analyzing Model's Incidence Matrix
Analyzing Model's Block Structure

The model has 204 blocks, including 3 simultaneous blocks.
The largest block has 14 equations and the next largest has 2.

TROLL Command: simulate;
Generating Simulation Code
Use FILEMOD or SAVEMOD before USEMOD to save code.
Simulations can start from 1995Q1 to 2022Q4 and must end by 2022Q4.
SIMULATE Command: list iter pm92c;
SIMULATE Command: simstart 2005q1; dotil 2005q4;
Date: Block: Iter: What: Value: [Rel. Change:]
2005Q1 38 0 PM92C 0.83808
1 PM92C 0.841934 [+2.09642e-03]
2005Q2 38 0 PM92C 0.841934
1 PM92C 0.80566 [-2.00887e-02]
2005Q3 38 0 PM92C 0.80566
1 PM92C 0.794577 [-6.17618e-03]
2005Q4 38 0 PM92C 0.794577
1 PM92C 0.77511 [-1.09662e-02]
SIMULATE Command: lkord;

The model has 204 blocks, including 3 simultaneous blocks.
The largest block has 14 equations and the next largest has 2.



We are considering going from TROLL to EVIEWS as our modelling software. It is therefore important for us to know what limitations there are in terms of how EVIEWS solves models.

Hope you can help me on this matter.

Thomas

Re: Starting values may be too far from a solution

Posted: Fri Jan 08, 2016 9:54 am
by EViews Gareth
I doubt it is a bug.

I don't know enough about TROLL to be able to say what sort of solving algorithm it uses, or what convergence criteria. But I was able to solve your model by using a Broyden solver with a convergence criteria of 1e-5.

Re: Starting values may be too far from a solution

Posted: Mon Jan 11, 2016 11:59 am
by tvonbrasch
Hi Gareth

Thanks for your reply. I believe the troll solver is a Newton type. Not sure about the convergence criteria.

Thomas

Re: Starting values may be too far from a solution

Posted: Mon Mar 06, 2023 5:38 am
by magnushelliesen
Did this thread get resolved?