Illustration of a common estimation problem

This file is the same as b02one_latent_ordered.py, where the starting values for the sigma have been changed in order to illustrate a common issue with the estimation of such models.

We set the starting value of a scale parameter (SIGMA_STAR_Envir02) to a small value: 0.01. The resulting likelihood is so close to zero that taking the log generates a numerical issue.

Make sure to set large initial values for scale parameters.

author:

Michel Bierlaire, EPFL

date:

Thu Apr 13 18:19:27 2023

import sys

import biogeme.biogeme_logging as blog
from biogeme.models import piecewise_formula
import biogeme.biogeme as bio
from biogeme.expressions import Beta, log, Elem, bioNormalCdf

from biogeme.data.optima import (
    read_data,
    age_65_more,
    ScaledIncome,
    moreThanOneCar,
    moreThanOneBike,
    individualHouse,
    male,
    haveChildren,
    haveGA,
    highEducation,
    Envir01,
    Envir02,
    Envir03,
    Mobil11,
    Mobil14,
    Mobil16,
    Mobil17,
)

logger = blog.get_screen_logger(level=blog.INFO)
logger.info('Example b07problem.py')
Example b07problem.py

Parameters to be estimated

coef_intercept = Beta('coef_intercept', 0.0, None, None, 0)
coef_age_65_more = Beta('coef_age_65_more', 0.0, None, None, 0)
coef_haveGA = Beta('coef_haveGA', 0.0, None, None, 0)
coef_moreThanOneCar = Beta('coef_moreThanOneCar', 0.0, None, None, 0)
coef_moreThanOneBike = Beta('coef_moreThanOneBike', 0.0, None, None, 0)
coef_individualHouse = Beta('coef_individualHouse', 0.0, None, None, 0)
coef_male = Beta('coef_male', 0.0, None, None, 0)
coef_haveChildren = Beta('coef_haveChildren', 0.0, None, None, 0)
coef_highEducation = Beta('coef_highEducation', 0.0, None, None, 0)

thresholds = [None, 4, 6, 8, 10, None]
formula_income = piecewise_formula(variable=ScaledIncome, thresholds=thresholds)

Latent variable: structural equation.

CARLOVERS = (
    coef_intercept
    + coef_age_65_more * age_65_more
    + formula_income
    + coef_moreThanOneCar * moreThanOneCar
    + coef_moreThanOneBike * moreThanOneBike
    + coef_individualHouse * individualHouse
    + coef_male * male
    + coef_haveChildren * haveChildren
    + coef_haveGA * haveGA
    + coef_highEducation * highEducation
)

Measurement equations

Intercepts.

INTER_Envir01 = Beta('INTER_Envir01', 0, None, None, 1)
INTER_Envir02 = Beta('INTER_Envir02', 0, None, None, 0)
INTER_Envir03 = Beta('INTER_Envir03', 0, None, None, 0)
INTER_Mobil11 = Beta('INTER_Mobil11', 0, None, None, 0)
INTER_Mobil14 = Beta('INTER_Mobil14', 0, None, None, 0)
INTER_Mobil16 = Beta('INTER_Mobil16', 0, None, None, 0)
INTER_Mobil17 = Beta('INTER_Mobil17', 0, None, None, 0)

Coefficients.

B_Envir01_F1 = Beta('B_Envir01_F1', -1, None, None, 1)
B_Envir02_F1 = Beta('B_Envir02_F1', -1, None, None, 0)
B_Envir03_F1 = Beta('B_Envir03_F1', 1, None, None, 0)
B_Mobil11_F1 = Beta('B_Mobil11_F1', 1, None, None, 0)
B_Mobil14_F1 = Beta('B_Mobil14_F1', 1, None, None, 0)
B_Mobil16_F1 = Beta('B_Mobil16_F1', 1, None, None, 0)
B_Mobil17_F1 = Beta('B_Mobil17_F1', 1, None, None, 0)

Linear models.

MODEL_Envir01 = INTER_Envir01 + B_Envir01_F1 * CARLOVERS
MODEL_Envir02 = INTER_Envir02 + B_Envir02_F1 * CARLOVERS
MODEL_Envir03 = INTER_Envir03 + B_Envir03_F1 * CARLOVERS
MODEL_Mobil11 = INTER_Mobil11 + B_Mobil11_F1 * CARLOVERS
MODEL_Mobil14 = INTER_Mobil14 + B_Mobil14_F1 * CARLOVERS
MODEL_Mobil16 = INTER_Mobil16 + B_Mobil16_F1 * CARLOVERS
MODEL_Mobil17 = INTER_Mobil17 + B_Mobil17_F1 * CARLOVERS

Scale parameters.

SIGMA_STAR_Envir01 = Beta('SIGMA_STAR_Envir01', 1, 1.0e-5, None, 1)
SIGMA_STAR_Envir02 = Beta('SIGMA_STAR_Envir02', 0.01, 1.0e-5, None, 0)
SIGMA_STAR_Envir03 = Beta('SIGMA_STAR_Envir03', 1, 1.0e-5, None, 0)
SIGMA_STAR_Mobil11 = Beta('SIGMA_STAR_Mobil11', 1, 1.0e-5, None, 0)
SIGMA_STAR_Mobil14 = Beta('SIGMA_STAR_Mobil14', 1, 1.0e-5, None, 0)
SIGMA_STAR_Mobil16 = Beta('SIGMA_STAR_Mobil16', 1, 1.0e-5, None, 0)
SIGMA_STAR_Mobil17 = Beta('SIGMA_STAR_Mobil17', 1, 1.0e-5, None, 0)

Symmetric thresholds.

delta_1 = Beta('delta_1', 0.1, 1.0e-5, None, 0)
delta_2 = Beta('delta_2', 0.2, 1.0e-5, None, 0)
tau_1 = -delta_1 - delta_2
tau_2 = -delta_1
tau_3 = delta_1
tau_4 = delta_1 + delta_2

Ordered probit models.

Envir01_tau_1 = (tau_1 - MODEL_Envir01) / SIGMA_STAR_Envir01
Envir01_tau_2 = (tau_2 - MODEL_Envir01) / SIGMA_STAR_Envir01
Envir01_tau_3 = (tau_3 - MODEL_Envir01) / SIGMA_STAR_Envir01
Envir01_tau_4 = (tau_4 - MODEL_Envir01) / SIGMA_STAR_Envir01
IndEnvir01 = {
    1: bioNormalCdf(Envir01_tau_1),
    2: bioNormalCdf(Envir01_tau_2) - bioNormalCdf(Envir01_tau_1),
    3: bioNormalCdf(Envir01_tau_3) - bioNormalCdf(Envir01_tau_2),
    4: bioNormalCdf(Envir01_tau_4) - bioNormalCdf(Envir01_tau_3),
    5: 1 - bioNormalCdf(Envir01_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Envir01 = Elem(IndEnvir01, Envir01)

Envir02_tau_1 = (tau_1 - MODEL_Envir02) / SIGMA_STAR_Envir02
Envir02_tau_2 = (tau_2 - MODEL_Envir02) / SIGMA_STAR_Envir02
Envir02_tau_3 = (tau_3 - MODEL_Envir02) / SIGMA_STAR_Envir02
Envir02_tau_4 = (tau_4 - MODEL_Envir02) / SIGMA_STAR_Envir02
IndEnvir02 = {
    1: bioNormalCdf(Envir02_tau_1),
    2: bioNormalCdf(Envir02_tau_2) - bioNormalCdf(Envir02_tau_1),
    3: bioNormalCdf(Envir02_tau_3) - bioNormalCdf(Envir02_tau_2),
    4: bioNormalCdf(Envir02_tau_4) - bioNormalCdf(Envir02_tau_3),
    5: 1 - bioNormalCdf(Envir02_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Envir02 = Elem(IndEnvir02, Envir02)

Envir03_tau_1 = (tau_1 - MODEL_Envir03) / SIGMA_STAR_Envir03
Envir03_tau_2 = (tau_2 - MODEL_Envir03) / SIGMA_STAR_Envir03
Envir03_tau_3 = (tau_3 - MODEL_Envir03) / SIGMA_STAR_Envir03
Envir03_tau_4 = (tau_4 - MODEL_Envir03) / SIGMA_STAR_Envir03
IndEnvir03 = {
    1: bioNormalCdf(Envir03_tau_1),
    2: bioNormalCdf(Envir03_tau_2) - bioNormalCdf(Envir03_tau_1),
    3: bioNormalCdf(Envir03_tau_3) - bioNormalCdf(Envir03_tau_2),
    4: bioNormalCdf(Envir03_tau_4) - bioNormalCdf(Envir03_tau_3),
    5: 1 - bioNormalCdf(Envir03_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Envir03 = Elem(IndEnvir03, Envir03)

Mobil11_tau_1 = (tau_1 - MODEL_Mobil11) / SIGMA_STAR_Mobil11
Mobil11_tau_2 = (tau_2 - MODEL_Mobil11) / SIGMA_STAR_Mobil11
Mobil11_tau_3 = (tau_3 - MODEL_Mobil11) / SIGMA_STAR_Mobil11
Mobil11_tau_4 = (tau_4 - MODEL_Mobil11) / SIGMA_STAR_Mobil11
IndMobil11 = {
    1: bioNormalCdf(Mobil11_tau_1),
    2: bioNormalCdf(Mobil11_tau_2) - bioNormalCdf(Mobil11_tau_1),
    3: bioNormalCdf(Mobil11_tau_3) - bioNormalCdf(Mobil11_tau_2),
    4: bioNormalCdf(Mobil11_tau_4) - bioNormalCdf(Mobil11_tau_3),
    5: 1 - bioNormalCdf(Mobil11_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Mobil11 = Elem(IndMobil11, Mobil11)

Mobil14_tau_1 = (tau_1 - MODEL_Mobil14) / SIGMA_STAR_Mobil14
Mobil14_tau_2 = (tau_2 - MODEL_Mobil14) / SIGMA_STAR_Mobil14
Mobil14_tau_3 = (tau_3 - MODEL_Mobil14) / SIGMA_STAR_Mobil14
Mobil14_tau_4 = (tau_4 - MODEL_Mobil14) / SIGMA_STAR_Mobil14
IndMobil14 = {
    1: bioNormalCdf(Mobil14_tau_1),
    2: bioNormalCdf(Mobil14_tau_2) - bioNormalCdf(Mobil14_tau_1),
    3: bioNormalCdf(Mobil14_tau_3) - bioNormalCdf(Mobil14_tau_2),
    4: bioNormalCdf(Mobil14_tau_4) - bioNormalCdf(Mobil14_tau_3),
    5: 1 - bioNormalCdf(Mobil14_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Mobil14 = Elem(IndMobil14, Mobil14)

Mobil16_tau_1 = (tau_1 - MODEL_Mobil16) / SIGMA_STAR_Mobil16
Mobil16_tau_2 = (tau_2 - MODEL_Mobil16) / SIGMA_STAR_Mobil16
Mobil16_tau_3 = (tau_3 - MODEL_Mobil16) / SIGMA_STAR_Mobil16
Mobil16_tau_4 = (tau_4 - MODEL_Mobil16) / SIGMA_STAR_Mobil16
IndMobil16 = {
    1: bioNormalCdf(Mobil16_tau_1),
    2: bioNormalCdf(Mobil16_tau_2) - bioNormalCdf(Mobil16_tau_1),
    3: bioNormalCdf(Mobil16_tau_3) - bioNormalCdf(Mobil16_tau_2),
    4: bioNormalCdf(Mobil16_tau_4) - bioNormalCdf(Mobil16_tau_3),
    5: 1 - bioNormalCdf(Mobil16_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Mobil16 = Elem(IndMobil16, Mobil16)

Mobil17_tau_1 = (tau_1 - MODEL_Mobil17) / SIGMA_STAR_Mobil17
Mobil17_tau_2 = (tau_2 - MODEL_Mobil17) / SIGMA_STAR_Mobil17
Mobil17_tau_3 = (tau_3 - MODEL_Mobil17) / SIGMA_STAR_Mobil17
Mobil17_tau_4 = (tau_4 - MODEL_Mobil17) / SIGMA_STAR_Mobil17
IndMobil17 = {
    1: bioNormalCdf(Mobil17_tau_1),
    2: bioNormalCdf(Mobil17_tau_2) - bioNormalCdf(Mobil17_tau_1),
    3: bioNormalCdf(Mobil17_tau_3) - bioNormalCdf(Mobil17_tau_2),
    4: bioNormalCdf(Mobil17_tau_4) - bioNormalCdf(Mobil17_tau_3),
    5: 1 - bioNormalCdf(Mobil17_tau_4),
    6: 1.0,
    -1: 1.0,
    -2: 1.0,
}

P_Mobil17 = Elem(IndMobil17, Mobil17)


loglike = (
    log(P_Envir01)
    + log(P_Envir02)
    + log(P_Envir03)
    + log(P_Mobil11)
    + log(P_Mobil14)
    + log(P_Mobil16)
    + log(P_Mobil17)
)

Read the data

database = read_data()

Create the Biogeme object

the_biogeme = bio.BIOGEME(database, loglike)
the_biogeme.modelName = 'b07problem'
Biogeme parameters read from biogeme.toml.

Estimate the parameters. As the estimation will fail, we are catching the exception

try:
    results = the_biogeme.estimate()
except ValueError as e:
    print(
        'Impossible to estimate the model. There must be an issue with the initial values of the parameters.'
    )
As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds"
*** Initial values of the parameters are obtained from the file __b07problem.iter
Cannot read file __b07problem.iter. Statement is ignored.
As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds"
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: Newton with trust region for simple bounds
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
Iter.     Function    Relgrad   Radius      Rho
    0          inf   1.8e+308      0.5        0    -
    1          inf   1.8e+308     0.25        0    -
    2          inf   1.8e+308     0.12        0    -
    3          inf   1.8e+308    0.062        0    -
    4          inf   1.8e+308    0.031        0    -
    5          inf   1.8e+308    0.016        0    -
    6          inf   1.8e+308   0.0078        0    -
    7          inf   1.8e+308   0.0039        0    -
    8          inf   1.8e+308    0.002        0    -
    9          inf   1.8e+308  0.00098        0    -
   10          inf   1.8e+308  0.00049        0    -
   11          inf   1.8e+308  0.00024        0    -
   12          inf   1.8e+308  0.00012        0    -
   13          inf   1.8e+308  6.1e-05        0    -
   14          inf   1.8e+308  3.1e-05        0    -
   15          inf   1.8e+308  1.5e-05        0    -
   16          inf   1.8e+308  7.6e-06        0    -
   17          inf   1.8e+308  3.8e-06        0    -
   18          inf   1.8e+308  1.9e-06        0    -
   19          inf   1.8e+308  9.5e-07        0    -
   20          inf   1.8e+308  4.8e-07        0    -
   21          inf   1.8e+308  2.4e-07        0    -
   22          inf   1.8e+308  1.2e-07        0    -
   23          inf   1.8e+308    6e-08        0    -
   24          inf   1.8e+308    3e-08        0    -
   25          inf   1.8e+308  1.5e-08        0    -
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
Numerical problems in calculating the analytical hessian. Finite differences is tried instead.
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
/Users/bierlair/venv312/lib/python3.12/site-packages/biogeme/tools/derivatives.py:92: RuntimeWarning: invalid value encountered in subtract
  h[:, i] = (gp - g).flatten() / s
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=1e-07, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=1e-07, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=1e-07, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=1e-07, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=1e-07, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=1e-07, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=inf, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
The norm of the gradient at B_Envir02_F1=-1, B_Envir03_F1=1, B_Mobil11_F1=1, B_Mobil14_F1=1, B_Mobil16_F1=1, B_Mobil17_F1=1, INTER_Envir02=0, INTER_Envir03=0, INTER_Mobil11=0, INTER_Mobil14=0, INTER_Mobil16=0, INTER_Mobil17=0, SIGMA_STAR_Envir02=0.01, SIGMA_STAR_Envir03=1, SIGMA_STAR_Mobil11=1 is nan: g=nan, nan, nan, nan, nan, nan, inf, nan, nan, nan, nan, nan, inf, nan, nan
Numerical problems with finite difference hessian as well.
Impossible to estimate the model. There must be an issue with the initial values of the parameters.

Total running time of the script: (0 minutes 1.902 seconds)

Gallery generated by Sphinx-Gallery