Announcement

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

  • Panel data analysis

    panel data -- Estimating the effect of independent variable for individual countries

    Hi Everyone,

    Below is a sample of a panel data that i am creating to examine the effect of natural resource rents on manufacturing. The preliminary results show that resource rents have negative effect on manufacturing, but im interested in finding out the individual countries where resource rents have the highest effect. I know it has something to do with predictive probabilities or marginal effects but dont know how to approach it - please i need help.

    Below are the codes i have used for the analysis"


    xtset id year
    xtsum lnman rent rent_fact gdp_percapita pop inf_con_prices fdi landlock imports openness
    xttrans rent_fact, freq
    gen rent_fact=1 if nat_rents < 2
    replace rent_fact=2 if nat_rents > 2 & nat_rents <=10
    replace rent_fact=3 if nat_rents > 10

    gen landlock = inlist (country,"Mali", "Burkina Faso", "Niger", "Chad", "Central African Republic", "South Sudan", "Ethiopia", "Uganda") | inlist(country, "Rwanda", "Burundi", "Malawi", "Zambia", "Zimbabwe", "Botswana", "Lesotho", "Eswatini")

    xtreg lnman nat_rents gdp_percapita pop inf_con_prices fdi landlock imports openness, re vce(robust)
    xtreg lnman rent i.rent_fact gdp_percapita pop inf_con_prices fdi landlock imports openness BOP , re vce(robust)
    xtreg lnman rent i.rent_fact gdp_percapita pop inf_con_prices c.fdi##c.landlock imports openness BOP , re vce(robust)

    predict lnman_pred, xb
    gen lnman_resid = lnman - lnman_pred
    collapse (mean) lnman_resid = lnman_resid, by(country)
    sort lnman_resid




    Code:
    * Example generated by -dataex-. For more info, type help dataex clear input float id int year str52 country double(exports BOP pop nat_rents inf_con_prices imports gdp gdp_percapita fdi domestic_credit) float(landlock lnman openess rent_fact) 5 1990 "Angola" 3.8839e+09 -2.355e+08 11828638 28.9385761970058 . 1.5782e+09 11228764963.235294 949.2863813429149 -3.348e+08 . 0 . .4864382 3 5 1991 "Angola" 3.4493e+09 -5.796e+08 12228691 . 83.7837837837838 1.3472e+09 10603784541.19696 867.1234346502795 6.645e+08 . 0 . .4523385 3 5 1992 "Angola" 3.8328e+09 -734776000 12632507 . 299.509803921569 1988034000 8307810973.588479 657.6533837336071 287956000 . 0 . .7006459 3 5 1993 "Angola" 2.9005e+09 -6.685e+08 13038270 . 1378.52760736196 1.4626e+09 5768720421.613673 442.44523403900007 3.021e+08 . 0 . .7563376 3 5 1994 "Angola" 3.0166e+09 -3.398e+08 13462031 51.6944467877655 949.792531120332 1.4541e+09 4438321017.390678 329.69178405477436 1.703e+08 . 0 . 1.0072954 3 5 1995 "Angola" 3.7227e+09 -295047000 13912253 42.2228681816132 2666.45059288538 1467668000 5538749259.94714 398.1202225079676 472427000 . 0 19.12357 .9371011 3 5 1996 "Angola" 5.095e+09 3266378000 14383350 45.9990809509508 4145.10598220638 2040461000 7526446605.517117 523.2749398100663 180559000 . 0 19.37366 .9480518 3 5 1997 "Angola" 5006760000 -883540000 14871146 39.2644929844579 219.176721172974 2.597e+09 7648377412.832772 514.3098865973592 411660000 . 0 19.62927 .9941664 3 5 1998 "Angola" 3542870000 -1867130000 15366864 18.3781003662254 107.284821528298 2079350000 6506229607.294324 423.39345277568174 1113970000 . 0 19.824936 .8641288 3 5 1999 "Angola" 5156530000 -1710410000 15870753 40.0305505458615 248.195902412868 3109080000 6152922942.980315 387.68941479842294 2471460000 . 0 19.105297 1.343363 3 5 2000 "Angola" 7920710000 795650000 16394062 55.4763565868181 324.996871601321 3039510000 9129594818.607492 556.8842437345603 878620000 . 0 19.39093 1.2005155 3 5 2001 "Angola" 6534320000 -1430930000 16941587 38.5162974696533 152.561022469299 3179180000 8936063723.201212 527.4632018358853 2145470000 . 0 19.662247 1.0869999 3 5 2002 "Angola" 8327889093 -150093385.26 17516139 27.6698307018392 108.897436089429 3760118414.83 15285594828.417973 872.6577716937489 1743504000 . 0 20.14297 .7908104 3 5 2003 "Angola" 9508176643 -719558880.5 18124342 24.1056895826877 98.2241436573305 5480121172 17812704825.195724 982.8056006223964 3576971780 . 0 20.384256 .8414387 3 5 2004 "Angola" 13475002110 681237662.030001 18771125 40.1819667731034 43.5421067519686 5831784555.6 23552047248.430122 1254.6955629153886 2197227820 . 0 20.82102 .8197498 3 5 2005 "Angola" 24109411611 5137882651.4822 19450959 45.8097225779326 22.953513851394 8353237654.472 36970918699.25229 1900.724725153772 -1303836930 . 0 21.0925 .878059 3 5 2006 "Angola" 31862236056 10689818935.61 20162340 43.4787169460548 13.3052101780031 8777632624.254 52381006892.03801 2597.962681516035 -37714860 . 0 21.36113 .7758512 3 5 2007 "Angola" 44396193769 10581250704.88 20909684 46.2764616034126 12.2514974459487 13661464164.47 65266452081.38596 3121.350474803252 -893342152 . 0 21.5202 .8895482 3 5 2008 "Angola" 63913941114 7194246953.019 21691522 55.8747947565139 12.4758291326398 20982185983.481 88538610805.32137 4081.7150039227936 1678971010 . 0 21.843306 .9588599 3 5 2009 "Angola" 40827945315.81 -7571651745.69 22507674 30.8048903827259 13.7302839288409 22659935299.34 70307166934.33105 3123.697585735916 2205298180 . 0 22.002056 .9030072 3 5 2010 "Angola" 50594853215.38 7505954235.08 23364185 40.1868423825762 14.4696564932576 16666858026.86 81699526880.8079 3496.7847960803215 -3227211182.45 . 0 22.03446 .8232815 3 5 2011 "Angola" 67310283732.3282 13084636207.4109 24259111 41.0931732666277 13.4824679218512 20228447301.57 109436566876.41864 4511.153227190339 -3023770965.83688 . 0 22.24083 .7999039 3 5 2012 "Angola" 71093269879.5401 13841185161.0098 25188292 36.288877976934 10.2779049218839 23703843194.26 124998210652.24281 4962.552071900818 -1464627990.88284 . 0 22.42875 .7583877 3 5 2013 "Angola" 68246518070.6135 8145070111.69022 26147002 30.8504654159641 8.77781429332618 26330987036.3 133401582620.49359 5101.983876411284 -7120017424.4614 . 0 22.585756 .7089684 3 5 2014 "Angola" 59169884894.9568 -3747517596.21103 27128337 23.7586260592338 7.28038730361125 28580270905.54 137244439121.37398 5059.080441288163 3657514667.49327 . 0 22.60075 .6393713 3 5 2015 "Angola" 33181130225.6441 -10272841902.6133 28127721 10.8292890562817 9.35383972513758 20692537061.32 87219300384.50717 3100.830685305332 10028215162.6394 25.24010830549836 0 22.324377 .6176805 3 5 2016 "Angola" 27588875075.4791 -3085195463.21077 29154746 10.8922202726371 30.6989578589225 13040490877.77 49840491178.151764 1709.5155340455294 -179517618.92 21.098409900147345 0 21.936863 .8151879 3 5 2017 "Angola" 34613454927.6954 -632867147.90334 30208628 16.436781826354 29.8425777887099 14463243323.9856 68972769395.62737 2283.214232557247 -7397295409.18991 17.000685058629436 0 22.235926 .7115373 3 5 2018 "Angola" 40757766796.592 7402606519.27953 31273533 27.5331192785728 19.6305943641961 15797847354.35 77792944471.94943 2487.500995552675 -6456076413.12033 14.93527048877287 0 22.27377 .7270018 3 5 2019 "Angola" 34725561391.1333 5137394880.2235 32353588 26.13835473684 17.0797044074954 14127058396.87 69309110145.76874 2142.2387571285367 -4098478747.63755 15.340921560583464 0 22.17108 .7048513 3 5 2020 "Angola" 20937437117.7636 871917831.29993 33428486 25.5179628326171 22.2715643068877 9543140272.92 53619073505.137726 1603.9934774532633 -1866468113.07454 12.860046979703327 0 22.03287 .5684652 3 5 2021 "Angola" 33581489802.6561 8399451648.83264 34503774 . 25.7542656453085 11794847513.83 67404287260.31994 1953.5337572150786 -4355116552.71589 . 0 21.971455 .6731966 3 17 1990 "Burundi" 72750983.5455325 -69444226.8249421 5483793 13.3710325428176 7.00216956651126 189021758.435864 1132101252.5181746 206.44492826738258 1255434.74294 8.614541103167973 1 18.711948 .23122732 3 17 1991 "Burundi" 92957742.5991129 -33275378.9796943 5594828 12.6945459298565 8.99693873494325 195925810.469522 1167398478.3459036 208.6567233784316 892500.106741913 10.748473322070053 1 18.815102 .24745925 3 17 1992 "Burundi" 76955327.8242556 -59608454.3644824 5743085 14.0206683897655 1.8233333333331 181773957.126489 1083037670.60484 188.58116684758105 600088.333002617 10.721010833138939 1 18.349545 .23889223 3 17 1993 "Burundi" 73861108.8228025 -28115989.7849905 5555220 14.238648580744 9.67934658067928 172843726.830876 938632612.0263591 168.96407559491055 473679.874783755 14.031198004634298 1 18.185938 .26283428 3 17 1994 "Burundi" 80653045.0700044 -16884183.4462969 5586408 17.0617153397151 14.852814983397 172593875.228813 925030590.153683 165.5859346746036 3957.84890911789 14.736116741993802 1 18.27573 .2737714 3 17 1995 "Burundi" 112889502.817733 10446132.7487663 5932783 24.02891350754 19.2632536382538 175558291.542797 1000428393.885281 168.62716770279326 1981922.46479085 12.265663713531112 1 18.229761 .28832427 3 17 1996 "Burundi" 40413326.873954 -40010349.6873073 5930507 28.9246630235986 26.4367816091951 100014313.39734 869033856.3170933 146.53618254174444 0 14.233409350057013 1 17.813719 .16159053 3 17 1997 "Burundi" 87472476.5326226 6129686.08465521 5923862 23.6215639521918 31.1115898319694 96069022.1157417 972896267.915425 164.2334456669357 0 11.871703617269546 1 18.367304 .18865475 3 17 1998 "Burundi" 64030789.9032047 -48635466.082532 6035340 27.0192383766191 12.5004107653378 123484187.233282 893770806.0776415 148.0895535425745 0 13.535207396301848 1 18.33853 .20980208 3 17 1999 "Burundi" 54983253.8538316 -21105733.6142841 6180180 15.4172437374682 3.38542427340455 97296573.1396251 808077223.3657464 130.753023919327 -475191.305312188 15.390206411945542 1 18.33052 .1884471 3 17 2000 "Burundi" 49052598.9583815 -50162533.186557 6307659 15.0609351881394 24.4320242102151 107858715.460542 870486065.8831366 138.00461722536627 11683246.0768 17.080014445038298 1 18.368267 .18025713 3 17 2001 "Burundi" 39154897.9149439 -36713166.2826267 6465729 18.812078087963 9.29618771341885 108259696.675311 876794723.0685855 135.60647578464634 -11440.9127038289 16.302832343421493 1 18.377651 .16812897 3 17 2002 "Burundi" 31015982.6448049 -3284988.16813338 6648938 24.3014254632118 -1.36568005328061 104798697.1069 825394490.1591105 124.13929715679565 0 20.31026273327474 1 18.331951 .1645452 3 17 2003 "Burundi" 37528126.2123367 -23902939.1660971 6860846 40.4921952056171 10.6474645658306 130047292.678872 784654423.6204764 114.36700716215994 0 20.13272615790254 1 18.277384 .2135659 3 17 2004 "Burundi" 48482605.1412481 -32368607.5029521 7120496 30.4545201859667 8.17642937482059 145429103.460805 915257323.3960996 128.53842251945645 44690.7076028704 17.350747747931692 1 18.467607 .2118658 3 17 2005 "Burundi" 60801764.337049 -5698160.23298074 7388874 26.4632869634632 13.2520699188223 188911994.721288 1117113045.6522198 151.1885363929903 584701.692574561 14.543668331893228 1 18.704123 .2235349 3 17 2006 "Burundi" 58676450.910458 -133539415.109128 7658190 23.9491794668622 2.74542000214246 244704991.40954 1273375020.2686229 166.27623763168882 31593.7781888499 15.830880219864113 1 18.698414 .2382499 3 17 2007 "Burundi" 58836291.4957643 -111307028.885154 7944609 32.3563567648798 8.41206285772541 254120717.538455 1356199364.858818 170.70687366223032 500245.093059071 14.7745242569166 1 18.83057 .2307603 3 17 2008 "Burundi" 69648172.7600437 -259356226.222548 8278109 33.0482440418152 24.4069510353914 335469828.067885 1611835901.906298 194.71064006360606 3833208.34759484 13.662915151645173 1 18.859577 .2513395 3 17 2009 "Burundi" 68414018.2832445 -161180586.838638 8709366 30.3366575654188 10.5554355299529 343026862.618249 1781455092.0711389 204.54475010823276 348404.534569828 14.630270740389385 1 18.945807 .23095776 3 17 2010 "Burundi" 101236293.907907 -300982004.173613 9126605 23.8533749014014 6.49326591473996 438394337.32052 2032135246.5000358 222.66058917856483 780582.003631939 18.36191802872957 1 19.051357 .2655486 3 17 2011 "Burundi" 123982004.747279 -283583270.335852 9455733 24.9876673095543 9.59216605979671 552470250.21014 2235820867.8274293 236.45135367373732 3354999.1805922 21.55991025467329 1 19.15476 .3025521 3 17 2012 "Burundi" 134698608.194335 -261157248.520261 9795479 17.5280473681697 18.1610453065451 711045615.506699 2333341374.896569 238.20594938711713 604919.651526489 20.204925460313536 1 19.143616 .36246055 3 17 2013 "Burundi" 94050454.7162038 -258429277.175128 10149577 17.4953130756186 7.93795807492412 675595584.180775 2451606684.317083 241.54767083564988 116727136.517749 19.3898209324084 1 19.27094 .3139354 3 17 2014 "Burundi" 131793726.805257 -395077161.965288 10494913 17.4462810682205 4.4053523418529 655137799.942241 2705783272.0744286 257.8185519093325 81747197.2345183 19.2934120175417 1 19.42842 .29083318 3 17 2015 "Burundi" 120838349.384343 -373243823.096405 10727148 15.5324953465325 5.54468891259786 603828555.493942 3104003611.429569 289.3596332808654 49622865.7705811 16.38809242048558 1 19.411413 .233462 3 17 2016 "Burundi" 124686434.805031 -339695286.751492 10903327 18.4481964113134 5.55768961400965 527176200.875121 2639321161.4110208 242.0656705435892 55420.3566564864 17.169907257375332 1 19.325247 .24698117 3 17 2017 "Burundi" 172637712.507699 -373388923.277553 11155593 18.2770822739274 16.0525353030392 647771297.037977 2712324133.7977605 243.13580943637515 316473.449369742 15.463733539857666 1 . .3024746 3 17 2018 "Burundi" 180189335.845191 -362644693.882423 11493472 12.6036911469817 -2.8146980766847 676112757.365816 2660123597.707625 231.44647654839417 983747.12499426 18.032643917196186 1 . .3219031 3 17 2019 "Burundi" . . 11874838 12.8511121762816 -.686772170797229 . 2576518846.3900027 216.97296808512274 1044957.4151 20.70449901840223 1 . . 3 17 2020 "Burundi" . . 12220227 12.4085159262879 7.32110643415513 . 2649671998.861917 216.82674134137747 8473943.201 23.637703210162172 1 . . 3 17 2021 "Burundi" . . 12551213 . 8.4045384507634 . 2779813489.0244703 221.47767622336346 7898029.6924 . 1 . . 3 19 1990 "Benin" 237493803.31485 -18141163.3766882 5133419 7.73593239392921 . 323369028.589727 1959965243.76269 381.8050394410996 -2954844.09146129 19.12768903769605 0 18.789255 .28615957 2 19 1991 "Benin" 373533212.798458 -216384278.774854 5293046 7.04316737304076 . 673368833.121115 1986437859.9034622 375.2920076461573 393822.32951725 15.383810263628625 0 18.773005 .5270248 2 19 1992 "Benin" 345078690.541192 -72712868.1184051 5457778 8.90094618262247 . 560537952.362982 1695315305.7030787 310.62372007492405 954317.43364815 11.674476617866235 0 18.718063 .53418773 2 19 1993 "Benin" 393479252.084553 -58751760.311602 5706181 5.67380521177207 .44059921493181 561358073.092387 2274557914.074811 398.61299774311595 -21635980.3291014 10.514544707075855 0 18.944902 .4197903 2 19 1994 "Benin" 397904595.779931 10551783.9561519 5923394 9.07150184312047 38.5308661668537 451503566.092773 1598075932.354319 269.79058498460836 -7107468.70636541 8.452625140601434 0 18.673132 .5315193 2 19 1995 "Benin" 419936213.605216 -166966769.151903 6046511 9.13619432042747 14.4625482180894 622454732.655873 2169627250.9337907 358.82300568605444 -7738379.60727878 7.4284051541475815 0 18.981718 .480447 2 19 1996 "Benin" 522869180.501224 -40955332.7482757 6203860 8.29680725676242 4.91423972637199 557799715.364446 2361116587.860794 380.5883091915024 -14661253.7760882 8.47764074613428 0 19.090487 .457694 2 19 1997 "Benin" 424023277.085973 -153955311.442302 6387026 7.92878639017232 3.46629590564781 576868370.94501 2268301537.65128 355.1420547922116 12183267.3373419 5.41528298944634 0 19.07349 .4412516 2 19 1998 "Benin" 414271319.345114 -132511170.183925 6584183 7.48501027611046 5.7533145841706 572394752.516266 2455092582.3092666 372.8773307651483 11294143.499927 6.9132109867838505 0 19.09409 .4018855 2 19 1999 "Benin" 421600058.373024 -155633708.764094 6788589 3.23284787358724 .326722893396868 633010349.564244 3677394291.515164 541.7023024247253 9314781.87697622 7.142326952492292 0 19.99824 .28678197 2 19 2000 "Benin" 393306762.291777 -80783378.7502869 6998023 3.39024118567369 4.16540442290282 516053905.127868 3519991326.484636 502.9979647801437 -12794843.6146595 7.7614297383202535 0 20.01446 .25834173 2 19 2001 "Benin" 373840199.82531 -74992412.599646 7212041 3.16973051888205 3.98429547767895 553311368.576379 3666222600.09828 508.34744285262383 16739539.3415636 5.13608000150082 0 20.16698 .25289014 2 19 2002 "Benin" 449946156.535667 -156932556.338637 7431783 3.38833760630793 2.4891623549154 681154361.704346 4194342849.4657445 564.3790796186789 -19395622.6954977 4.833189688857743 0 20.301855 .26967287 2 19 2003 "Benin" 542039308.700978 -331950912.889118 7659208 4.17522066893314 1.48724246145442 820366945.133698 5349258334.31914 698.408808628665 10638088.2576383 7.671284647733784 0 20.55168 .25469068 2 19 2004 "Benin" 569568439.232025 -289010635.811171 7894554 3.12542829256931 .873890830868505 841241050.019154 6190270756.13743 784.119122642955 -40774605.0603669 7.804471975938261 0 20.63627 .22790755 2 19 2005 "Benin" 578343031.80628 -226174696.216712 8149419 3.04609464446911 5.36452085832342 863706926.736069 6567654493.508306 805.9046287236312 -8788860.12677506 9.034310335713116 0 20.75205 .2195685 2 19 2006 "Benin" 736112437.205128 -217198381.152853 8402631 3.04876209362755 3.78217696540374 1042891033.74154 7034111651.496404 837.1320425110188 -12363482.3642044 10.335066664497823 0 20.80572 .25291088 2 19 2007 "Benin" 1048143874.18628 -534763829.039847 8647761 3.62691504634563 1.29806813334154 1603710667.19552 8169048690.05254 944.6432076525404 139189943.015454 12.30918320744781 0 20.8389 .3246222 2 19 2008 "Benin" 1287372077.71432 -538190532.962479 8906469 3.64875464695243 7.94729876067859 1897358568.13261 9787735426.008968 1098.9467796956312 48210757.8531253 12.780565908830033 0 20.90475 .3253797 2 19 2009 "Benin" 1229494122.82181 -651546427.808673 9172514 3.70291832819171 .896072355749072 1744766053.01014 9738626993.276962 1061.7184114711586 -18807407.3780513 15.129711649095768 0 20.8972 .3054086 2 19 2010 "Benin" 1282783670.83005 -530854983.685416 9445710 3.42233006971996 2.20783532536522 1776908236.66796 9535345011.48797 1009.4894943300154 53507087.7359341 15.834837680315658 0 20.836094 .320879 2 19 2011 "Benin" 1252444989.30808 -516838833.489276 9726380 3.47876903315435 2.70423907747279 1802712673.59977 10693321370.03598 1099.4143113919033 161302390.821902 16.574340444037077 0 20.95017 .2857071 2 19 2012 "Benin" 1442539724.86132 -576935937.945258 10014078 3.91643001416052 6.74468253340715 2001978083.54423 11141358105.985321 1112.5695352068678 281548556.296849 15.647592407948274 0 20.90014 .309165 2 19 2013 "Benin" 1982438622.57512 -673366862.290826 10308730 3.51561852901866 .428888888888863 2594443522.766 12517845127.677475 1214.295565765858 360343380.324674 16.45394984826445 0 21.03601 .3656286 2 19 2014 "Benin" 2566617492.68619 -885799913.31055 10614844 3.70461529956937 -.548757550948147 3278021817.73935 13284527850.263166 1251.5047654269029 405737369.105165 16.73710913563559 0 21.045216 .4399584 2 19 2015 "Benin" 2392374854.60175 -679200532.34774 10932783 4.30435329785485 .218785923536177 2916041759.46246 11388160997.108948 1041.6525231598348 149755663.330268 16.735706436467574 0 20.856815 .4661347 2 19 2016 "Benin" 2835518188.30016 -354241236.026214 11260085 4.45599386355762 -.794050173906725 2946203943.43433 11821065852.12709 1049.8203034992268 131790853.840786 17.482372279853337 0 20.883667 .4891033 2 19 2017 "Benin" 2980590514.4966 -531029511.357372 11596779 4.10749745388018 1.76941247391975 3324208323.3684 12701655845.961237 1095.2744590511932 200902719.348049 16.577919509506557 0 20.92368 .4963761 2 19 2018 "Benin" 3344316327.72822 -648824804.895274 11940683 2.46040412481133 .644803622440778 3899915261.40392 14262408079.701374 1194.4382142714428 194073683.196869 16.746415437675378 0 20.990837 .50792485 2 19 2019 "Benin" 3056477195.61364 -575592817.829551 12290444 2.4825328579817 -.70502663454275 3500936737.07258 14391686309.032972 1170.9655329809868 218207871.715646 17.61070253651927 0 21.07381 .455639 2 19 2020 "Benin" 2995822076.06079 -273966712.893496 12643123 2.32162334142658 3.02272119663756 3152060630.04817 15651545208.878334 1237.949295350392 174019952.063054 15.537120761512426 0 21.13947 .3927972 2 19 2021 "Benin" . . 12996895 . 1.73353962694033 . 17144918952.468235 1319.1549945174008 242350119.8924 . 0 21.24026 . 3 20 1990 "Burkina Faso" . . 9131361 6.81625243788072 -.50430338891893 . 3101300641.875116 339.63180755586336 460000 16.906943025204374 1 19.941093 . 2 20 1991 "Burkina Faso" . . 9365064 7.26046395607044 2.16260052713424 . 3135045684.1006017 334.75966465371744 570000 12.464128680603874 1 19.854263 . 2 20 1992 "Burkina Faso" . . 9598555 6.3859432549159 -1.99113580736895 . 3356692517.8641725 349.7081089668364 3113052.1 10.926078058660943 1 20.001337 . 2 20 1993 "Burkina Faso" . . 9840075 5.60307109862179 .553455723541917 . 3199536227.9481826 325.15364242123997 3178381.3 9.773838344995504 1 19.936266 . 2 end
    ------------------ copy up to and including the previous line ------------------

    Listed 100 out of 1472 observations
    Use the count() option to list more

  • #2
    You don't explain what your variables are, but I'm guessing that the variable representing natural resource rents is nat_rents, and also the derived variable rent_fact. It is also unclear what you country variable is. While you have a variable named country that is the obvious candidate, I notice that the panel variable in the regression is a different variable called id. Maybe id is a numeric variable that corresponds to country? I might have been able to resolve that by exploring your example data, but somehow your -dataex- post got scrambled into a single long line that is difficult to unpack and can't be used as is.

    I'll just assume that you have, or will create, some numeric variable that corresponds with country, whether it's id, or whether you use -encode country- to create it. I'll call it n_country. Then to get country-specific estimates of the effect of nat_rents, include the interaction term i.n_country##c.nat_rents in the regression command. Then follow that with -margins n_country, dydx(nat_rents)-. If you prefer to use the categorized variable rent_fact, then in the regression the interaction term is i.n_country##i.rent_fact, and the follow-up margins command is -margins n_country, dydx(rent_fact)-.

    Comment


    • #3
      Clyde Schechter

      Yes, nat_rents is natural resource rents and rent_factor is a categorical variable for nat_rents --low, medium and high. The id is a unique nummerical variable assigned to each country. So, i included an interaction term between id and nat_rents to the model and estimated the country level-specific effect.

      --- xtreg lnman nat_rents i.id##c.nat_rents gdp_percapita pop inf_con_prices c.fdi##c.landlock imports openness, re vce(robust).

      When i run -margins id dydx(nat_rents)-, I got an error message "not estimable"

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input float id int year str52 country double(BOP pop nat_rents manufacturing inf_con_prices imports gdp_percapita fdi domestic_credit) float(rent_fact landlock lnman openness)
       5 1990 "Angola"              -2.355e+08 11828638 28.9385761970058                  .                 .       1.5782e+09  949.2863813429149        -3.348e+08                  . 3 0         .  .4864382
       5 1991 "Angola"              -5.796e+08 12228691                .                  .  83.7837837837838       1.3472e+09  867.1234346502795         6.645e+08                  . 3 0         .  .4523385
       5 1992 "Angola"              -734776000 12632507                .                  .  299.509803921569       1988034000  657.6533837336071         287956000                  . 3 0         .  .7006459
       5 1993 "Angola"              -6.685e+08 13038270                .                  .  1378.52760736196       1.4626e+09 442.44523403900007         3.021e+08                  . 3 0         .  .7563376
       5 1994 "Angola"              -3.398e+08 13462031 51.6944467877655                  .  949.792531120332       1.4541e+09 329.69178405477436         1.703e+08                  . 3 0         . 1.0072954
       5 1995 "Angola"              -295047000 13912253 42.2228681816132 201958350.47059062  2666.45059288538       1467668000  398.1202225079676         472427000                  . 3 0  19.12357  .9371011
       5 1996 "Angola"              3266378000 14383350 45.9990809509508  259342533.4817075  4145.10598220638       2040461000  523.2749398100663         180559000                  . 3 0  19.37366  .9480518
       5 1997 "Angola"              -883540000 14871146 39.2644929844579 334875882.35101545  219.176721172974        2.597e+09  514.3098865973592         411660000                  . 3 0  19.62927  .9941664
       5 1998 "Angola"             -1867130000 15366864 18.3781003662254 407249039.00388294  107.284821528298       2079350000 423.39345277568174        1113970000                  . 3 0 19.824936  .8641288
       5 1999 "Angola"             -1710410000 15870753 40.0305505458615 198301063.22551432  248.195902412868       3109080000 387.68941479842294        2471460000                  . 3 0 19.105297  1.343363
       5 2000 "Angola"               795650000 16394062 55.4763565868181 263860200.80418858  324.996871601321       3039510000  556.8842437345603         878620000                  . 3 0  19.39093 1.2005155
       5 2001 "Angola"             -1430930000 16941587 38.5162974696533 346102756.83541954  152.561022469299       3179180000  527.4632018358853        2145470000                  . 3 0 19.662247 1.0869999
       5 2002 "Angola"           -150093385.26 17516139 27.6698307018392  559731834.4505653  108.897436089429    3760118414.83  872.6577716937489        1743504000                  . 3 0  20.14297  .7908104
       5 2003 "Angola"            -719558880.5 18124342 24.1056895826877  712475155.5833756  98.2241436573305       5480121172  982.8056006223964        3576971780                  . 3 0 20.384256  .8414387
       5 2004 "Angola"        681237662.030001 18771125 40.1819667731034   1102692322.60891  43.5421067519686     5831784555.6 1254.6955629153886        2197227820                  . 3 0  20.82102  .8197498
       5 2005 "Angola"         5137882651.4822 19450959 45.8097225779326  1446628995.710144   22.953513851394   8353237654.472  1900.724725153772       -1303836930                  . 3 0   21.0925   .878059
       5 2006 "Angola"          10689818935.61 20162340 43.4787169460548 1892429279.7764287  13.3052101780031   8777632624.254  2597.962681516035         -37714860                  . 3 0  21.36113  .7758512
       5 2007 "Angola"          10581250704.88 20909684 46.2764616034126  2218727582.291369  12.2514974459487   13661464164.47  3121.350474803252        -893342152                  . 3 0   21.5202  .8895482
       5 2008 "Angola"          7194246953.019 21691522 55.8747947565139 3064973678.3885574  12.4758291326398  20982185983.481 4081.7150039227936        1678971010                  . 3 0 21.843306  .9588599
       5 2009 "Angola"          -7571651745.69 22507674 30.8048903827259 3592289537.6423516  13.7302839288409   22659935299.34  3123.697585735916        2205298180                  . 3 0 22.002056  .9030072
       5 2010 "Angola"           7505954235.08 23364185 40.1868423825762 3710607898.7567363  14.4696564932576   16666858026.86 3496.7847960803215    -3227211182.45                  . 3 0  22.03446  .8232815
       5 2011 "Angola"        13084636207.4109 24259111 41.0931732666277  4561102414.058315  13.4824679218512   20228447301.57  4511.153227190339 -3023770965.83688                  . 3 0  22.24083  .7999039
       5 2012 "Angola"        13841185161.0098 25188292  36.288877976934  5504033126.450649  10.2779049218839   23703843194.26  4962.552071900818 -1464627990.88284                  . 3 0  22.42875  .7583877
       5 2013 "Angola"        8145070111.69022 26147002 30.8504654159641  6439751496.028283  8.77781429332618    26330987036.3  5101.983876411284  -7120017424.4614                  . 3 0 22.585756  .7089684
       5 2014 "Angola"       -3747517596.21103 27128337 23.7586260592338  6537050864.493257  7.28038730361125   28580270905.54  5059.080441288163  3657514667.49327                  . 3 0  22.60075  .6393713
       5 2015 "Angola"       -10272841902.6133 28127721 10.8292890562817 4958543523.0860615  9.35383972513758   20692537061.32  3100.830685305332  10028215162.6394  25.24010830549836 3 0 22.324377  .6176805
       5 2016 "Angola"       -3085195463.21077 29154746 10.8922202726371 3365569249.6866446  30.6989578589225   13040490877.77 1709.5155340455294     -179517618.92 21.098409900147345 3 0 21.936863  .8151879
       5 2017 "Angola"        -632867147.90334 30208628  16.436781826354   4538787340.13134  29.8425777887099 14463243323.9856  2283.214232557247 -7397295409.18991 17.000685058629436 3 0 22.235926  .7115373
       5 2018 "Angola"        7402606519.27953 31273533 27.5331192785728   4713839536.01815  19.6305943641961   15797847354.35  2487.500995552675 -6456076413.12033  14.93527048877287 3 0  22.27377  .7270018
       5 2019 "Angola"         5137394880.2235 32353588   26.13835473684   4253808795.71126  17.0797044074954   14127058396.87 2142.2387571285367 -4098478747.63755 15.340921560583464 3 0  22.17108  .7048513
       5 2020 "Angola"         871917831.29993 33428486 25.5179628326171 3704705929.1503468  22.2715643068877    9543140272.92 1603.9934774532633 -1866468113.07454 12.860046979703327 3 0  22.03287  .5684652
       5 2021 "Angola"        8399451648.83264 34503774                . 3484026883.1272287  25.7542656453085   11794847513.83 1953.5337572150786 -4355116552.71589                  . 3 0 21.971455  .6731966
      17 1990 "Burundi"      -69444226.8249421  5483793 13.3710325428176 133812151.47003007  7.00216956651126 189021758.435864 206.44492826738258     1255434.74294  8.614541103167973 3 1 18.711948 .23122732
      17 1991 "Burundi"      -33275378.9796943  5594828 12.6945459298565 148352459.60344437  8.99693873494325 195925810.469522  208.6567233784316  892500.106741913 10.748473322070053 3 1 18.815102 .24745925
      17 1992 "Burundi"      -59608454.3644824  5743085 14.0206683897655  93133560.24637188   1.8233333333331 181773957.126489 188.58116684758105  600088.333002617 10.721010833138939 3 1 18.349545 .23889223
      17 1993 "Burundi"      -28115989.7849905  5555220  14.238648580744  79077429.98352553  9.67934658067928 172843726.830876 168.96407559491055  473679.874783755 14.031198004634298 3 1 18.185938 .26283428
      17 1994 "Burundi"      -16884183.4462969  5586408 17.0617153397151  86506532.41669734   14.852814983397 172593875.228813  165.5859346746036  3957.84890911789 14.736116741993802 3 1  18.27573  .2737714
      17 1995 "Burundi"       10446132.7487663  5932783   24.02891350754  82619976.13690051  19.2632536382538 175558291.542797 168.62716770279326  1981922.46479085 12.265663713531112 3 1 18.229761 .28832427
      17 1996 "Burundi"      -40010349.6873073  5930507 28.9246630235986  54500412.88191577  26.4367816091951  100014313.39734 146.53618254174444                 0 14.233409350057013 3 1 17.813719 .16159053
      17 1997 "Burundi"       6129686.08465521  5923862 23.6215639521918  94802299.98580956  31.1115898319694 96069022.1157417  164.2334456669357                 0 11.871703617269546 3 1 18.367304 .18865475
      17 1998 "Burundi"       -48635466.082532  6035340 27.0192383766191  92113341.61742589  12.5004107653378 123484187.233282  148.0895535425745                 0 13.535207396301848 3 1  18.33853 .20980208
      17 1999 "Burundi"      -21105733.6142841  6180180 15.4172437374682  91378496.52210945  3.38542427340455 97296573.1396251   130.753023919327 -475191.305312188 15.390206411945542 3 1  18.33052  .1884471
      17 2000 "Burundi"       -50162533.186557  6307659 15.0609351881394  94893712.37875865  24.4320242102151 107858715.460542 138.00461722536627     11683246.0768 17.080014445038298 3 1 18.368267 .18025713
      17 2001 "Burundi"      -36713166.2826267  6465729  18.812078087963  95788227.37399891  9.29618771341885 108259696.675311 135.60647578464634 -11440.9127038289 16.302832343421493 3 1 18.377651 .16812897
      17 2002 "Burundi"      -3284988.16813338  6648938 24.3014254632118  91509292.40659031 -1.36568005328061   104798697.1069 124.13929715679565                 0  20.31026273327474 3 1 18.331951  .1645452
      17 2003 "Burundi"      -23902939.1660971  6860846 40.4921952056171  86649686.50126545  10.6474645658306 130047292.678872 114.36700716215994                 0  20.13272615790254 3 1 18.277384  .2135659
      17 2004 "Burundi"      -32368607.5029521  7120496 30.4545201859667 104804589.20347711  8.17642937482059 145429103.460805 128.53842251945645  44690.7076028704 17.350747747931692 3 1 18.467607  .2118658
      17 2005 "Burundi"      -5698160.23298074  7388874 26.4632869634632 132769070.94565234  13.2520699188223 188911994.721288  151.1885363929903  584701.692574561 14.543668331893228 3 1 18.704123  .2235349
      17 2006 "Burundi"      -133539415.109128  7658190 23.9491794668622 132013380.98517366  2.74542000214246  244704991.40954 166.27623763168882  31593.7781888499 15.830880219864113 3 1 18.698414  .2382499
      17 2007 "Burundi"      -111307028.885154  7944609 32.3563567648798 150665093.95724827  8.41206285772541 254120717.538455 170.70687366223032  500245.093059071   14.7745242569166 3 1  18.83057  .2307603
      17 2008 "Burundi"      -259356226.222548  8278109 33.0482440418152 155099457.63263068  24.4069510353914 335469828.067885 194.71064006360606  3833208.34759484 13.662915151645173 3 1 18.859577  .2513395
      17 2009 "Burundi"      -161180586.838638  8709366 30.3366575654188 169067238.33405733  10.5554355299529 343026862.618249 204.54475010823276  348404.534569828 14.630270740389385 3 1 18.945807 .23095776
      17 2010 "Burundi"      -300982004.173613  9126605 23.8533749014014 187887952.71949595  6.49326591473996  438394337.32052 222.66058917856483  780582.003631939  18.36191802872957 3 1 19.051357  .2655486
      17 2011 "Burundi"      -283583270.335852  9455733 24.9876673095543 208355990.48841965  9.59216605979671  552470250.21014 236.45135367373732   3354999.1805922  21.55991025467329 3 1  19.15476  .3025521
      17 2012 "Burundi"      -261157248.520261  9795479 17.5280473681697 206047290.70029262  18.1610453065451 711045615.506699 238.20594938711713  604919.651526489 20.204925460313536 3 1 19.143616 .36246055
      17 2013 "Burundi"      -258429277.175128 10149577 17.4953130756186 234025960.22045788  7.93795807492412 675595584.180775 241.54767083564988  116727136.517749   19.3898209324084 3 1  19.27094  .3139354
      17 2014 "Burundi"      -395077161.965288 10494913 17.4462810682205  273939176.1111025   4.4053523418529 655137799.942241  257.8185519093325  81747197.2345183   19.2934120175417 3 1  19.42842 .29083318
      17 2015 "Burundi"      -373243823.096405 10727148 15.5324953465325  269320542.9384331  5.54468891259786 603828555.493942  289.3596332808654  49622865.7705811  16.38809242048558 3 1 19.411413   .233462
      17 2016 "Burundi"      -339695286.751492 10903327 18.4481964113134 247085763.34147444  5.55768961400965 527176200.875121  242.0656705435892  55420.3566564864 17.169907257375332 3 1 19.325247 .24698117
      17 2017 "Burundi"      -373388923.277553 11155593 18.2770822739274                  .  16.0525353030392 647771297.037977 243.13580943637515  316473.449369742 15.463733539857666 3 1         .  .3024746
      17 2018 "Burundi"      -362644693.882423 11493472 12.6036911469817                  .  -2.8146980766847 676112757.365816 231.44647654839417   983747.12499426 18.032643917196186 3 1         .  .3219031
      17 2019 "Burundi"                      . 11874838 12.8511121762816                  . -.686772170797229                . 216.97296808512274      1044957.4151  20.70449901840223 3 1         .         .
      17 2020 "Burundi"                      . 12220227 12.4085159262879                  .  7.32110643415513                . 216.82674134137747       8473943.201 23.637703210162172 3 1         .         .
      17 2021 "Burundi"                      . 12551213                .                  .   8.4045384507634                . 221.47767622336346      7898029.6924                  . 3 1         .         .
      19 1990 "Benin"        -18141163.3766882  5133419 7.73593239392921 144567171.00411072                 . 323369028.589727  381.8050394410996 -2954844.09146129  19.12768903769605 2 0 18.789255 .28615957
      19 1991 "Benin"        -216384278.774854  5293046 7.04316737304076  142237019.7255012                 . 673368833.121115  375.2920076461573   393822.32951725 15.383810263628625 2 0 18.773005  .5270248
      19 1992 "Benin"        -72712868.1184051  5457778 8.90094618262247 134632926.42893547                 . 560537952.362982 310.62372007492405   954317.43364815 11.674476617866235 2 0 18.718063 .53418773
      19 1993 "Benin"         -58751760.311602  5706181 5.67380521177207 168914307.53920186   .44059921493181 561358073.092387 398.61299774311595 -21635980.3291014 10.514544707075855 2 0 18.944902  .4197903
      19 1994 "Benin"         10551783.9561519  5923394 9.07150184312047  128717735.9989928  38.5308661668537 451503566.092773 269.79058498460836 -7107468.70636541  8.452625140601434 2 0 18.673132  .5315193
      19 1995 "Benin"        -166966769.151903  6046511 9.13619432042747 175248859.85811034  14.4625482180894 622454732.655873 358.82300568605444 -7738379.60727878 7.4284051541475815 2 0 18.981718   .480447
      19 1996 "Benin"        -40955332.7482757  6203860 8.29680725676242  195385918.2363332  4.91423972637199 557799715.364446  380.5883091915024 -14661253.7760882   8.47764074613428 2 0 19.090487   .457694
      19 1997 "Benin"        -153955311.442302  6387026 7.92878639017232 192092908.41699085  3.46629590564781  576868370.94501  355.1420547922116  12183267.3373419   5.41528298944634 2 0  19.07349  .4412516
      19 1998 "Benin"        -132511170.183925  6584183 7.48501027611046 196091043.03097302   5.7533145841706 572394752.516266  372.8773307651483   11294143.499927 6.9132109867838505 2 0  19.09409  .4018855
      19 1999 "Benin"        -155633708.764094  6788589 3.23284787358724  484312461.1579414  .326722893396868 633010349.564244  541.7023024247253  9314781.87697622  7.142326952492292 2 0  19.99824 .28678197
      19 2000 "Benin"        -80783378.7502869  6998023 3.39024118567369   492230578.788186  4.16540442290282 516053905.127868  502.9979647801437 -12794843.6146595 7.7614297383202535 2 0  20.01446 .25834173
      19 2001 "Benin"         -74992412.599646  7212041 3.16973051888205    573333632.12364  3.98429547767895 553311368.576379 508.34744285262383  16739539.3415636   5.13608000150082 2 0  20.16698 .25289014
      19 2002 "Benin"        -156932556.338637  7431783 3.38833760630793  656120890.4486753   2.4891623549154 681154361.704346  564.3790796186789 -19395622.6954977  4.833189688857743 2 0 20.301855 .26967287
      19 2003 "Benin"        -331950912.889118  7659208 4.17522066893314   842328366.707628  1.48724246145442 820366945.133698   698.408808628665  10638088.2576383  7.671284647733784 2 0  20.55168 .25469068
      19 2004 "Benin"        -289010635.811171  7894554 3.12542829256931  916681871.3993682  .873890830868505 841241050.019154   784.119122642955 -40774605.0603669  7.804471975938261 2 0  20.63627 .22790755
      19 2005 "Benin"        -226174696.216712  8149419 3.04609464446911  1029205220.628064  5.36452085832342 863706926.736069  805.9046287236312 -8788860.12677506  9.034310335713116 2 0  20.75205  .2195685
      19 2006 "Benin"        -217198381.152853  8402631 3.04876209362755 1085950778.8286026  3.78217696540374 1042891033.74154  837.1320425110188 -12363482.3642044 10.335066664497823 2 0  20.80572 .25291088
      19 2007 "Benin"        -534763829.039847  8647761 3.62691504634563  1122583424.861225  1.29806813334154 1603710667.19552  944.6432076525404  139189943.015454  12.30918320744781 2 0   20.8389  .3246222
      19 2008 "Benin"        -538190532.962479  8906469 3.64875464695243 1198995510.7623317  7.94729876067859 1897358568.13261 1098.9467796956312  48210757.8531253 12.780565908830033 2 0  20.90475  .3253797
      19 2009 "Benin"        -651546427.808673  9172514 3.70291832819171 1189974568.8542514  .896072355749072 1744766053.01014 1061.7184114711586 -18807407.3780513 15.129711649095768 2 0   20.8972  .3054086
      19 2010 "Benin"        -530854983.685416  9445710 3.42233006971996 1119438569.9049945  2.20783532536522 1776908236.66796 1009.4894943300154  53507087.7359341 15.834837680315658 2 0 20.836094   .320879
      19 2011 "Benin"        -516838833.489276  9726380 3.47876903315435  1254708362.911383  2.70423907747279 1802712673.59977 1099.4143113919033  161302390.821902 16.574340444037077 2 0  20.95017  .2857071
      19 2012 "Benin"        -576935937.945258 10014078 3.91643001416052  1193479626.841499  6.74468253340715 2001978083.54423 1112.5695352068678  281548556.296849 15.647592407948274 2 0  20.90014   .309165
      19 2013 "Benin"        -673366862.290826 10308730 3.51561852901866 1367170240.8545825  .428888888888863   2594443522.766  1214.295565765858  360343380.324674  16.45394984826445 2 0  21.03601  .3656286
      19 2014 "Benin"         -885799913.31055 10614844 3.70461529956937 1379814512.8742957 -.548757550948147 3278021817.73935 1251.5047654269029  405737369.105165  16.73710913563559 2 0 21.045216  .4399584
      19 2015 "Benin"         -679200532.34774 10932783 4.30435329785485  1142878265.612204  .218785923536177 2916041759.46246 1041.6525231598348  149755663.330268 16.735706436467574 2 0 20.856815  .4661347
      19 2016 "Benin"        -354241236.026214 11260085 4.45599386355762 1173981451.2659304 -.794050173906725 2946203943.43433 1049.8203034992268  131790853.840786 17.482372279853337 2 0 20.883667  .4891033
      19 2017 "Benin"        -531029511.357372 11596779 4.10749745388018   1221907961.29305  1.76941247391975  3324208323.3684 1095.2744590511932  200902719.348049 16.577919509506557 2 0  20.92368  .4963761
      19 2018 "Benin"        -648824804.895274 11940683 2.46040412481133  1306787719.905916  .644803622440778 3899915261.40392 1194.4382142714428  194073683.196869 16.746415437675378 2 0 20.990837 .50792485
      19 2019 "Benin"        -575592817.829551 12290444  2.4825328579817 1419844689.1863766  -.70502663454275 3500936737.07258 1170.9655329809868  218207871.715646  17.61070253651927 2 0  21.07381   .455639
      19 2020 "Benin"        -273966712.893496 12643123 2.32162334142658 1516193919.1721148  3.02272119663756 3152060630.04817  1237.949295350392  174019952.063054 15.537120761512426 2 0  21.13947  .3927972
      19 2021 "Benin"                        . 12996895                . 1676978846.0205417  1.73353962694033                . 1319.1549945174008    242350119.8924                  . 3 0  21.24026         .
      20 1990 "Burkina Faso"                 .  9131361 6.81625243788072 457411328.97091365  -.50430338891893                . 339.63180755586336            460000 16.906943025204374 2 1 19.941093         .
      20 1991 "Burkina Faso"                 .  9365064 7.26046395607044  419369381.6067597  2.16260052713424                . 334.75966465371744            570000 12.464128680603874 2 1 19.854263         .
      20 1992 "Burkina Faso"                 .  9598555  6.3859432549159  485814081.1313384 -1.99113580736895                .  349.7081089668364         3113052.1 10.926078058660943 2 1 20.001337         .
      20 1993 "Burkina Faso"                 .  9840075 5.60307109862179  455208416.6482438  .553455723541917                . 325.15364242123997         3178381.3  9.773838344995504 2 1 19.936266         .
      end
      ------------------ copy up to and including the previous line ------------------

      Listed 100 out of 1472 observations
      Use the count() option to list more

      Comment


      • #4
        OK, the model is a little messed up. First, nat_rents appears twice, once on its own and also as a component of i.id##c.nat_rents. More important, with i.id in the model, attempting to also do -xtreg, re- doesn't work: you can't have id as both a fixed and a random effect in the same model. So to get to what you want, the approach should just be a fixed effects along with an id#c.nat_rents interaction:

        Code:
        . xtset id year
        
        Panel variable: id (unbalanced)
         Time variable: year, 1990 to 2021
                 Delta: 1 unit
        
        . xtreg lnman i.id#c.nat_rents gdp_percapita pop inf_con_prices c.fdi##c.landlock imports openness, fe vce(robust)
        note: landlock omitted because of collinearity.
        
        Fixed-effects (within) regression               Number of obs     =         81
        Group variable: id                              Number of groups  =          3
        
        R-squared:                                      Obs per group:
             Within  = 0.9367                                         min =         26
             Between = 0.4688                                         avg =       27.0
             Overall = 0.6045                                         max =         28
        
                                                        F(2,2)            =          .
        corr(u_i, Xb) = -0.4608                         Prob > F          =          .
        
                                                 (Std. err. adjusted for 3 clusters in id)
        ----------------------------------------------------------------------------------
                         |               Robust
                   lnman | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        -----------------+----------------------------------------------------------------
          id#c.nat_rents |
                      5  |  -.0022156   .0031488    -0.70   0.555    -.0157639    .0113328
                     17  |  -.0078985   .0008777    -9.00   0.012     -.011675    -.004122
                     19  |  -.1926731   .0316001    -6.10   0.026    -.3286374   -.0567088
                         |
           gdp_percapita |   .0006142   .0003129     1.96   0.189    -.0007319    .0019603
                     pop |   1.29e-07   3.33e-08     3.89   0.060    -1.37e-08    2.73e-07
          inf_con_prices |  -.0000692   .0000444    -1.56   0.260    -.0002601    .0001218
                     fdi |   1.95e-11   2.08e-11     0.94   0.448    -7.01e-11    1.09e-10
                landlock |          0  (omitted)
                         |
        c.fdi#c.landlock |   3.11e-09   1.50e-09     2.07   0.174    -3.35e-09    9.56e-09
                         |
                 imports |  -4.67e-11   6.50e-11    -0.72   0.547    -3.26e-10    2.33e-10
                openness |  -.3317912   .4658088    -0.71   0.550    -2.336005    1.672422
                   _cons |   18.51172   .6613704    27.99   0.001     15.66607    21.35737
        -----------------+----------------------------------------------------------------
                 sigma_u |  1.1180974
                 sigma_e |  .23669541
                     rho |  .95710752   (fraction of variance due to u_i)
        ----------------------------------------------------------------------------------
        
        . margins id, dydx(nat_rents)
        
        Average marginal effects                                    Number of obs = 81
        Model VCE: Robust
        
        Expression: Linear prediction, predict()
        dy/dx wrt:  nat_rents
        
        ------------------------------------------------------------------------------
                     |            Delta-method
                     |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
        -------------+----------------------------------------------------------------
        nat_rents    |
                  id |
                  5  |  -.0022156   .0031488    -0.70   0.482    -.0083872    .0039561
                 17  |  -.0078985   .0008777    -9.00   0.000    -.0096188   -.0061782
                 19  |  -.1926731   .0316001    -6.10   0.000    -.2546081    -.130738
        ------------------------------------------------------------------------------

        Comment

        Working...
        X