Page 1 of 1

### Model will not solve

Posted: Fri Aug 12, 2016 5:38 am
Hi

I have a model consisting of a single equation:

Code: Select all

`0  * m30  = (0.00158844333748443  * m11  + 0.131757812040252  * m14  + 0.142559703431027  * m15  + 0.000227119899011968  * 1  / 0.5133  * M2525  + 5.10348824794473e-05  * m30  + 0.000112944043026302  * m45  + 0.0012639569049951  * m71  + 2.61352801377563e-05  * m55  + 0.000336585063106878  * m81  + 2.0808985845994e-05  * m66  + 0.000610396415751828  * m68  + 0.000391779117784267  * m65  + 0.00022595765194497  * m74  + 0.000115646966161894  * m63  + 0.00193256430648588  * m85  + 5.95538004130637e-05  * m86  + 4.98374864572048e-05  * m92S  + 0.000602083513336707  * m91S  + 0.00220209577067432  * m90K  + 0.00768162735480903  * c00  + 0.000297473395322951  * c20  + 0.000274580692400979  * j50  + 0.940006199453321  * a14  + dsi14  + dsh14  + xir14)  - (1  * i14  + 0.984825802939575  * x14  + 0.052186490229266  * x1516  + 0)`

I have added 0*m30 on the left hand side of the equality sign as a trick so that Eviews understands that this is the endogenous variable. However, Eviews will not solve this model. modelproblem.PNG (17.15 KiB) Viewed 4336 times

I have tried to change the solver method, convergency criteria, preferred starting values, etc. It is a linear model, so it should be easy for Eviews to solve this.

If I manually change the equation, putting m30 on the left hand side, as in

Code: Select all

`m30   = ((0.00158844333748443  * m11  + 0.131757812040252  * m14  + 0.142559703431027  * m15  + 0.000227119899011968  * 1  / 0.5133  * M2525  +  0.000112944043026302  * m45  + 0.0012639569049951  * m71  + 2.61352801377563e-05  * m55  + 0.000336585063106878  * m81  + 2.0808985845994e-05  * m66  + 0.000610396415751828  * m68  + 0.000391779117784267  * m65  + 0.00022595765194497  * m74  + 0.000115646966161894  * m63  + 0.00193256430648588  * m85  + 5.95538004130637e-05  * m86  + 4.98374864572048e-05  * m92S  + 0.000602083513336707  * m91S  + 0.00220209577067432  * m90K  + 0.00768162735480903  * c00  + 0.000297473395322951  * c20  + 0.000274580692400979  * j50  + 0.940006199453321  * a14  + dsi14  + dsh14  + xir14)  - (1  * i14  + 0.984825802939575  * x14  + 0.052186490229266  * x1516  + 0) )/ (-5.10348824794473e-05 )`

Eviews has no problem solving the model. Since this is an accounting relationship, the model solution exactly reproduces the data.

Why is Eviews not able to solve the first model? Is it related to the coefficient in front of m30 being so small (5.10348824794473e-05)? Is it a bug?

Attached are the workfile and the program file that illustrates the problem.
Thomas

### Re: Model will not solve

Posted: Fri Aug 12, 2016 8:14 am
The right hand side is completely exogenous. There is no value of m30 that will make m30*0 equal to the right hand side.

### Re: Model will not solve

Posted: Fri Aug 12, 2016 10:01 am

but I do not understand what you mean?

The equation can be written
0*m30=con1 + 5.10348824794473e-05* m30 + con2

where the con1 and con2 are the linear functions of the other series in the expression above.

This equation has the solution
m30=(con1+con2)/(-5.10348824794473e-05 )

Or is there something I do not understand?

Thomas

### Re: Model will not solve

Posted: Fri Aug 12, 2016 10:33 am
Ah, you are right - my first pass missed that you had m30 on the rhs too.

I think this is just one of the limitations of the optimizer. Note that changing one of the other variables to the left does seem to work.

### Re: Model will not solve

Posted: Fri Aug 12, 2016 10:58 am
luckily for us, m30 is actually not the variable we think of as being endogenous in that equation

but what you said about the optimizer, is this a bit too limiting? from a laymans perspective, i think an optimizer should be able to solve a linear equation. a better optimizer is then on my wishlist for Eviews 10.
thomas

### Re: Model will not solve

Posted: Mon Sep 05, 2016 2:08 am
Hi

We compared Eviews to TROLL, and in contrast to Eviews, TROLL has no problems solving this equation (see below).

Can you please have a new look at your solver, so that it becomes as efficient as the solver TROLL is using? If you could upgrade the solver for the release of Eviews 10, that would be great.
Thomas

TROLL Command: USEMOD M30;
TROLL Command:
TROLL Command: PRTMOD ALL;

Symbols:

ENDOGENOUS :
m30

EXOGENOUS :
a14 c00 c20 dsh14 dsi14 i14 j50 m11 m14 m15 M2525 m45 m55 m63
m65 m66 m68 m71 m74 m81 m85 m86 m90K m91S m92S x14 X1516 xir14

Equations:

1 m30: 0*m30 = 0.00158844333748443*m11+0.131757812040252*m14+
0.142559703431027*m15+0.000227119899011968*1/0.5133*M2525+
5.10348824794473e-005*m30+0.000112944043026302*m45+
0.0012639569049951*m71+2.61352801377563e-005*m55+
0.000336585063106878*m81+2.0808985845994e-005*m66+
0.000610396415751828*m68+0.000391779117784267*m65+
0.00022595765194497*m74+0.000115646966161894*m63+
0.00193256430648588*m85+5.95538004130637e-005*m86+
4.98374864572048e-005*m92S+0.000602083513336707*m91S+
0.00220209577067432*m90K+0.00768162735480903*c00+
0.000297473395322951*c20+0.000274580692400979*j50+
0.940006199453321*a14+dsi14+dsh14+xir14-(1*i14+0.984825802939575
*x14+0.052186490229266*X1516+0)

TROLL Command: SIMULATE;
Analyzing Model's Incidence Matrix
Analyzing Model's Block Structure
Generating Simulation Code
Use FILEMOD before USEMOD (or TREXIT/LOGOUT) to save code.
Simulations can start from 1995Q1 to 2025Q4 and must end by 2025Q4.
SIMULATE Command: LKSIMALG;

The current simulation algorithm is Newton-Raphson.

SIMULATE Command: SIMSTART 2010Q1; LIST ITER ALL;
SIMULATE Command: DOTIL 2015Q4;
Date: Block: Iter: What: Value: [Rel. Change:]
2010Q1 1 0 m30 21912.419802
1 m30 21912.419802 [-1.62646e-012]
2010Q2 1 0 m30 21912.419802
1 m30 21818.355929 [-4.31103e-003]
2010Q3 1 0 m30 21818.355929
1 m30 21927.158454 [+4.98651e-003]
2010Q4 1 0 m30 21927.158454
1 m30 22179.362986 [+1.15014e-002]
2011Q1 1 0 m30 22179.362986
1 m30 21810.682003 [-1.69029e-002]
2011Q2 1 0 m30 21810.682003
1 m30 20871.052462 [-4.50186e-002]
2011Q3 1 0 m30 20871.052462
1 m30 19617.331818 [-6.39056e-002]
2011Q4 1 0 m30 19617.331818
1 m30 19614.450441 [-1.46893e-004]
2012Q1 1 0 m30 19614.450441
1 m30 18210.675286 [-7.70811e-002]
2012Q2 1 0 m30 18210.675286
1 m30 17499.272133 [-4.06510e-002]
2012Q3 1 0 m30 17499.272133
1 m30 17130.643744 [-2.15174e-002]
2012Q4 1 0 m30 17130.643744
1 m30 17042.495174 [-5.17198e-003]
2013Q1 1 0 m30 17042.495174
1 m30 16648.960073 [-2.36358e-002]
2013Q2 1 0 m30 16648.960073
1 m30 16093.759888 [-3.44957e-002]
2013Q3 1 0 m30 16093.759888
1 m30 16417.35218 [+2.01054e-002]
2013Q4 1 0 m30 16417.35218
1 m30 16402.930157 [-8.79181e-004]
2014Q1 1 0 m30 16402.930157
1 m30 16926.095395 [+3.18927e-002]
2014Q2 1 0 m30 16926.095395
1 m30 16681.387786 [-1.46686e-002]
2014Q3 1 0 m30 16681.387786
1 m30 16820.578693 [+8.34358e-003]
2014Q4 1 0 m30 16820.578693
1 m30 16511.144299 [-1.87398e-002]
2015Q1 1 0 m30 16511.144299
1 m30 16347.943513 [-9.98234e-003]
2015Q2 1 0 m30 16347.943513
1 m30 16465.804984 [+7.20912e-003]
2015Q3 1 0 m30 16465.804984
1 m30 16060.068311 [-2.52621e-002]
2015Q4 1 0 m30 16060.068311
1 m30 16006.92461 [-3.31984e-003]
SIMULATE Command: FILESIM SAVE;
SIMULATE Command: &PRTDSET ER PCER, DSET INDATA SAVE, RANGE 2010Q1 TO 2015Q4, VARI M30;

Data Set by Archive - Error

SAVE_ER

M30_ER

2010Q1 -3.5641278e-008
2010Q2 -2.1747837e-008
2010Q3 -5.0011295e-008
2010Q4 -1.0109943e-008
2011Q1 3.82824510e-008
2011Q2 -9.3528797e-008
2011Q3 4.95820132e-008
2011Q4 6.62475941e-008
2012Q1 -1.1906013e-007
2012Q2 1.18925527e-008
2012Q3 -2.8230716e-008
2012Q4 6.06778485e-008
2013Q1 -6.1365427e-008
2013Q2 -9.6284566e-008
2013Q3 6.67932909e-009
2013Q4 1.67929102e-008
2014Q1 -3.7463906e-008
2014Q2 -2.5589543e-008
2014Q3 -1.5735350e-007
2014Q4 7.62302079e-008
2015Q1 5.12754923e-008
2015Q2 -6.4861524e-008
2015Q3 -3.3389369e-008
2015Q4 -5.7190846e-008

Data Set by Archive - Percent Error

SAVE_PCER

M30_PCER

2010Q1 -1.6265878e-010
2010Q2 -9.9675823e-011
2010Q3 -2.2808422e-010
2010Q4 -4.5585757e-011
2011Q1 1.75526260e-010
2011Q2 -4.4813042e-010
2011Q3 2.52753374e-010
2011Q4 3.37752049e

### Re: Model will not solve

Posted: Tue Sep 06, 2016 6:12 am
Interestingly, if one just changes the coefficient in front of xir14 a little bit, the model wil solve, for example
0.9999999999999*xir14
1.00000000000001*xir14

Of course, Eviews should be able to solve this equation without having to change these coefficients.

Below is a list of options/parameters used by the SIMULATE function in TROLL. The MINDAMP option makes Troll go back if it goes in the wrong direction (e.g., taking logs of a negative number) and then tries with a smaller iteration step. Maybe some of the same functionality could make the solver in Eviews better?
Thomas

CONOPT sets parameters that are used by SIMULATE, some regression tasks, and the MINIMIZE function. The following table shows the numerical parameters (numopts) with their initial values and possible ranges.
Numopt Minimum Initial Maximum Meaning
BIGRES 0.0 1.0e-6 Continue iterating if any residual exceeds BIGRES
CONCR >0.0 0.001 1.0 Convergence criterion
CONDWARN >1.0 100.0 Controls "data highly collinear" warning in regression
DAMP >0.0 1.0 2.0 Modifies the stepsize in simulation
DIVCR >1.0 100.0 Divergence criterion
FEVALMAX 0 500 Function-evaluation limit
FGS >0.0 1.0 2.0 Modifies the stepsize in Gauss-Seidel
GAMMA >0.0 1.0 Avoids division by zero in convergence checking
INVEVERY 1 1 Controls how often Jacobian is recalculated in simulation
LASTDAMP 0 NA Turn off fixed damping after this iteration
MAXRAT >1.0 1.0e10 Maximum ratio of pivots before Jacobian is considered singular in simulation
MINDAMP >0.0 1.0e-2 1.0 When backtracking due to illegal numerical values, give up when damping factor is less
RADIUS >0.0 1.0 Scales the initial stepsize in optimizers
SMINFO 0 0 Display information about large sparse matrices?
0=none; 1=size & sparsity; 2=timing; 3+=extra
SMITREF 0 NA Number of iterative-refinement steps to factor sparse matrices; NA means use smcode's default
SMTUNE >0.0 0.001 1.0 Controls balance between sparsity and accuracy in decomposing the Jacobian in simulation
START 1 3 Iteration at which divergence checking starts
STOP 0 10 Iteration limit
TINYRES 0.0 0.0 Stop iterating if no residual exceeds TINYRES