Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Convergence in -mixlogitwtp-

    Hi,

    I am using -mixlogitwtp- from SSC to estimate logit models in the WTP space. In my research, I am using survey data about three cities and estimating the model separately for each.

    I am facing convergence issues in only one of these cities, but not in the others. By convergence issues I mean, specifically, the message error "(not concave)" and "numerical derivatives are approximate flat or discontinuous region encountered".

    When I first started my investigation on the topic, I tried the "usual prescription", namely, removing controls and running the simplest model possible. I still fail to find convergence.

    Right now I am at a loss as to why this problem is happening. The data treatment and variables are identical between the cities (as I will show in the MWE below) so I do not think it is an identification problem. It could be that the log-likelihood is at a flat area, as the error message suggests. Then, how can I change the initial guess so as to, hopefully, go out of this flat area?

    Any suggestion will be much appreciated, thanks!

    [ it follows below the MWE]

    First city (it converges)
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte choice float(modo2 modo4) double expansao float(mprice mtempo id) long cidades
    0 0 0 34.3045536748879      -6.15  -.1887057 98472 1
    0 0 1 34.3045536748879      -7.15 -.16327105 98472 1
    1 1 0 34.3045536748879   -3.97303 -.10017508 98472 1
    1 0 0 227.247278971441      -6.15  -.2044469 98473 1
    0 0 1 227.247278971441      -7.15  -.1768906 98473 1
    0 1 0 227.247278971441  -6.018733 -.10853136 98473 1
    1 0 0 15.8392356500174      -6.15  -.2044469 98474 1
    0 0 1 15.8392356500174      -7.15  -.1768906 98474 1
    0 1 0 15.8392356500174  -4.012489 -.10853136 98474 1
    1 0 0 227.247278971441      -6.15 -.15143263 98475 1
    0 0 1 227.247278971441      -7.15 -.13102183 98475 1
    0 1 0 227.247278971441 -3.8795974 -.08038855 98475 1
    1 0 0 33.3430493243497      -6.15 -.15143263 98476 1
    0 0 1 33.3430493243497      -7.15 -.13102183 98476 1
    0 1 0 33.3430493243497  -5.819396 -.08038855 98476 1
    0 0 0 152.898298152986      -6.15 -.15143263 98477 1
    0 0 1 152.898298152986      -7.15 -.13102183 98477 1
    1 1 0 152.898298152986 -3.8795974 -.08038855 98477 1
    1 0 0 101.982903726231      -6.15   -.179227 98478 1
    0 0 1 101.982903726231      -7.15  -.1550699 98478 1
    0 1 0 101.982903726231   -3.94927 -.09514327 98478 1
    0 0 0 13.3756287264471      -6.15   -.179227 98479 1
    0 0 1 13.3756287264471      -7.15  -.1550699 98479 1
    1 1 0 13.3756287264471   -3.94927 -.09514327 98479 1
    0 0 0 119.799109462961      -6.15   -.179227 98480 1
    0 0 1 119.799109462961      -7.15  -.1550699 98480 1
    1 1 0 119.799109462961   -3.94927 -.09514327 98480 1
    1 0 0 25.8698479984875      -6.15   -.208468 98481 1
    0 0 1 25.8698479984875      -7.15  -.1803697 98481 1
    0 1 0 25.8698479984875  -6.033853 -.11066597 98481 1
    1 0 0 73.2116698357196      -6.15   -.208468 98482 1
    0 0 1 73.2116698357196      -7.15  -.1803697 98482 1
    0 1 0 73.2116698357196  -6.033853 -.11066597 98482 1
    0 0 0 15.9458475797644      -6.15   -.208468 98483 1
    0 0 1 15.9458475797644      -7.15  -.1803697 98483 1
    1 1 0 15.9458475797644 -4.0225687 -.11066597 98483 1
    1 0 0 19.3571305989791      -6.15 -.17976004 98484 1
    0 0 1 19.3571305989791      -7.15 -.15553112 98484 1
    0 1 0 19.3571305989791  -3.950606 -.09542625 98484 1
    1 0 0 108.912060073632      -6.15 -.17976004 98485 1
    0 0 1 108.912060073632      -7.15 -.15553112 98485 1
    0 1 0 108.912060073632  -3.950606 -.09542625 98485 1
    0 0 0 75.8844003080431      -6.15 -.17976004 98486 1
    0 0 1 75.8844003080431      -7.15 -.15553112 98486 1
    1 1 0 75.8844003080431  -3.950606 -.09542625 98486 1
    1 0 0  124.68627973592      -6.15 -.17976004 98487 1
    0 0 1  124.68627973592      -7.15 -.15553112 98487 1
    0 1 0  124.68627973592  -5.925909 -.09542625 98487 1
    1 0 0  36.971929130169      -6.15 -.17976004 98488 1
    0 0 1  36.971929130169      -7.15 -.15553112 98488 1
    0 1 0  36.971929130169  -5.925909 -.09542625 98488 1
    1 0 0 138.348555437176      -6.15 -.17976004 98489 1
    0 0 1 138.348555437176      -7.15 -.15553112 98489 1
    0 1 0 138.348555437176  -5.925909 -.09542625 98489 1
    1 0 0  124.68627973592      -6.15 -.17976004 98490 1
    0 0 1  124.68627973592      -7.15 -.15553112 98490 1
    0 1 0  124.68627973592  -5.925909 -.09542625 98490 1
    1 0 0 103.910556127258      -6.15 -.17976004 98491 1
    0 0 1 103.910556127258      -7.15 -.15553112 98491 1
    0 1 0 103.910556127258  -3.950606 -.09542625 98491 1
    0 0 0 112.622793876684      -6.15 -.17976004 98492 1
    0 0 1 112.622793876684      -7.15 -.15553112 98492 1
    1 1 0 112.622793876684  -5.925909 -.09542625 98492 1
    0 0 0 128.934455674196      -6.15 -.17976004 98493 1
    0 0 1 128.934455674196      -7.15 -.15553112 98493 1
    1 1 0 128.934455674196  -3.950606 -.09542625 98493 1
    0 0 0 18.0399505387465      -6.15 -.17976004 98494 1
    0 0 1 18.0399505387465      -7.15 -.15553112 98494 1
    1 1 0 18.0399505387465  -3.950606 -.09542625 98494 1
    0 0 0 119.799109462961      -6.15 -.17976004 98495 1
    0 0 1 119.799109462961      -7.15 -.15553112 98495 1
    1 1 0 119.799109462961  -3.950606 -.09542625 98495 1
    1 0 0 179.608927421712      -6.15 -.17976004 98496 1
    0 0 1 179.608927421712      -7.15 -.15553112 98496 1
    0 1 0 179.608927421712  -5.925909 -.09542625 98496 1
    0 0 0 75.8844003080431      -6.15 -.17976004 98497 1
    0 0 1 75.8844003080431      -7.15 -.15553112 98497 1
    1 1 0 75.8844003080431  -3.950606 -.09542625 98497 1
    0 0 0 107.450884102458      -6.15 -.17976004 98498 1
    0 0 1 107.450884102458      -7.15 -.15553112 98498 1
    1 1 0 107.450884102458  -3.950606 -.09542625 98498 1
    1 0 0 15.8585867500785      -6.15 -.17976004 98499 1
    0 0 1 15.8585867500785      -7.15 -.15553112 98499 1
    0 1 0 15.8585867500785  -5.925909 -.09542625 98499 1
    0 0 0 114.528820970203      -6.15 -.29149082 98500 1
    0 0 1 114.528820970203      -7.15  -.2522023 98500 1
    1 1 0 114.528820970203 -4.2306824  -.1547389 98500 1
    1 0 0  78.997299153129      -6.15 -.29149082 98501 1
    0 0 1  78.997299153129      -7.15  -.2522023 98501 1
    0 1 0  78.997299153129  -6.346024  -.1547389 98501 1
    0 0 0 117.705532792734      -6.15 -.29149082 98502 1
    0 0 1 117.705532792734      -7.15  -.2522023 98502 1
    1 1 0 117.705532792734 -4.2306824  -.1547389 98502 1
    1 0 0 130.854102426549      -6.15 -.29149082 98503 1
    0 0 1 130.854102426549      -7.15  -.2522023 98503 1
    0 1 0 130.854102426549 -4.2306824  -.1547389 98503 1
    0 0 0 75.2742947767382      -6.15 -.29149082 98504 1
    1 0 1 75.2742947767382      -7.15  -.2522023 98504 1
    0 1 0 75.2742947767382  -6.346024  -.1547389 98504 1
    0 0 0 114.528820970203      -6.15 -.29149082 98505 1
    end
    Second city (it does not converge)
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte choice float(modo2 modo4) double expansao float(mprice mtempo id) long cidades
    0 0 0 23.6535      -6.58  -.3101199 118004 2
    0 0 1 23.6535         -9  -.2488805 118004 2
    1 1 0 23.6535  -5.308028 -.22083002 118004 2
    0 0 0 23.6535      -6.58 -.56142086 118005 2
    0 0 1 23.6535         -9  -.4505571 118005 2
    1 1 0 23.6535  -6.773136  -.3997763 118005 2
    0 0 0 22.9718      -6.58 -.17822076 118006 2
    0 0 1 22.9718         -9 -.14302751 118006 2
    1 1 0 22.9718 -4.5390434 -.12690735 118006 2
    0 0 0 17.9476      -6.58  -.4390465 118007 2
    0 0 1 17.9476         -9   -.352348 118007 2
    1 1 0 17.9476  -6.059682   -.312636 118007 2
    0 0 0 17.9476      -6.58 -.58460796 118008 2
    0 0 1 17.9476         -9  -.4691654 118008 2
    1 1 0 17.9476  -6.908319  -.4162873 118008 2
    0 0 0 33.1979      -6.58 -.51330984 118009 2
    0 0 1 33.1979         -9  -.4119465 118009 2
    1 1 0 33.1979  -6.492644  -.3655174 118009 2
    1 0 0 23.6535      -6.58  -.4461772 118010 2
    0 0 1 23.6535         -9  -.3580706 118010 2
    0 1 0 23.6535  -6.101254 -.31771365 118010 2
    1 0 0 21.6564      -6.58  -.5634343 118011 2
    0 0 1 21.6564         -9  -.4521729 118011 2
    0 1 0 21.6564 -10.177312    -.40121 118011 2
    1 0 0 22.0455      -6.58  -.4348046 118012 2
    0 0 1 22.0455         -9  -.3489437 118012 2
    0 1 0 22.0455  -6.034951  -.3096154 118012 2
    0 0 0 23.6535      -6.58  -.6603255 118013 2
    0 0 1 23.6535         -9   -.529931 118013 2
    1 1 0 23.6535  -7.349759  -.4702042 118013 2
    0 0 0 17.9476      -6.58  -.6795928 118014 2
    0 0 1 17.9476         -9  -.5453936 118014 2
    1 1 0 17.9476  -7.462089  -.4839241 118014 2
    0 0 0 23.6535      -6.58  -.7226252 118015 2
    0 0 1 23.6535         -9  -.5799284 118015 2
    1 1 0 23.6535  -7.712972  -.5145666 118015 2
    0 0 0 22.0455      -6.58  -.6544104 118016 2
    0 0 1 22.0455         -9   -.525184 118016 2
    1 1 0 22.0455  -7.315273  -.4659922 118016 2
    1 0 0 17.9476      -6.58  -.6733209 118017 2
    0 0 1 17.9476         -9  -.5403602 118017 2
    0 1 0 17.9476  -7.425524   -.479458 118017 2
    1 0 0 22.0455      -6.58  -.6733209 118018 2
    0 0 1 22.0455         -9  -.5403602 118018 2
    0 1 0 22.0455  -7.425524   -.479458 118018 2
    0 0 0 21.6564      -6.58  -.6733209 118019 2
    0 0 1 21.6564         -9  -.5403602 118019 2
    1 1 0 21.6564  -7.425524   -.479458 118019 2
    1 0 0 17.9476      -6.58  -.8787546 118020 2
    0 0 1 17.9476         -9  -.7052268 118020 2
    0 1 0 17.9476  -12.93483  -.6257431 118020 2
    1 0 0 21.6564      -6.58  -.9791325 118021 2
    0 0 1 21.6564         -9  -.7857832 118021 2
    0 1 0 21.6564  -9.208433  -.6972202 118021 2
    0 0 0 17.9476      -6.58  -.8726065 118022 2
    0 0 1 17.9476         -9  -.7002928 118022 2
    1 1 0 17.9476  -8.587377  -.6213651 118022 2
    0 0 0 31.3336      -6.58 -1.0282129 118023 2
    0 0 1 31.3336         -9  -.8251717 118023 2
    1 1 0 31.3336  -9.494577  -.7321693 118023 2
    0 0 0 22.0455      -6.58  -.7266191 118024 2
    0 0 1 22.0455         -9 -.58313364 118024 2
    1 1 0 22.0455  -7.736257  -.5174106 118024 2
    1 0 0 21.6564      -6.58  -.7266191 118025 2
    0 0 1 21.6564         -9 -.58313364 118025 2
    0 1 0 21.6564 -11.604385  -.5174106 118025 2
    0 0 0 39.1419      -6.58 -1.5467265 118026 2
    0 0 1 39.1419         -9 -1.2412943 118026 2
    1 1 0 39.1419  -12.51756 -1.1013921 118026 2
    0 0 0 21.6564      -6.58 -1.7155348 118027 2
    0 0 1 21.6564         -9  -1.376768 118027 2
    1 1 0 21.6564 -13.501728 -1.2215972 118027 2
    1 0 0 21.6564      -6.58  -3.860686 118028 2
    0 0 1 21.6564         -9 -3.0983164 118028 2
    0 1 0 21.6564  -26.00816 -2.7491155 118028 2
    1 0 0 39.3071      -6.58  -.2480093 118029 2
    0 0 1 39.3071         -9  -.1990349 118029 2
    0 1 0 39.3071  -7.418876 -.17660233 118029 2
    0 0 0 23.6535      -6.58 -1.0109034 118030 2
    0 0 1 23.6535         -9  -.8112803 118030 2
    1 1 0 23.6535 -9.3936615  -.7198436 118030 2
    0 0 0 17.9476      -6.58 -1.2553185 118031 2
    0 0 1 17.9476         -9 -1.0074308 118031 2
    1 1 0 17.9476 -10.818624  -.8938866 118031 2
    1 0 0 39.5112      -6.58  -.9039527 118032 2
    0 0 1 39.5112         -9  -.7254491 118032 2
    0 1 0 39.5112  -8.770128  -.6436862 118032 2
    0 0 0 41.0196      -6.58 -1.2107304 118033 2
    0 0 1 41.0196         -9  -.9716475 118033 2
    1 1 0 41.0196 -10.558672  -.8621364 118033 2
    1 0 0 35.8116      -6.58  -2.124199 118034 2
    0 0 1 35.8116         -9 -1.7047333 118034 2
    0 1 0 35.8116 -15.884277 -1.5125985 118034 2
    0 0 0 49.7901      -6.58 -2.1921356 118035 2
    0 0 1 49.7901         -9 -1.7592545 118035 2
    1 1 0 49.7901 -16.280354 -1.5609747 118035 2
    1 0 0 58.7155      -6.58  -2.049162 118036 2
    0 0 1 58.7155         -9  -1.644514 118036 2
    0 1 0 58.7155 -15.446805  -1.459166 118036 2
    0 0 0 22.9718      -6.58 -1.8780423 118037 2
    end
    Third city (it converges)
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte choice float(modo2 modo4) double expansao float(mprice mtempo id) long cidades
    0 0 0  43.191617       -7.3 -.14533018  1 3
    0 0 1  43.191617       -7.3 -.11297736  1 3
    1 1 0  43.191617 -3.7991676 -.07831901  1 3
    1 0 0 233.287244       -7.3  -.1660461  2 3
    0 0 1 233.287244     -10.46 -.11469173  2 3
    0 1 0 233.287244  -5.762718  -.0894829  2 3
    0 0 0 279.343984       -7.3  -.1747469  3 3
    1 0 1 279.343984       -7.3 -.13584545  3 3
    0 1 0 279.343984  -5.789585  -.0941718  3 3
    0 0 0  38.537426       -7.3 -.14503396  4 3
    0 0 1  38.537426       -7.3 -.11274707  4 3
    1 1 0  38.537426  -3.798558 -.07815938  4 3
    0 0 0  22.132647       -7.3 -.24945304  5 3
    1 0 1  22.132647       -7.3  -.1939208  5 3
    0 1 0  22.132647  -6.020263 -.13443123  5 3
    1 0 0 279.539321       -7.3  -.2198862  6 3
    0 0 1 279.539321       -7.3   -.170936  6 3
    0 1 0 279.539321  -5.928966 -.11849755  6 3
    1 0 0  90.432332       -7.3  -.3560533  7 3
    0 0 1  90.432332     -10.46 -.24593395  7 3
    0 1 0  90.432332  -6.349423 -.19187854  7 3
    0 0 0   8.475953       -7.3  -.4490484  8 3
    1 0 1   8.475953     -10.46  -.3101678  8 3
    0 1 0   8.475953  -6.636574   -.241994  8 3
    1 0 0 168.504332       -7.3 -.19604996  9 3
    0 0 1 168.504332       -7.3  -.1524061  9 3
    0 1 0 168.504332  -5.855364  -.1056521  9 3
    0 0 0  83.718713       -7.3 -.17298283 10 3
    1 0 1  83.718713       -7.3 -.13447408 10 3
    0 1 0  83.718713  -5.784137 -.09322114 10 3
    1 0 0  91.081643       -7.3 -.28734875 11 3
    0 0 1  91.081643       -7.3  -.2233803 11 3
    0 1 0  91.081643  -6.137277 -.15485337 11 3
    1 0 0 140.567946       -7.3  -.2321457 12 3
    0 0 1 140.567946       -7.3 -.18046637 12 3
    0 1 0 140.567946 -3.9778805 -.12510425 12 3
    0 0 0  58.461203       -7.3 -.20494604 13 3
    1 0 1  58.461203     -10.46  -.1415608 13 3
    0 1 0  58.461203  -3.921889 -.11044624 13 3
    0 0 0 298.827821       -7.3 -.23182558 14 3
    0 0 1 298.827821     -10.46  -.1601271 14 3
    1 1 0 298.827821 -3.9772215 -.12493173 14 3
    0 0 0 128.247095       -7.3  -.3302537 15 3
    0 0 1 128.247095     -10.46  -.2281136 15 3
    1 1 0 128.247095 -4.1798396 -.17797504 15 3
    1 0 0 276.119312       -7.3  -.1563583 16 3
    0 0 1 276.119312     -10.46 -.10800016 16 3
    0 1 0 276.119312  -5.732804  -.0842621 16 3
    0 0 0 253.798162       -7.3  -.2531871 17 3
    1 0 1 253.798162     -10.46 -.17488196 17 3
    0 1 0 253.798162  -4.021195 -.13644353 17 3
    0 0 0  59.316068       -7.3  -.3697634 18 3
    0 0 1  59.316068     -10.46 -.25540382 18 3
    1 1 0  59.316068 -4.2611713 -.19926696 18 3
    1 0 0  89.967171       -7.3  -.4023775 19 3
    0 0 1  89.967171     -10.46 -.27793112 19 3
    0 1 0  89.967171  -6.492464 -.21684283 19 3
    0 0 0  82.694334       -7.3  -.3368119 20 3
    1 0 1  82.694334     -10.46 -.23264347 20 3
    0 1 0  82.694334   -4.19334 -.18150926 20 3
    1 0 0  89.967171       -7.3  -.4178809 21 3
    0 0 1  89.967171     -10.46 -.28863963 21 3
    0 1 0  89.967171  -6.540335 -.22519767 21 3
    0 0 0  178.35644       -7.3 -.19087064 22 3
    1 0 1  178.35644     -10.46  -.1318386 22 3
    0 1 0  178.35644  -3.892914 -.10286095 22 3
    0 0 0  67.128558       -7.3  -.3664159 23 3
    1 0 1  67.128558     -10.46 -.25309163 23 3
    0 1 0  67.128558 -4.2542806   -.197463 23 3
    1 0 0 220.348144       -7.3 -.15817817 24 3
    0 0 1 220.348144     -10.46 -.10925718 24 3
    0 1 0 220.348144  -3.825616 -.08524284 24 3
    0 0 0  22.438598       -7.3 -.24476655 25 3
    1 0 1  22.438598     -10.46  -.1690657 25 3
    0 1 0  22.438598  -6.005792 -.13190566 25 3
    1 0 0  40.089773       -7.3  -.3230154 26 3
    0 0 1  40.089773       -7.3 -.25110704 26 3
    0 1 0  40.089773  -6.247409  -.1740743 26 3
    0 0 0  59.945396       -7.3 -.25393894 27 3
    1 0 1  59.945396       -7.3 -.19740807 27 3
    0 1 0  59.945396  -6.034114  -.1368487 27 3
    1 0 0 111.107364       -7.3 -.28941435 28 3
    0 0 1 111.107364       -7.3  -.2249861 28 3
    0 1 0 111.107364   -4.09577 -.15596655 28 3
    0 0 0  37.978408       -7.3  -.3196334 29 3
    1 0 1  37.978408       -7.3  -.2484779 29 3
    0 1 0  37.978408  -6.236966  -.1722517 29 3
    0 0 0  22.292463       -7.3  -.3567839 30 3
    1 0 1  22.292463       -7.3 -.27735808 30 3
    0 1 0  22.292463 -4.2344527 -.19227226 30 3
    1 0 0  41.318549       -7.3  -.3461437 31 3
    0 0 1  41.318549       -7.3 -.26908654 31 3
    0 1 0  41.318549 -4.2125497  -.1865382 31 3
    0 0 0  37.978408       -7.3  -.3139493 32 3
    1 0 1  37.978408       -7.3 -.24405918 32 3
    0 1 0  37.978408 -4.1462765 -.16918854 32 3
    1 0 0  66.388737       -7.3 -.27349252 33 3
    0 0 1  66.388737       -7.3  -.2126087 33 3
    0 1 0  66.388737  -6.094492 -.14738621 33 3
    0 0 0  43.191617       -7.3   -.302791 34 3
    end
    The model I am running is:
    Code:
    mixlogitwtp choice modo2 modo4 [pw=expansao], group(id) price(mprice) rand(mtempo) ln(1) iter(15) nrep(100)

  • #2
    pedro maia: you may want to try some of the things that I have listed in the following post. https://www.statalist.org/forums/for...49#post1554149

    Comment


    • #3
      Thank you very much professor Hong Il Yoo! I followed a few of your suggestions and eventually found convergence in my problem.

      For future reference: First, I employed the BHHH algorithm and found convergence using it. Then, to assure I have found a maximum, I used this result as the initial value for estimating the exact same model but employing the Newton-Raphson algorithm. Finally, I used the results of the simpler versions of the model as the initial values for the more complex versions to reduce computational burden.

      Comment

      Working...
      X