I am tackling my thesis and i have panel data on around 150 companies between the years 2000-2019. I have 13 variables and i am trying to tackle the problem of missing data using multiple imputation. I have registered my variables that i wish to impute and ones i wish to leave but encounter the following error message when i try to complete the imputation:
"Performing EM optimization:
Iteration 1: variance-covariance matrix (Sigma) is not positive definite
EM did not converge"
I used the following code: "mi impute mvn Age Inst DivYield ROA Cash TAssets CtA NDebt MarketCap Leverage NBV Growth = Firm Year, add(100)"
For some variables there is around 500 missing obs compared to the total of around 2500 potential obs. I note others have this error but as i am new to Stata i am struggling to relate the solutions provided to others to my own data set. Please set my data set attached using the dataex command. Can anyone help me understand what is going wrong and help me correct this issue?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(Firm Year Age) double(Inst DivYield ROA) long Cash double(TAssets CtA) 1 2003 76 .543 3.64 .32 645212 7.398693966558007 .02576371400110025 1 2004 77 .543 4.74 4.65 646284 7.386195441944959 .02655999337196073 1 2005 78 .543 4.47 5.8500000000000005 590801 7.420299761682957 .022446129285914534 1 2006 79 .543 5.3 6.65 735465 7.4413514122496816 .02662015609093994 1 2007 80 .543 5.07 5.57 1098520 7.524931447865907 .03280020215425178 1 2008 81 .543 4.66 3.36 1033880 7.535276621294499 .03014348858021043 1 2009 82 .543 0 -3.2800000000000002 1309453 7.490173015687446 .042356191122134214 1 2010 83 .543 2.11 4.2 1794668 7.512469303169086 .055146101518694236 1 2011 84 .543 3.98 6.140000000000001 2304534 7.568121630431918 .06229619045695913 1 2012 85 .543 3.38 3.85 2634015 7.579674997990709 .06933351941494635 1 2013 86 .543 3.5500000000000003 1.79 2653632 7.568599836529462 .07165406925589027 1 2014 87 .543 3.54 .85 2768585 7.598319988719563 .06981325269790876 1 2015 88 .543 3.79 4.62 1994186 7.590368956292757 .051214944534303364 1 2016 89 .543 3.0500000000000003 3.87 2267507 7.593602787055257 .05780239711855111 1 2017 90 .543 2.7800000000000002 5.71 2761559 7.607251736550178 .06821856658005906 1 2018 91 .543 8.620000000000001 6.04 3763101 7.6505191779634485 .0841446865163492 2 2003 15 .3445 0 -1.43 3743982 7.379141542898563 .1563839610602065 2 2004 16 .3445 0 .77 2744211 7.256336669390483 .15208305623536922 2 2005 17 .3445 .9400000000000001 4.43 2752276 7.266445333018674 .14902071748770634 2 2006 18 .3445 1.1 6.83 3266171 7.275695851696254 .1731183350810338 2 2007 19 .3445 1.47 14.63 3223593 7.3268356878730625 .1518813735861623 2 2008 20 .3445 3.08 10.48 1209174 7.353685122468066 .053555450615559885 2 2009 21 .3445 2.56 9.4 945215 7.368002352078595 .04050682959078938 2 2010 22 .3445 2.88 9.3 1266729 7.388529083532778 .05177911576604256 2 2011 23 .3445 3.68 8.700000000000001 1255097 7.47773888875591 .04177711087503967 2 2012 24 .3445 3.63 6.75 2117883 7.571809837191546 .05676650117522262 2 2013 25 .3445 2.98 6.84 4313763 7.5386571163742 .12479556876752484 2 2014 26 .3445 2.6 5.64 4430697 7.564529435255822 .12076542550605018 2 2015 27 .3445 4.12 5.32 4206444 7.577595615978982 .11125498911807778 2 2016 28 .3445 3.54 5.04 3484528 7.571318233623218 .0935030387102958 2 2017 29 .3445 2.99 5.96 3788666 7.546145089765905 .10773113386621298 2 2018 30 .3445 4.28 5.59 2982717 7.575262604135909 .07931392555744327 3 2003 2 . . . . . . 3 2004 3 . . . 187 4.040958173384207 .01701701701701702 3 2005 4 . . -72.99 248 4.183582992351017 .016250573356922874 3 2006 5 . . -57.61 199 4.486742095533987 .0064880020865936356 3 2007 6 . 0 -15.17 4989 5.128192412566287 .037138220581229155 3 2008 7 . 0 -11.67 3133 5.102169480967359 .02476229618330264 3 2009 8 . 0 -17.5 63309 5.008267937169863 .6211514687702361 3 2010 9 . 0 -20.97 14588 5.11855900723843 .11102908158217202 3 2011 10 . 0 -38.160000000000004 3072 4.993564075028783 .031178637761471242 3 2012 11 . 0 -32.77 4297 4.875032309461098 .0572971531435429 3 2013 12 . 0 -13.47 10531 5.329519912185871 .04931166885184492 3 2014 13 . 0 -5.79 11661 5.348978178910014 .05221047164489178 3 2015 14 . 0 -20.66 3602 5.423691411734157 .013578515636780362 3 2016 15 . 0 2.2600000000000002 53356 5.426127220835772 .2000119956215981 3 2017 16 . 0 -30.8 14951 5.590895310542863 .03835084443167593 3 2018 17 . . . . . . 4 2003 . .9352 . . . . . 4 2004 . .9352 . . . . . 4 2005 . .9352 . . . . . 4 2006 . .9352 . . . . . 4 2007 . .9352 . . . . . 4 2008 . .9352 . . . . . 4 2009 . .9352 . . . . . 4 2010 . .9352 . . . . . 4 2011 . .9352 . . . 6.888868705270129 0 4 2012 . .9352 . 2.67 . 6.920286364909844 0 4 2013 . .9352 . 1.87 . 6.927320308485605 0 4 2014 . .9352 . 2.87 36252 6.943627603308249 .004127664288769809 4 2015 . .9352 . 4.67 41236 6.9783788496906665 .004334087562947062 4 2016 0 .9352 0 -13.47 2013658 7.067896569834173 .17222220369136404 4 2017 1 .9352 1.4000000000000001 7.83 604664 7.015265340593753 .058377940841966805 4 2018 2 .9352 5.48 -13.98 602942 6.961852563632563 .06582986637871974 5 2003 19 . 0 -11.36 1426 4.477772208349258 .04746214012314861 5 2004 20 . 0 5.15 7484 4.754325397016405 .13176752293254926 5 2005 21 . 3.17 7.640000000000001 9414 4.949487589946504 .10575151651314312 5 2006 22 . 2.5 9.33 24768 5.064794811195383 .2133517098802653 5 2007 23 . 1.42 4.71 48527 5.697973458905673 .09727695878954563 5 2008 24 . 3.48 -5.3500000000000005 45413 5.7485446224632435 .08102808407379652 5 2009 25 . 1.87 -3.18 55852 5.748911764781968 .0995696463398546 5 2010 26 . 0 -9.15 8598 5.742686647810173 .015549298219914603 5 2011 27 . 0 5.2 59114 5.619012936947996 .14212726874926368 5 2012 28 . 0 -4.09 . 5.489784164460412 0 5 2013 29 . 6.25 -1.25 . 5.4238649167400705 0 5 2014 30 . 6.29 1.48 . 5.456552769974431 0 5 2015 31 . 2.49 3.85 . 5.421166121680211 0 5 2016 32 . 3.87 .08 9609 5.407902237928535 .037564356667878544 5 2017 33 . 0 3.1 10500 5.408748606184244 .040967616074912214 5 2018 34 . 0 -6.61 12008 5.4059931359329125 .04714954904016429 6 2003 126 . . . . . . 6 2004 127 . . . . . . 6 2005 128 . . . . . . 6 2006 129 . . . . . . 6 2007 130 . . . . . . 6 2008 131 . . . . . . 6 2009 132 . . . . . . 6 2010 133 . . . . . . 6 2011 134 . . . . . . 6 2012 135 . . . . . . 6 2013 136 . . . 133156 6.401492043192994 .05282855080933343 6 2014 137 . . 2.06 172148 6.395123616723902 .06930720175212574 6 2015 138 . . 2.04 243946 6.401841160554287 .09670580418765395 6 2016 139 . .67 5.15 123322 6.382824871428864 .05107586000670122 6 2017 140 . 3.13 6.51 130825 6.400025340329397 .05207933176037098 6 2018 141 . 3.5300000000000002 6.78 121027 6.401241787476709 .0480441462931492 7 2003 9 .4174 3.92 6.37 243000 7.0478198278165936 .021766391974202794 7 2004 10 .4174 3.8200000000000003 8.42 282000 7.068185861746161 .024102564102564103 7 2005 11 .4174 3.83 9.450000000000001 342000 7.061829307294699 .02966175195143105 7 2006 12 .4174 2.6 11.42 444000 7.073058160988836 .037525354969574036 end
Kindest Regards.
0 Response to Multiple Imputation on Panel Data - Error regarding variance-covariance matrix (EM did not converge)
Post a Comment