Dear Statalisters,
I want to impute missing values of two binary variables (SUSTCOMMITT and TMTLOTOBJ) in my panel data set (year: 2011-2020) using the mi chained (logit) command. However, I received the error message that logit failed to converge on observed data. I use the augment option because perfect predictors have been detected prior. After doing some research, it seems like convergence is an issue for the chained logit command, however, I have not found a solution to my problem yet. I have tested the model also with mi imputed chained (pmm, knn(5)) command. Stata manual states that pmm is only suitable for continuous variables, but the output seems quite good. Can one use the pmm command for binary variables or does that not make sense? If not what might be the problem that the chained (Iogit) command does not work? I would be thankful for any helpful advice.
Best
Patrick
error message:
logit failed to converge on observed data
error occurred during imputation of SUSTCOMMITT_L12011 SUSTCOMMITT_L12012 SUSTCOMMITT_L12013 SUSTCOMMITT_L12014
SUSTCOMMITT_L12015 SUSTCOMMITT_L12016 SUSTCOMMITT_L12017 SUSTCOMMITT_L12018 SUSTCOMMITT_L12019 SUSTCOMMITT_L12020
TMTLTOBJ_L12012 TMTLTOBJ_L12013 TMTLTOBJ_L12014 TMTLTOBJ_L12015 TMTLTOBJ_L12016 TMTLTOBJ_L12017 TMTLTOBJ_L12018
TMTLTOBJ_L12019 TMTLTOBJ_L12020 on m = 1
I want to impute missing values of two binary variables (SUSTCOMMITT and TMTLOTOBJ) in my panel data set (year: 2011-2020) using the mi chained (logit) command. However, I received the error message that logit failed to converge on observed data. I use the augment option because perfect predictors have been detected prior. After doing some research, it seems like convergence is an issue for the chained logit command, however, I have not found a solution to my problem yet. I have tested the model also with mi imputed chained (pmm, knn(5)) command. Stata manual states that pmm is only suitable for continuous variables, but the output seems quite good. Can one use the pmm command for binary variables or does that not make sense? If not what might be the problem that the chained (Iogit) command does not work? I would be thankful for any helpful advice.
Best
Patrick
error message:
logit failed to converge on observed data
error occurred during imputation of SUSTCOMMITT_L12011 SUSTCOMMITT_L12012 SUSTCOMMITT_L12013 SUSTCOMMITT_L12014
SUSTCOMMITT_L12015 SUSTCOMMITT_L12016 SUSTCOMMITT_L12017 SUSTCOMMITT_L12018 SUSTCOMMITT_L12019 SUSTCOMMITT_L12020
TMTLTOBJ_L12012 TMTLTOBJ_L12013 TMTLTOBJ_L12014 TMTLTOBJ_L12015 TMTLTOBJ_L12016 TMTLTOBJ_L12017 TMTLTOBJ_L12018
TMTLTOBJ_L12019 TMTLTOBJ_L12020 on m = 1
Code:
mi set mlong mi misstable sum mi reshape wide DSGR RD RD_L1 ROA Totalassets Capitalexpenditures Totalrevenue FC_L1 TKD_w_d SUSTCOMMITT_L1 TMTLTOBJ_L1 ENV_L1 TMTESGCOMP, i(UltimateParentID) j(Year) mi register imputed SUSTCOMMITT_L12011 SUSTCOMMITT_L12012 SUSTCOMMITT_L12013 SUSTCOMMITT_L12014 SUSTCOMMITT_L12015 SUSTCOMMITT_L12016 SUSTCOMMITT_L12017 SUSTCOMMITT_L12018 SUSTCOMMITT_L12019 SUSTCOMMITT_L12020 TMTLTOBJ_L12012 TMTLTOBJ_L12013 TMTLTOBJ_L12014 TMTLTOBJ_L12015 TMTLTOBJ_L12016 TMTLTOBJ_L12017 TMTLTOBJ_L12018 TMTLTOBJ_L12019 TMTLTOBJ_L12020 mi register regular DSGR2010 DSGR2011 DSGR2012 DSGR2013 DSGR2014 DSGR2015 DSGR2016 DSGR2017 DSGR2018 DSGR2019 DSGR2020 FC_L12010 FC_L12011 FC_L12012 FC_L12013 FC_L12014 FC_L12015 FC_L12016 FC_L12017 FC_L12018 FC_L12019 FC_L12020 TKD_w_d2010 TKD_w_d2011 TKD_w_d2012 TKD_w_d2013 TKD_w_d2014 TKD_w_d2015 TKD_w_d2016 TKD_w_d2017 TKD_w_d2018 TKD_w_d2019 TKD_w_d2020 mi xtset, clear mi impute chained (logit, augment) SUSTCOMMITT_L12011 SUSTCOMMITT_L12012 SUSTCOMMITT_L12013 SUSTCOMMITT_L12014 SUSTCOMMITT_L12015 SUSTCOMMITT_L12016 SUSTCOMMITT_L12017 SUSTCOMMITT_L12018 SUSTCOMMITT_L12019 SUSTCOMMITT_L12020 TMTLTOBJ_L12012 TMTLTOBJ_L12013 TMTLTOBJ_L12014 TMTLTOBJ_L12015 TMTLTOBJ_L12016 TMTLTOBJ_L12017 TMTLTOBJ_L12018 TMTLTOBJ_L12019 TMTLTOBJ_L12020 = DSGR2010 DSGR2011 DSGR2012 DSGR2013 DSGR2014 DSGR2015 DSGR2016 DSGR2017 DSGR2018 DSGR2019 DSGR2020 FC_L12010 FC_L12011 FC_L12012 FC_L12013 FC_L12014 FC_L12015 FC_L12016 FC_L12017 FC_L12018 FC_L12019 FC_L12020 TKD_w_d2010 TKD_w_d2011 TKD_w_d2012 TKD_w_d2013 TKD_w_d2014 TKD_w_d2015 TKD_w_d2016 TKD_w_d2017 TKD_w_d2018 TKD_w_d2019 TKD_w_d2020, add(10) rseed(1234) mi reshape long DSGR RD RD_L1 ROA Totalassets Capitalexpenditures Totalrevenue FC_L1 TKD_w_d SUSTCOMMITT_L1 TMTLTOBJ_L1 ENV_L1 TMTESGCOMP, i(UltimateParentID) j(Year)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double UltimateParentID int Year long Industry str14 Country int DSGR double(RD ROA Totalassets Capitalexpenditures Totalrevenue) byte TMTESGCOMP float(FC_L1 RD_L1 TKD_w_d ENV_L1) byte(TMTLTOBJ_L1 SUSTCOMMITT_L1) 4295641240 2010 57101010 "United States" 0 . . . . . . 5.865103 . 0 . . . 4295641240 2011 57101010 "United States" 0 . . . 25714000 721419000 . 7.633588 . 0 . . . 4295641240 2012 57101010 "United States" 0 . . 351912000 13591000 616751000 . 6.78733 . 0 . . . 4295641240 2013 57101010 "United States" 0 . 5.980601951 367748000 14490000 703129000 . 8.213552 . 0 . . . 4295641240 2014 57101010 "United States" 0 . 6.339651606 408730000 20782000 741530000 . 9.433962 . 0 . . . 4295641240 2015 57101010 "United States" 0 . 5.87564617 483257000 36893000 819350000 . 10.544815 . 0 . . . 4295641240 2016 57101010 "United States" 0 . 4.485109003 510565000 34632000 842060000 . 9.90099 . 0 . . . 4295641240 2017 57101010 "United States" 0 . 6.41552535 554944000 34272000 930914000 0 12.5 . 0 . . . 4295641240 2018 57101010 "United States" 0 . 5.937086986 608758000 26519000 1072061000 0 13.412817 . .873934 5.440876 0 0 4295641240 2019 57101010 "United States" 0 . 4.53531983 764111000 25843000 1181844000 0 12.8388 . 0 6.48809 0 0 4295641240 2020 57101010 "United States" 0 . 2.364744564 774829000 38749000 1200550000 0 12.362638 . 0 31.45961 0 0 4295858988 2010 57101010 "Austria" 11 42363000 7.967284 291783000 13169000 209419000 . 1195.2826 40096000 .022011695 . . . 4295858988 2011 57101010 "Austria" 17 50807000 8.299249008 558559000 17685000 275704000 . 1153.482 42363000 .09735159 . . . 4295858988 2012 57101010 "Austria" 19 59029000 13.735932467 633992000 31934000 387636000 . 1347.7064 50807000 .066786416 . . . 4295858988 2013 57101010 "Austria" 20 68487000 9.450018026 653032000 47087000 377789000 . 1475.3723 59029000 .0585001 . . . 4295858988 2014 57101010 "Austria" 13 77021000 12.131870975 954964000 70099000 464370000 0 1493.8313 68487000 .06711403 . . . 4295858988 2015 57101010 "Austria" 8 107770000 13.64953669 1223381000 80082000 6.231e+08 0 1586.694 77021000 .0509305 34.55151 0 0 4295858988 2016 57101010 "Austria" 8 138590000 7.776542122 1422988000 91682000 549940000 0 1621.19 107770000 .0187058 35.352066 0 0 4295858988 2017 57101010 "Austria" 4 213995000 3.789080254 3261315000 581890000 1063773000 0 1593.2174 138590000 .03761134 30.938517 0 0 4295858988 2018 57101010 "Austria" 1 239064000 2.729128264 3584534000 412943000 1426306000 0 1596.535 213995008 .020242173 29.261524 0 0 4295858988 2019 57101010 "Austria" 0 261180000 7.478623578 4433412000 1.816e+08 1885265000 1 1559.035 239064000 -.0264061 20.051544 0 0 4295858988 2020 57101010 "Austria" 0 4.230e+08 -1.250311536 9.963e+09 1.770e+08 3.504e+09 1 1443.3934 261180000 -.01323759 7.758433 0 0 4295859029 2010 57201010 "Austria" 0 . 7.746944686 64808000 981000 80715000 . 447.6242 . -.0872852 . . . 4295859029 2011 57201010 "Austria" 0 . 5.60626619 227044000 2820000 153240000 . 442.5766 . -.04068935 . . . 4295859029 2012 57201010 "Austria" 0 . 4.274636071 213976000 3151000 339502000 . 455.157 . 0 . . . 4295859029 2013 57201010 "Austria" 0 . 5.505445313 220067000 5779000 337936000 . 475.9848 . -.006608781 . . . 4295859029 2014 57201010 "Austria" 0 . 5.68685781 273070000 5789000 385546000 . 474.16855 . 0 . . . 4295859029 2015 57201010 "Austria" 0 . 5.95986003 319058000 9486000 468188000 . 482.3355 . -.035016682 . . . 4295859029 2016 57201010 "Austria" 0 . 4.13467194 668735000 9292000 503686000 . 486.9529 . -.023248775 . . . 4295859029 2017 57201010 "Austria" 0 . 3.986145532 804869000 23008000 881975000 . 479.0357 . -.11095305 . . . 4295859029 2018 57201010 "Austria" 0 . 5.864308826 847943000 25107000 990881000 0 472.06525 . 0 . . . 4295859029 2019 57201010 "Austria" 0 . 4.775304063 1225726000 27103000 1122885000 1 470.1676 . 0 59.94885 0 0 4295859029 2020 57201010 "Austria" 0 . 4.4187055813 1246627000 33920000 1254804000 1 462.1476 . 0 68.03995 0 0 4295859048 2010 57101010 "Austria" 2 . -7.374400243 483390000 19742000 372184000 . 50.18019 . -.005782807 . . . 4295859048 2011 57101010 "Austria" 1 . 6.617771376 575335000 115340000 487948000 . 45.94428 . .005368249 . . . 4295859048 2012 57101010 "Austria" 0 . 4.177396776 694068000 113228000 514180000 . 73.46026 . .019454824 . . . 4295859048 2013 57101010 "Austria" 0 . 2.051479133 726663000 43959000 541673000 . 68.2656 . .025949774 . . . 4295859048 2014 57101010 "Austria" 0 . 4.653130597 916059000 90906000 589909000 . 79.58463 . .07614094 . . . 4295859048 2015 57101010 "Austria" 0 . 6.490705335 1220812000 165318000 667010000 . 73.34552 . .08686715 . . . 4295859048 2016 57101010 "Austria" 0 . 4.361865426 1344650000 254764000 762879000 . 81.04601 . .02103938 . . . 4295859048 2017 57101010 "Austria" 0 . -1.646470196 1436694000 240925000 814906000 . 86.96833 . .006953548 . . . 4295859048 2018 57101010 "Austria" 0 . 3.809670817 1530439000 141933000 991843000 1 113.16727 . .1301812 . . . 4295859048 2019 57101010 "Austria" 0 . 5.371898707 1784106000 100913000 1027983000 1 108.41976 . .024462314 12.261518 0 1 4295859048 2020 57101010 "Austria" 0 . 1.0893948124 1853510000 218597000 1000577000 1 94.05798 . 0 15.805267 0 1 4295859306 2010 57104010 "Belgium" 0 71371000 6.573963494 7.547e+08 54504000 896999000 0 424.7375 69234000 .06535589 . . . 4295859306 2011 57104010 "Belgium" 0 74650000 9.716128613 814567000 66756000 1041244000 0 392.4947 71371000 .003703824 21.9826 0 0 4295859306 2012 57104010 "Belgium" 0 84124000 10.791467169 921879000 81149000 1155984000 0 367.8006 74650000 -.0018918656 17.179487 0 0 4295859306 2013 57104010 "Belgium" 0 80375000 5.718837529 1047822000 76237000 1008499000 0 402.1612 84124000 .15996416 16.467283 0 0 4295859306 2014 57104010 "Belgium" 0 99689000 2.037202231 1075384000 56017000 908368000 0 409.4148 80375000 .009160219 21.305586 0 0 4295859306 2015 57104010 "Belgium" 0 150222000 -1.758442324 1140327000 14730000 1028856000 1 462.6214 99689000 -.0006671344 25.789173 0 0 4295859306 2016 57104010 "Belgium" 0 143362000 2.210076893 1159231000 24241000 1102342000 0 474.9722 150222000 .06552367 45.80009 0 1 4295859306 2017 57104010 "Belgium" 0 122305000 2.831905197 1064996000 23160000 1084706000 0 519.56195 143362000 -.0019365263 60.06886 0 1 4295859306 2018 57104010 "Belgium" 0 120279000 7.302192826 1047301000 25627000 1028531000 0 511.7762 122305000 -.0202917 60.56929 0 1 4295859306 2019 57104010 "Belgium" 0 119389000 8.550347359 1174176000 20169000 1082570000 0 518.1316 120279000 -.06096923 68.52327 0 1 4295859306 2020 57104010 "Belgium" 0 102610000 -.4062253835 1018203000 14980000 770083000 0 481.1197 119389000 .00017919127 70.50298 0 1 4295860976 2010 57104010 "United States" 0 22297000 -5.09697034 367167000 2659000 285892000 . 601.2464 28254000 -.027935894 . . . 4295860976 2011 57104010 "United States" 0 23454000 6.057540486 348503000 4217000 304296000 . 643.9301 22297000 .014428467 . . . 4295860976 2012 57104010 "United States" 0 18530000 8.250299214 337460000 3521000 243796000 . 601.3393 23454000 .0046037934 . . . 4295860976 2013 57104010 "United States" 0 23787000 2.785832657 378807000 4777000 316910000 . 589.47473 18530000 -.03430453 . . . 4295860976 2014 57104010 "United States" 0 28954000 -4.3630443 396294000 5415000 364706000 . 584.45984 23787000 .01990739 . . . 4295860976 2015 57104010 "United States" 0 31043000 8.771707378 416045000 5552000 373598000 . 586.71075 28954000 .02358944 . . . 4295860976 2016 57104010 "United States" 1 32002000 5.228340395 425637000 12442000 384758000 0 599.474 31043000 .02025482 . . . 4295860976 2017 57104010 "United States" 0 41673000 10.328028186 726703000 9094000 521290000 0 612.8651 32002000 -.020654855 14.033264 1 0 4295860976 2018 57104010 "United States" 0 51024000 7.065718302 719576000 16257000 614337000 0 603.69507 41673000 -.1094092 12.706044 0 0 4295860976 2019 57104010 "United States" 0 55965000 5.130899408 869736000 10743000 626099000 0 591.91815 51024000 -.030973505 10.619977 0 0 4295860976 2020 57104010 "United States" 0 60996000 5.1323551874 865179000 10524000 590623000 0 574.2914 55965000 -.011996147 9.259259 0 0 4295865864 2010 57106030 "Denmark" 0 3.428e+08 -1.259957108 2.5617e+09 2.943e+08 2.7615e+09 0 618.1962 4.627e+08 .03837454 . . . 4295865864 2011 57106030 "Denmark" 0 58400000 1.104558275 2.5082e+09 3.497e+08 2.8669e+09 0 725.8927 3.428e+08 .018543206 37.5 0 1 4295865864 2012 57106030 "Denmark" 0 24700000 2.714613732 2.8922e+09 4.169e+08 3.0077e+09 0 686.5306 5.84e+07 -.00027254046 38.045944 0 1 4295865864 2013 57106030 "Denmark" 0 2.087e+08 -5.625774473 2.7568e+09 3.470e+08 2.8139e+09 0 896.1063 2.47e+07 -.0396225 35.49411 0 1 4295865864 2014 57106030 "Denmark" 0 40700000 -8.061746535 2.8921e+09 3.928e+08 2.1617e+09 0 763.0359 2.087e+08 .013137134 29.79487 0 1 4295865864 2015 57106030 "Denmark" 0 1.878e+08 -19.154405387 3.449e+09 2.921e+08 2.3565e+09 0 710.8964 4.07e+07 -.0483481 32.42075 0 1 4295865864 2016 57106030 "Denmark" 0 1.448e+08 -6.298560693 2.8318e+09 2.118e+08 2.6334e+09 0 704.5809 1.878e+08 -.00400545 31.546997 0 1 4295865864 2017 57106030 "Denmark" 0 1.824e+08 -4.106212143 2.8474e+09 2.418e+08 2.954e+09 0 688.9321 1.448e+08 -.00002345177 29.964304 0 1 4295865864 2018 57106030 "Denmark" 0 1.870e+08 2.808501786 2.9208e+09 1.670e+08 3.285e+09 0 706.6788 1.824e+08 -.03677376 31.897873 0 1 4295865864 2019 57106030 "Denmark" 0 1.820e+08 .705952293 2.462e+09 1.540e+08 2.838e+09 1 693.0556 1.87e+08 0 32.00702 0 1 4295865864 2020 57106030 "Denmark" 0 1.650e+08 -27.182633318 1.776e+09 1.810e+08 2.036e+09 1 664.7556 1.82e+08 -.066068366 42.05327 0 1 4295866048 2010 57201010 "Denmark" 0 . 5.21630716 529337000 2954000 810064000 . 8.388193 . 0 . . . 4295866048 2011 57201010 "Denmark" 0 . 1.34639391 490424000 10593000 793563000 . 13.335222 . 0 . . . 4295866048 2012 57201010 "Denmark" 0 . 1.516029569 500058000 7485000 881185000 . 13.085784 . 0 . . . 4295866048 2013 57201010 "Denmark" 0 . 5.569639811 483704000 3817000 879805000 . 14.740535 . 0 . . . 4295866048 2014 57201010 "Denmark" 0 . 10.193612284 550218000 3863000 878291000 . 15.093377 . -.02560084 . . . 4295866048 2015 57201010 "Denmark" 0 . 10.47100198 697781000 6312000 1123443000 . 15.095813 . 0 . . . 4295866048 2016 57201010 "Denmark" 0 . 10.614171813 837506000 8965000 1192707000 . 15.963673 . 0 . . . 4295866048 2017 57201010 "Denmark" 0 . 11.381135864 851763000 6312000 1218762000 . 16.647877 . 0 . . . 4295866048 2018 57201010 "Denmark" 0 . 7.779598692 1633558000 12094000 1875252000 . 16.455534 . 0 . . . 4295866048 2019 57201010 "Denmark" 0 . -1.148148993 1654517000 11336000 1761035000 . 16.42395 . 0 . . . 4295866048 2020 57201010 "Denmark" 0 . 1.436130925 1640865000 13678000 1407216000 0 15.50401 . 0 . . . 4295866177 2010 57106020 "Denmark" 0 . 5.751550977 231633000 3120000 220651000 . 24.31337 . .4383006 . . . 4295866177 2011 57106020 "Denmark" 0 . 2.694647503 233066000 13152000 204887000 . 73.08125 . .05428522 . . . 4295866177 2012 57106020 "Denmark" 0 . .849067194 212364000 13775000 191264000 . 45.81856 . .1501385 . . . 4295866177 2013 57106020 "Denmark" 0 . 14.104866049 250455000 2120000 241488000 . 39.7954 . .02771733 . . . 4295866177 2014 57106020 "Denmark" 0 . 20.094768989 305212000 4662000 288319000 . 39.65715 . 0 . . . 4295866177 2015 57106020 "Denmark" 0 . 15.085521435 343105000 5758000 349502000 . 35.374783 . -.00456901 . . . 4295866177 2016 57106020 "Denmark" 0 . 14.172802249 355416000 6750000 395555000 . 31.222376 . 0 . . . 4295866177 2017 57106020 "Denmark" 0 . 16.431495441 353004000 26295000 433503000 . 27.33543 . .028072624 . . . 4295866177 2018 57106020 "Denmark" 0 . 15.457001722 422748000 27876000 475341000 . 22.623325 . -.017837863 . . . 4295866177 2019 57106020 "Denmark" 0 . 16.11122899 463280000 20882000 560273000 . 28.84915 . 0 . . . 4295866177 2020 57106020 "Denmark" 0 . 12.6689678902 533581000 35490000 555869000 0 33.839527 . 0 . . . 4295866378 2010 57201010 "Finland" 0 . 4.064206248 1.2406e+09 95800000 1.7312e+09 0 40.92856 . -.01989207 . . . end format %ty Year label values TMTESGCOMP TMTESGCOMP label def TMTESGCOMP 0 "no", modify label def TMTESGCOMP 1 "yes", modify label values TMTLTOBJ_L1 TMTLTOBJ_L1 label def TMTLTOBJ_L1 0 "no", modify label def TMTLTOBJ_L1 1 "yes", modify label values SUSTCOMMITT_L1 SUSTCOMMITT_L1 label def SUSTCOMMITT_L1 0 "no", modify label def SUSTCOMMITT_L1 1 "yes", modify