Announcement

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

  • IDs in weighting matrix W do not match _IDs in estimation sample

    I'm trying to run a Moran's I test on my data but I keep getting this error. Here is my code and data below. Can anyone please help?
    spmatrix clear
    spmatrix create idistance W if year ==2016, replace
    regress manf_pc_ff Rents_GDP_nb
    estat moran, errorlag(W)
    Error: IDs in weighting matrix W do not match _IDs in estimation sample
    There are places in W not in estimation sample and places in estimation sample not in W.




    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. To install: ssc install dataex clear input str59 country int year long _ID double(_CX _CY) float(Neighbor_population manf_pc_ff Rents_GDP_nb Migrants_pp Imports_GDP Rents_GDP) "Algeria" 1996 4 2.676869982345495 28.155623766186512 8850334 4526.076 9.501017 1.469662 .0007634131 12.39737 "Algeria" 1997 4 2.676869982345495 28.155623766186512 11303946 4526.076 8.751779 1.598385 1.8598734e-06 11.291486 "Algeria" 1998 4 2.676869982345495 28.155623766186512 1681863 1761.4027 7.991744 .746421 3.475715e-06 6.566297 "Algeria" 1999 4 2.676869982345495 28.155623766186512 10414433 1236.165 6.610361 .6066885 5.769097e-06 9.017069 "Algeria" 2000 4 2.676869982345495 28.155623766186512 3393409 1236.165 9.913099 1.830486 .00002545021 15.307203 "Algeria" 2001 4 2.676869982345495 28.155623766186512 16934220 1236.165 9.085542 .5818813 .000024008114 14.12193 "Algeria" 2002 4 2.676869982345495 28.155623766186512 21602472 1236.165 12.518338 .644254 .00010100015 14.069468 "Algeria" 2003 4 2.676869982345495 28.155623766186512 1540640 1236.165 13.394665 1.033551 .00007591845 16.304386 "Algeria" 2004 4 2.676869982345495 28.155623766186512 10847002 1236.165 14.695156 .9091178 .00005918097 18.196198 "Algeria" 2005 4 2.676869982345495 28.155623766186512 10635244 1950.91 17.960484 .6038817 .00002242149 24.39616 "Algeria" 2006 4 2.676869982345495 28.155623766186512 5635859 1950.91 21.09472 .5429423 .0008050447 26.534433 "Algeria" 2007 4 2.676869982345495 28.155623766186512 17795192 1950.91 23.52048 .4908597 .0009190447 25.01032 "Algeria" 2008 4 2.676869982345495 28.155623766186512 3802803 1964.865 26.05785 .9432834 .00003911596 27.04177 "Algeria" 2009 4 2.676869982345495 28.155623766186512 7548433 674.4952 17.755713 .53244996 .00014366036 18.953701 "Algeria" 2010 4 2.676869982345495 28.155623766186512 20479716 1711.1956 22.44304 .9969134 .00010707934 19.99752 "Algeria" 2011 4 2.676869982345495 28.155623766186512 1016100 1711.1956 22.29719 .56222767 .0016875453 23.587303 "Algeria" 2012 4 2.676869982345495 28.155623766186512 4220450 1473.514 21.17175 1.431636 .00020204144 22.987114 "Algeria" 2013 4 2.676869982345495 28.155623766186512 2865637 1473.514 15.603875 .8952893 .0002164117 21.3234 "Algeria" 2014 4 2.676869982345495 28.155623766186512 1496185 1473.514 12.823918 .8289234 .0007887898 19.292645 "Algeria" 2015 4 2.676869982345495 28.155623766186512 9837571 2019.2263 11.07809 .7223982 .00005280594 11.990244 "Algeria" 2016 4 2.676869982345495 28.155623766186512 1829675 2019.2263 11.07809 .6918197 .00026967164 16.50982 "Angola" 1996 8 17.54875399673365 -12.296463111860687 24249130 29.47187 23.611984 .4798474 .00006291911 47.57884 "Angola" 1997 8 17.54875399673365 -12.296463111860687 58453684 126.54377 23.650045 .1773713 .00006291911 42.79438 "Angola" 1998 8 17.54875399673365 -12.296463111860687 4145391 630.0487 18.084288 .7111751 .00006291911 25.83629 "Angola" 1999 8 17.54875399673365 -12.296463111860687 84068088 630.0487 20.368923 .2290232 .00006291911 49.55986 "Angola" 2000 8 17.54875399673365 -12.296463111860687 2118874 630.0487 19.10101 .5527683 .00006291911 61.9567 "Angola" 2001 8 17.54875399673365 -12.296463111860687 13215139 630.0487 18.008947 .4689616 .00006291911 45.59174 "Angola" 2002 8 17.54875399673365 -12.296463111860687 1763859 88.23344 17.217104 .3276423 .00006291911 38.35699 "Angola" 2003 8 17.54875399673365 -12.296463111860687 28403852 88.23344 19.54555 .50254697 .00006291911 36.654045 "Angola" 2004 8 17.54875399673365 -12.296463111860687 4011486 88.23344 20.637135 .9119723 .00006291911 45.19068 "Angola" 2005 8 17.54875399673365 -12.296463111860687 2632345 88.23344 23.68478 1.1242851 .00006291911 59.90822 "Angola" 2006 8 17.54875399673365 -12.296463111860687 8656486 88.23344 26.97332 .97632 .00006291911 54.13524 "Angola" 2007 8 17.54875399673365 -12.296463111860687 12502958 81.02455 27.271675 .8422908 .00006291911 51.32109 "Angola" 2008 8 17.54875399673365 -12.296463111860687 17351822 443.4748 26.785036 1.085604 .00006291911 58.05639 "Angola" 2009 8 17.54875399673365 -12.296463111860687 20564068 443.4748 22.46705 .9410384 .0040813456 28.122154 "Angola" 2010 8 17.54875399673365 -12.296463111860687 773422 443.4748 27.18687 3.2182405 .0005850176 39.03144 "Angola" 2011 8 17.54875399673365 -12.296463111860687 7372837 443.4748 30.82738 2.4810224 .0011236774 44.50494 "Angola" 2012 8 17.54875399673365 -12.296463111860687 1794571 443.4748 29.585514 6.188809 .0011236774 41.55948 "Angola" 2013 8 17.54875399673365 -12.296463111860687 1629209 443.4748 26.321453 4.0693474 .0011236774 34.8921 "Angola" 2014 8 17.54875399673365 -12.296463111860687 25663592 315.8781 23.740183 6.864351 .00009489132 27.532494 "Angola" 2015 8 17.54875399673365 -12.296463111860687 896266 764.5181 18.515253 7.316497 .00002378095 11.251415 "Angola" 2016 8 17.54875399673365 -12.296463111860687 10971698 764.5181 18.515253 2.592123 .00002378095 7.915795 "Benin" 1996 29 2.3398501727818135 9.660140534442299 5343019 15.5879 18.242311 1.9720035 .000016301196 8.246718 "Benin" 1997 29 2.3398501727818135 9.660140534442299 5989004 188.2109 17.411388 3.9486234 5.800144e-06 7.962859 "Benin" 1998 29 2.3398501727818135 9.660140534442299 4829288 47.05788 13.575778 4.39362 .000019344665 7.48092 "Benin" 1999 29 2.3398501727818135 9.660140534442299 3486326 47.05788 11.71843 1.750362 .0003915379 4.3020644 "Benin" 2000 29 2.3398501727818135 9.660140534442299 185960288 219.65837 15.493333 2.1436284 1.645258e-06 4.466275 "Benin" 2001 29 2.3398501727818135 9.660140534442299 14689725 20.498995 13.203022 4.412729 .0010427071 4.205236 "Benin" 2002 29 2.3398501727818135 9.660140534442299 85766400 20.498995 11.366695 3.930797 .002970367 4.5202656 "Benin" 2003 29 2.3398501727818135 9.660140534442299 2720839 29.86207 13.546003 5.326047 .0011095933 5.674131 "Benin" 2004 29 2.3398501727818135 9.660140534442299 5330639 203.0331 12.675787 3.228534 .00012891361 4.2822847 "Benin" 2005 29 2.3398501727818135 9.660140534442299 48032936 47.78551 14.026616 7.454515 .0006365182 4.1527042 "Benin" 2006 29 2.3398501727818135 9.660140534442299 5920359 47.78551 12.95055 8.329845 .004781516 4.1706467 "Benin" 2007 29 2.3398501727818135 9.660140534442299 5197031 177.69476 14.35436 5.155968 .0005831367 4.957317 "Benin" 2008 29 2.3398501727818135 9.660140534442299 3802803 177.69476 16.496635 6.759823 .01367666 5.010157 "Benin" 2009 29 2.3398501727818135 9.660140534442299 9816588 177.69476 12.797234 3.231226 .02009596 5.086227 "Benin" 2010 29 2.3398501727818135 9.660140534442299 54717040 177.69476 14.06555 2.843286 .014037357 4.687139 "Benin" 2011 29 2.3398501727818135 9.660140534442299 15141098 303.82907 18.643568 7.226935 .0004749757 4.765978 "Benin" 2012 29 2.3398501727818135 9.660140534442299 58665808 20.65209 20.08877 3.5694966 .002522477 5.351275 "Benin" 2013 29 2.3398501727818135 9.660140534442299 9826598 16.956762 17.824038 12.590753 .016578557 4.805236 "Benin" 2014 29 2.3398501727818135 9.660140534442299 7340905 477.1121 15.518964 13.49253 .0006979496 4.6448903 "Benin" 2015 29 2.3398501727818135 9.660140534442299 6530819 18.114723 16.283562 11.76372 .01175899 6.726689 "Benin" 2016 29 2.3398501727818135 9.660140534442299 171765776 18.114723 16.283562 5.344246 .02102789 11.15268 "Botswana" 1996 35 23.81374954991846 -22.1880523360801 14465121 255.78062 5.921973 9.640889 .0041855955 .9700951 "Botswana" 1997 35 23.81374954991846 -22.1880523360801 30993758 899.8796 5.102481 5.3807 .0041855955 .8713127 "Botswana" 1998 35 23.81374954991846 -22.1880523360801 25836888 6.01067 3.8940625 7.189121 .0041855955 .6645786 "Botswana" 1999 35 23.81374954991846 -22.1880523360801 45571272 476.7619 2.705888 3.376134 .0041855955 .4190151 "Botswana" 2000 35 23.81374954991846 -22.1880523360801 3260650 225.61467 3.145004 3.39817 .0041855955 1.4446483 "Botswana" 2001 35 23.81374954991846 -22.1880523360801 1516958 830.0626 3.030259 7.734243 .002342174 .57508594 "Botswana" 2002 35 23.81374954991846 -22.1880523360801 7146969 325.796 3.372952 13.65778 .01681536 .5477104 "Botswana" 2003 35 23.81374954991846 -22.1880523360801 8036845 52.25553 4.671824 3.867763 .04168242 1.619681 "Botswana" 2004 35 23.81374954991846 -22.1880523360801 10415944 17.842302 6.746966 6.014678 .16759945 3.315373 "Botswana" 2005 35 23.81374954991846 -22.1880523360801 50477012 65.32992 7.166213 8.494273 .06260648 3.8229654 "Botswana" 2006 35 23.81374954991846 -22.1880523360801 753688 555.8862 10.310335 6.099618 .00518518 7.987185 "Botswana" 2007 35 23.81374954991846 -22.1880523360801 14645468 395.7336 13.006267 10.764872 .013030366 9.272271 "Botswana" 2008 35 23.81374954991846 -22.1880523360801 1879117 135.00468 13.364775 15.66777 .05890121 6.041979 "Botswana" 2009 35 23.81374954991846 -22.1880523360801 3776681 70.43772 8.86377 16.72886 .13183981 11.453908 "Botswana" 2010 35 23.81374954991846 -22.1880523360801 4039201 92.90221 10.455236 18.81948 .08322993 4.936467 "Botswana" 2011 35 23.81374954991846 -22.1880523360801 22069776 2.632249 11.373919 4.909244 2.1860754 3.568519 "Botswana" 2012 35 23.81374954991846 -22.1880523360801 53689236 2.632249 9.997845 4.7371607 3.324176 3.6288655 "Botswana" 2013 35 23.81374954991846 -22.1880523360801 41435760 7.768843 8.912998 10.27558 1.0163765 3.684058 "Botswana" 2014 35 23.81374954991846 -22.1880523360801 29333104 4.796864 8.122456 10.634151 1.9083743 3.579605 "Botswana" 2015 35 23.81374954991846 -22.1880523360801 32678874 578.0952 7.398216 6.703864 .007079433 2.711595 "Botswana" 2016 35 23.81374954991846 -22.1880523360801 1731639 83.72369 7.398216 4.950684 .026264926 12.455848 "Burkina Faso" 1996 42 -1.7463989056755453 12.274383858458796 14685399 50.08324 8.915753 9.212647 .0004504818 12.786032 "Burkina Faso" 1997 42 -1.7463989056755453 12.274383858458796 3043567 3.872308 8.573694 2.492128 .003667297 12.709138 "Burkina Faso" 1998 42 -1.7463989056755453 12.274383858458796 4902151 94.02332 8.126556 10.192673 .0007426227 11.6252 "Burkina Faso" 1999 42 -1.7463989056755453 12.274383858458796 7941412 8.399014 5.260384 9.790195 .005672063 5.21044 "Burkina Faso" 2000 42 -1.7463989056755453 12.274383858458796 6281639 173.3838 6.663795 6.56138 .0001361116 5.980082 "Burkina Faso" 2001 42 -1.7463989056755453 12.274383858458796 16464025 3.0436146 6.015562 3.805452 .004775717 5.373523 "Burkina Faso" 2002 42 -1.7463989056755453 12.274383858458796 12783613 250.2708 6.862589 11.42101 .0002121973 6.414193 "Burkina Faso" 2003 42 -1.7463989056755453 12.274383858458796 3347173 60.03719 9.183302 8.0028305 .0010766997 7.335972 "Burkina Faso" 2004 42 -1.7463989056755453 12.274383858458796 5521763 33.360542 7.174012 6.689685 .001888869 6.187195 "Burkina Faso" 2005 42 -1.7463989056755453 12.274383858458796 23310716 9.145805 7.210747 2.941031 .0041597234 7.153515 "Burkina Faso" 2006 42 -1.7463989056755453 12.274383858458796 5635859 26.465094 7.555095 12.100534 .0041597234 7.311117 "Burkina Faso" 2007 42 -1.7463989056755453 12.274383858458796 5197031 62.82407 8.654179 10.13778 .0014487214 9.183211 "Burkina Faso" 2008 42 -1.7463989056755453 12.274383858458796 3802803 56.80743 10.059135 9.533585 .0017760934 10.404152 "Burkina Faso" 2009 42 -1.7463989056755453 12.274383858458796 17014056 8.558409 9.25667 6.479319 .009888065 12.345053 "Burkina Faso" 2010 42 -1.7463989056755453 12.274383858458796 28481946 44.05433 10.55823 8.955203 .00241598 14.92755 "Burkina Faso" 2011 42 -1.7463989056755453 12.274383858458796 15653336 98.67007 13.677193 4.5542073 .0004508217 18.725376 "Burkina Faso" 2012 42 -1.7463989056755453 12.274383858458796 9460830 7.918809 15.875013 5.13754 .014376565 18.997168 "Burkina Faso" 2013 42 -1.7463989056755453 12.274383858458796 9918196 28.219553 14.005953 11.41643 .010262776 17.293825 "Burkina Faso" 2014 42 -1.7463989056755453 12.274383858458796 17231540 17.488194 12.716898 9.393352 .01899917 16.864077 "Burkina Faso" 2015 42 -1.7463989056755453 12.274383858458796 7300116 11.68881 13.53846 10.79001 .013682513 20.98524 "Burkina Faso" 2016 42 -1.7463989056755453 12.274383858458796 20246380 16.89307 13.53846 3.707062 .003346267 .22385524 "Burundi" 1996 43 29.890484050138404 -3.3664890597484587 25203844 8.571363 20.42165 1.7023183 .00019254687 28.37523 "Burundi" 1997 43 29.890484050138404 -3.3664890597484587 10549678 19.410156 17.677279 2.8376684 .00012391988 23.621565 "Burundi" 1998 43 29.890484050138404 -3.3664890597484587 11985440 11.256915 16.92812 2.2653968 .00013408903 27.011356 "Burundi" 1999 43 29.890484050138404 -3.3664890597484587 20344548 18.869043 13.788254 2.419681 .0001890501 15.412393 "Burundi" 2000 43 29.890484050138404 -3.3664890597484587 6443751 47.04573 6.080245 2.8684 .0003482377 15.053692 "Burundi" 2001 43 29.890484050138404 -3.3664890597484587 30683868 85.16896 9.730244 4.5877957 .00014013541 18.653854 "Burundi" 2002 43 29.890484050138404 -3.3664890597484587 10346697 85.16896 10.55954 3.318508 .002606129 24.11573 "Burundi" 2003 43 29.890484050138404 -3.3664890597484587 11668818 37.39759 16.072147 4.2280774 .0003042936 40.55007 "Burundi" 2004 43 29.890484050138404 -3.3664890597484587 23670808 37.39759 13.36723 3.590096 .0009704344 30.59273 "Burundi" 2005 43 29.890484050138404 -3.3664890597484587 6419901 37.39759 12.203648 3.106492 .001510929 26.47682 "Burundi" 2006 43 29.890484050138404 -3.3664890597484587 41853944 15.168947 12.589868 2.953567 .0002904715 24.11697 "Burundi" 2007 43 29.890484050138404 -3.3664890597484587 43827180 15.168947 14.562042 3.1991005 .0020577402 32.556114 "Burundi" 2008 43 29.890484050138404 -3.3664890597484587 40252976 15.168947 16.03938 2.511247 .003014635 33.390926 "Burundi" 2009 43 29.890484050138404 -3.3664890597484587 43073832 47.88997 16.064018 4.1759205 .00023527916 31.35737 "Burundi" 2010 43 29.890484050138404 -3.3664890597484587 19120680 19.694157 16.499815 2.4659526 .0004303128 24.13432 "Burundi" 2011 43 29.890484050138404 -3.3664890597484587 49871664 16.644947 18.202635 5.526068 .00608474 23.837616 "Burundi" 2012 43 29.890484050138404 -3.3664890597484587 38450320 4.094543 17.968384 2.930594 .006373889 16.75686 "Burundi" 2013 43 29.890484050138404 -3.3664890597484587 3105419 15.492642 18.025589 4.826927 .0019991721 16.06113 "Burundi" 2014 43 29.890484050138404 -3.3664890597484587 28792640 10.01763 16.675688 5.222345 .0032952614 14.138004 "Burundi" 2015 43 29.890484050138404 -3.3664890597484587 29649136 10.01763 15.867878 4.0636916 .006110306 17.160543 "Burundi" 2016 43 29.890484050138404 -3.3664890597484587 27717292 19.8039 15.867878 4.014459 .0014460522 1.6105767 "Cabo Verde" 1996 47 -23.980244187563258 15.94123272842388 1079580 73.68158 4.97791 2.0602558 .00044109585 .6995824 "Cabo Verde" 1997 47 -23.980244187563258 15.94123272842388 8690164 73.68158 5.238934 1.9416233 .00016903764 .6958637 "Cabo Verde" 1998 47 -23.980244187563258 15.94123272842388 678113 107.11163 6.891724 1.9865538 .00013159527 .7066209 "Cabo Verde" 1999 47 -23.980244187563258 15.94123272842388 3682876 175.2689 4.812697 3.1595404 .00004297999 .3678554 "Cabo Verde" 2000 47 -23.980244187563258 15.94123272842388 3393409 175.2689 5.948762 2.48944 .00004297999 .4142639 "Cabo Verde" 2001 47 -23.980244187563258 15.94123272842388 4014103 109.38757 6.088899 2.537064 .00005060887 .39662606 "Cabo Verde" 2002 47 -23.980244187563258 15.94123272842388 12004701 119.30764 6.153033 2.8656545 .0001014779 .4471822 "Cabo Verde" 2003 47 -23.980244187563258 15.94123272842388 7526307 256.83124 7.545666 4.680163 .00009842752 .6158354 "Cabo Verde" 2004 47 -23.980244187563258 15.94123272842388 1633652 395.6086 6.924398 4.269916 .000027964863 .51325387 "Cabo Verde" 2005 47 -23.980244187563258 15.94123272842388 405259 395.6086 10.883353 2.3355591 .00038174225 .4966612 "Cabo Verde" 2006 47 -23.980244187563258 15.94123272842388 4797187 222.56404 14.21772 5.175218 .00010352361 .4258945 "Cabo Verde" 2007 47 -23.980244187563258 15.94123272842388 1981899 134.38028 20.077036 2.590663 .00007194954 .4890847 "Cabo Verde" 2008 47 -23.980244187563258 15.94123272842388 3789383 40.7911 21.18702 2.724154 .0006496905 .4789932 "Cabo Verde" 2009 47 -23.980244187563258 15.94123272842388 1930433 241.53455 13.561744 4.885962 .0004039528 .5440446 "Cabo Verde" 2010 47 -23.980244187563258 15.94123272842388 3111906 241.53455 19.19068 3.633831 .0012382133 .4882983 "Cabo Verde" 2011 47 -23.980244187563258 15.94123272842388 1016100 241.53455 19.53127 5.325577 .0012382133 .5040318 "Cabo Verde" 2012 47 -23.980244187563258 15.94123272842388 13033809 241.53455 17.110106 6.927062 .0012382133 .6315693 "Cabo Verde" 2013 47 -23.980244187563258 15.94123272842388 3598648 486.7593 17.537294 5.38643 .00009642816 .6164749 "Cabo Verde" 2014 47 -23.980244187563258 15.94123272842388 7303517 47.83794 14.455986 4.946973 .00058180647 .6374309 "Cabo Verde" 2015 47 -23.980244187563258 15.94123272842388 2255516 118.7822 11.99401 4.581484 .00027740665 .9731719 "Cabo Verde" 2016 47 -23.980244187563258 15.94123272842388 3386806 378.1909 11.99401 5.647484 .00007613715 2.5621974 "Cameroon" 1996 45 12.74475426235271 5.691944491582316 533361 184.4042 33.680553 1.444963 .00013439376 11.133176 "Cameroon" 1997 45 12.74475426235271 5.691944491582316 277646 316.1618 36.631943 1.6045707 .00008144102 10.110292 "Cameroon" 1998 45 12.74475426235271 5.691944491582316 100161712 366.6939 25.994413 1.739605 .00007219431 6.585636 "Cameroon" 1999 45 12.74475426235271 5.691944491582316 1219541 597.35986 32.87741 2.8341885 .00009316107 6.439063 "Cameroon" 2000 45 12.74475426235271 5.691944491582316 185960288 597.35986 42.68597 4.1181173 .006778507 12.53282 "Cameroon" 2001 45 12.74475426235271 5.691944491582316 154324928 14.409028 35.830597 1.8690256 .002877679 7.299567 "Cameroon" 2002 45 12.74475426235271 5.691944491582316 1076413 51.01697 31.974276 3.6749325 .0012442356 6.463125 "Cameroon" 2003 45 12.74475426235271 5.691944491582316 1684635 249.64784 31.883957 3.13538 .0003055952 6.664687 "Cameroon" 2004 45 12.74475426235271 5.691944491582316 55982144 144.59073 36.479115 3.767187 .0007140038 7.376881 "Cameroon" 2005 45 12.74475426235271 5.691944491582316 48032936 186.1142 39.42979 1.305245 .0005338776 9.123825 "Cameroon" 2006 45 12.74475426235271 5.691944491582316 3643604 6.627545 38.42289 1.8914214 .013973154 10.495419 "Cameroon" 2007 45 12.74475426235271 5.691944491582316 6781053 20.9656 35.34347 5.158409 .000698988 11.072228 "Cameroon" 2008 45 12.74475426235271 5.691944491582316 784496 88.99214 36.775566 5.269396 .00018428317 12.632468 "Cameroon" 2009 45 12.74475426235271 5.691944491582316 505799 204.6187 22.418926 1.0762267 .00002423802 6.996937 "Cameroon" 2010 45 12.74475426235271 5.691944491582316 54717040 6.532066 26.91963 2.0863066 .019013675 8.39342 "Cameroon" 2011 45 12.74475426235271 5.691944491582316 4957558 114.69098 32.785286 1.6714076 .00006320685 9.957578 "Cameroon" 2012 45 12.74475426235271 5.691944491582316 58665808 89.95172 32.423656 1.7631272 .001932705 10.509792 "Cameroon" 2013 45 12.74475426235271 5.691944491582316 2335333 30.900267 27.463024 4.0983453 .005341635 9.4053335 "Cameroon" 2014 45 12.74475426235271 5.691944491582316 3372189 18.833683 23.32754 5.070136 .017675556 8.440559 "Cameroon" 2015 45 12.74475426235271 5.691944491582316 266000 27.60953 14.264127 2.3660214 .0020408875 6.167601 "Cameroon" 2016 45 12.74475426235271 5.691944491582316 3876119 6.701687 14.264127 2.859117 .004225527 23.95937 end format %ty year
    ------------------ copy up to and including the previous line ------------------

  • #2
    While this is a question that belongs in the Stata subforum instead of the Mata subforum, the answer is probably that you have panel data but estat moran does not work with panel data. You might have to do the analysis year by year:
    Code:
    regress manf_pc_ff Rents_GDP_nb if year == 2016
    estat moran, errorlag(W)
    A similar question was asked today here: https://www.statalist.org/forums/for...moran-s-i-test
    https://twitter.com/Kripfganz

    Comment


    • #3
      Thank you bigly, Sebastian. This thing has held me back for two days.

      Comment

      Working...
      X