Announcement

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

  • Warning message in -mundlak- command running output and Correlated Random Estimator

    Dear Stata Users,

    I have been analysed a panel data (panel id is scountry, and timevar is year), and run a mundlak model. In my regress equation, I add a variable named sregion which is generated by -sencode region-. And as regard to region, it is a cluster variable that indexs groups of Asian countries (i.e. scountry). So in the fixed effects model, I dropped sregion in equation, and in the mundlak model, I add sregion in the same way as I do in the random effects model & pooled OLS model. However, when I run mundlak command, it gives me some warning message such as:
    The variable _Isregion_2 does not vary sufficiently within groups and will not be used to create additional regressors.
    0% of the total variance in _Isregion_2 is within groups.
    I wonder if there's wrong in my model specification, and what's the implication these warning message suggests? Thank You.
    The Stata codes and dataex code (for saving space, I run -sample 20- before runing -dataex-) that I used is posted as belows:

    Code:
    /*sencode region, gen(sregion)
    replace sregion=6 if scountry==35
    label define sregion 6 以色列, modify
    tabulate sregion
    order sregion, after(region)*/
    
    xtset scountry year
    
    global indepent "d1 d9 d10 d20 d23 d31 d48 d54 d57 d62 d64 d127"
    global region "i.sregion"
    
    qui regress d65 $indepent $region i.year                          /*Pooled OLS*/
    est store ols
    qui xtreg d65 $indepent $region i.year, re theta                 /*Random effects*/
    est store re
    qui xtreg d65 $indepent i.year, fe                               /*Fixed effects*/
    est store fe
    qui xi: mundlak d65 $indepent $region i.year, full               /*mundlak (CRE)*/
    est store mundlak
    
    esttab ols re fe mundlak, type mtitles nonumber nobase ///
     label order(d9 d10 d48 d54 d57 d20 d23 d64 d1 d62 d31 d127)
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double(d65 d1 d9 d10 d20 d23 d31 d48 d54 d57 d62 d64 d127) int year byte sregion str12 region int scountry str38 country
              . 34.89032516 39.20000076 43.80704117  5.471628807 2.27748e+11 .  29.8830511  21.8102169 1178.798111 48.63196073  1.998562594 . 2016 3 "南亚"    21 "巴基斯坦"    
              . 30.20168395 56.40000153 65.73433685   10.5500091 45187272895 5 65.27524069 59.37364197 907.3623858   51.192566   .646530397 6 2009 2 "东南亚"  10 "缅甸"        
    22.41332054 35.42946884 40.79999924 45.69901657  7.499999169  6514177191 4  64.3864805 36.39899826 814.7750688 49.64191035  2.265771146 7 2012 4 "中亚"    26 "塔吉克斯坦"  
              . 24.07888883 31.39999962 36.00246811  2.479843833  1.2722e+11 5 57.89985732 26.80417824 47965.00883 41.69339463  5.778846676 7 2008 5 "西亚"    39 "科威特"      
    34.84011078  34.9402262 41.59999847 47.74212265  5.426673849  3205083428 4 74.63532006 40.82482147 654.3123118 50.55611803  1.191125924 7 2000 4 "中亚"    25 "吉尔吉斯斯坦"
              . 40.57102102 25.89999962 26.71323776 -28.09683489 20780222150 6 8.916653069 4.975823402 772.0338215  49.4708559  2.520254045 6 2015 5 "西亚"    42 "也门"        
    65.84654999 27.42641014 44.70000076 50.75773239   4.65783121 2.44491e+11 6 82.01511646 48.55205536 31482.99716 50.57282027  1.848077862 6 2011 6 "西亚"    35 "以色列"      
              .  29.2072444 32.59999847 42.17597198   10.5999992 15979538495 4 85.92998111 42.67481613  1955.41315 50.97484407   .746173583 7 2002 5 "西亚"    45 "阿塞拜疆"    
    25.26073074 30.22564959 35.79999924  42.7291832 -5.962310691 4.89871e+11 5 37.45380194 28.19737816 7631.403183 50.75978161  1.493147245 6 2001 5 "西亚"    46 "土耳其"      
              . 17.65175242          43  41.5090332  3.237980767 4.06424e+11 . 78.30184656 33.88728333 5901.884123 51.20385004   .299465512 . 2016 2 "东南亚"  11 "泰国"        
              . 16.94795438 34.29999924 36.82413101  6.224417276 2.51138e+11 6 74.92665943 35.52640152 48447.68058 50.66778104  2.084902456 4 2011 2 "东南亚"  14 "新加坡"      
    16.97945023 26.30624433 36.59999847 42.26324081 -1.764535541 13360145141 6 75.33514525 37.41130066 34812.71469  48.4369585  1.184773447 7 2009 2 "东南亚"  13 "文莱"        
    48.56230927 27.96692965 13.30000019 18.23069763  5.411444902 6.12452e+11 6 26.41798876 8.706881523 21056.34715 43.66498573  2.959993577 6 2012 5 "西亚"    36 "沙特阿拉伯"  
    30.27387047 29.51941619 37.40000153 41.90572357  9.427665099 2.36695e+11 6 56.89803451 33.96840286 8889.684192 48.63004175  1.827924244 7 2007 2 "东南亚"  12 "马来西亚"    
              . 32.60738298 35.79999924 44.52225494  13.04036341 13789041601 3 69.79820735 34.80432129 2900.122554 50.80840895  1.083596746 7 2005 4 "中亚"    28 "土库曼斯坦"  
              . 13.65049428 25.39999962 31.53526306   2.82772231 1.30466e+12 6 71.40522278 34.80347061 25458.88701 49.95375544   .451318044 6 2016 1 "东亚"     4 "韩国"        
              . 28.89285636        20.5 37.78887939  4.452694304 48734720416 6 34.79077946 22.78753471 18302.31933 42.29722457  3.041590016 6 2007 5 "西亚"    41 "阿曼"        
              . 23.38538171 32.59999847 34.29017258 -2.465514923 13301457646 6 78.85535903 30.60792732 31430.96259 48.51167901  1.345029067 7 2016 2 "东南亚"  13 "文莱"        
    22.79460907 24.19079855 42.29999924 43.40007782  6.468567672 20889606053 6 46.17306941 25.83148575 21796.01514 39.27042119   7.49936409 6 2006 5 "西亚"    37 "巴林"        
    43.39176941 17.68559336 47.79999924  48.8276825  6.900204817  8.9083e+12 6 81.35362609 47.27745056 6496.624013 48.47922338   .508136747 6 2015 1 "东亚"     1 "中国"        
              . 41.08355939 19.29999924 34.22161865  6.572160298 1.80886e+11 6  24.7269512 14.18980789 5338.521985 49.42231449  3.320373173 6 2013 5 "西亚"    30 "伊拉克"      
              . 49.91039203 29.79999924 36.44207764 -2.216748768 557858287.5 6 48.86463414 28.26400185 580.5871118 49.29390717   3.92977311 6 2003 2 "东南亚"  16 "东帝汶"      
    38.81483078 37.54935769 19.29999924 27.64243507  8.093331161 21109859431 6 18.72712403 9.961771965 3557.302686 48.51135674  3.779888824 6 2006 5 "西亚"    33 "约旦"        
    6.130790234 36.05120025 54.59999847 48.37291718   3.83312394 73115059421 5 31.45765519 21.92624664 535.2467234 48.98478537  1.842264814 7 2002 3 "南亚"    19 "孟加拉国"    
    44.25460815 19.70270661 22.89999962 38.43492508  3.600000001 11123101342 4 73.38426513 33.49477386 3827.343195 53.04946153   .438331527 8 2014 5 "西亚"    44 "亚美尼亚"    
    14.87967968  30.6862231 45.20000076 55.30569077  4.920067747 4.53414e+11 6 59.72376797 43.46536636  2143.38989 49.95361052  1.393740137 6 2000 2 "东南亚"  15 "印度尼西亚"  
    41.31546021 28.82538507 12.89999962 18.15807152  9.996857794 5.81011e+11 6  25.9677462  7.88995409 20575.49795 43.75573894  2.918964195 6 2011 5 "西亚"    36 "沙特阿拉伯"  
    39.52645874 20.49701576        42.5 42.03935242  5.416503715 28675502255 6 49.90176138 25.94435883 21799.65217 38.24893551  1.161799071 6 2013 5 "西亚"    37 "巴林"        
              . 41.09862757 35.70000076 41.25873184  4.260088012 1.17555e+11 5 19.17766824  10.3189888 848.6317831 48.40496243  2.276383384 7 2000 3 "南亚"    21 "巴基斯坦"    
              . 19.92410506 35.20000076 39.21260834  4.435328147 1.44978e+11 6 67.32487171 38.35535812 35233.13448 50.24136979 -1.474532842 4 2003 2 "东南亚"  14 "新加坡"      
    10.45038033 44.40866777 26.20000076 31.39019775  3.338427956 26655991280 6 17.96740838  12.1818161 1225.472386   49.475287  2.754970495 6 2007 5 "西亚"    42 "也门"        
    19.36459923 24.61826181 31.20000076 35.99262619  25.04899952 41629404407 4 96.60252512 39.29629517 4851.176909 50.60749887  1.133855466 7 2007 5 "西亚"    45 "阿塞拜疆"    
              . 30.09215844          51 54.52573395  26.11149322  2205437294 7 69.38097978 47.23474503 6622.934816 46.85813257  3.670136685 5 2006 3 "南亚"    23 "马尔代夫"    
              . 31.56230789 48.20000076 52.08727264 -13.12905331  1748799604 7 66.62352167 44.22310638 5447.973844 47.29024488  2.843793532 5 2005 3 "南亚"    23 "马尔代夫"    
    2.686769962  43.3723428 67.80000305  70.4662323  5.798782326  3582186705 5 97.48349375 77.03759003 672.1678299 50.14457814  1.665414155 6 2000 2 "东南亚"   8 "老挝"        
              .  13.8818369 65.90000153 66.77802277  2.223120972 1.70663e+11 . 61.61430116 40.50164032 66410.75647 24.76612002  3.495069918 . 2016 5 "西亚"    38 "卡塔尔"      
    41.25574875 21.38245749 23.29999924 32.12342453  5.473838085  7017851503 4 75.06078393 24.80539894 1610.707253 52.67983401  -.672509797 7 2002 5 "西亚"    43 "格鲁吉亚"    
    9.412480354 31.65717891 64.90000153 66.45968628  6.787316408 61146300623 5 89.07007874 65.55615234 787.6541509 50.73659132  1.341154893 7 2000 2 "东南亚"   7 "越南"        
    28.89488029  35.1680164 40.29999924 46.40288162  6.900001455  8458800788 4 62.31972732 36.00566101 968.3856026 49.75500149  2.155884123 7 2016 4 "中亚"    26 "塔吉克斯坦"  
    38.48477173 23.99065262 23.79999924 29.86307907   .815560066 42069990678 6 32.35572802 17.87960052 7189.633711  49.7685546  4.334248771 6 2015 5 "西亚"    34 "黎巴嫩"      
    67.79532623 27.57060723 43.70000076 49.69804382  1.942507688  2.4924e+11 6 83.49418249 48.73854446 31507.47856 50.53414008  1.846151321 6 2012 6 "西亚"    35 "以色列"      
    56.79785156 27.99003411 42.79999924 54.11386108   .161829705  1.7413e+11 6 77.73611843 50.53398895 26503.84335 50.70740534  2.014058394 6 2002 6 "西亚"    35 "以色列"      
      39.008461 23.38376014        49.5 53.78780365  3.444243766 2.25211e+11 6  79.9113472 47.37327194 3544.208344 50.65981599   .925373854 6 2001 2 "东南亚"  11 "泰国"        
    10.38358974 38.60680553        72.5 76.57480621  3.411560276 13764950914 5 90.22976431 75.25361633 525.0822526 50.68553296  1.051592684 7 2007 3 "南亚"    17 "尼泊尔"      
    10.35523033 35.20459699 39.09999847 41.44550323  4.674707981 2.06178e+11 5 28.65220851   20.060606 1111.195962 48.62573869  2.087792429 7 2014 3 "南亚"    21 "巴基斯坦"    
    9.664879799 46.37784615 25.60000038 33.25062561  3.972696401 23678154701 6  21.9923583 14.75080109  1182.89825 49.46921797  2.811704436 6 2004 5 "西亚"    42 "也门"        
              . 20.35443386 34.20000076  38.5675621  4.211686552 1.38821e+11 6 65.90763057 37.24038315 33242.98633 50.18041925   .912639806 4 2002 2 "东南亚"  14 "新加坡"      
    27.40694046 32.37845033 42.20000076 43.89268494  5.390988339  1.7217e+11 6 56.95498097 36.74354172 7114.816741  48.9535893  2.087457079 7 2002 2 "东南亚"  12 "马来西亚"    
              . 23.56789155 23.70000076 30.11450958            2 42911390492 . 32.43324874 17.91213989 7143.959095  49.8212903  2.617573568 . 2016 5 "西亚"    34 "黎巴嫩"      
     20.4384594 22.56954919        28.5 33.13799667  2.200000188 54102205125 4  90.3379661 32.18070602 5820.079847 50.35660326  1.328763827 7 2012 5 "西亚"    45 "阿塞拜疆"    
    38.78591156 38.03247889 17.89999962 27.98587608  8.567297894 18058165848 6 17.80541289 9.287888527 3262.190577 48.32748091  2.539769048 6 2004 5 "西亚"    33 "约旦"        
    4.948019981 41.67513194 65.40000153 68.27448273  6.067002304  4255861752 5 97.51756575 74.10515594 762.7462611 50.32340669  1.487497465 6 2003 2 "东南亚"   8 "老挝"        
    12.00601959  13.4904529 64.69999695 64.74822998  4.410274619 1.55056e+11 6 59.24820794 36.91139984 68899.48531 24.15723422  6.465722916 6 2013 5 "西亚"    38 "卡塔尔"      
    42.77283096 24.04661628        23.5 29.47122002  2.002921346 41729660234 6  32.4139545 17.79335022 7447.364344 49.66988068   6.01643946 6 2014 5 "西亚"    34 "黎巴嫩"      
    15.95436001 26.68595024 36.40000153 42.80954361 -1.939714638 13600124166 6  74.7268861 37.99061203 35860.38878 48.53779891  1.163759826 7 2008 2 "东南亚"  13 "文莱"        
     5.66012001 36.24181221 75.59999847 78.76286316  10.77108367  9014922681 6  89.3792902 77.39084625 669.0363309 51.44419184  1.527719882 6 2006 2 "东南亚"   9 "柬埔寨"      
              . 18.54400016 36.40000153 39.53967285  9.111527148 2.02776e+11 6  69.5113648 38.15546417 44191.23809 50.50940997  4.166002864 4 2007 2 "东南亚"  14 "新加坡"      
              . 30.82856398 37.70000076 47.53282166          6.2 39563379218 4 68.33423798 36.84137726 6986.855946 50.76108928  1.732524453 8 2016 4 "中亚"    28 "土库曼斯坦"  
    12.69112968 30.64628902 41.59999847    48.71278  2.849421858 11971150348 6  69.8744501 44.02797699 35923.40183 49.36053246  2.108246022 7 2000 2 "东南亚"  13 "文莱"        
              . 40.53624841          19 33.83166885           11 2.11894e+11 . 24.98377551 13.97342587 5695.679143 49.38655735  2.965163696 . 2016 5 "西亚"    30 "伊拉克"      
     66.1810379  27.7993142        44.5  49.7779541  3.410136515 2.68335e+11 6 84.90981643 48.60968018 32661.29413 50.44726186  1.919543799 6 2014 6 "西亚"    35 "以色列"      
    1.256839991 48.09824698 36.79999924 49.50733948  8.444163227  8689883606 6 17.87735492 18.62209892 376.7587142 48.32011929   4.81804112 6 2003 5 "西亚"    29 "阿富汗"      
              . 48.60179947 28.89999962 36.25760651  6.181915593 20345854642 6 28.53385496 18.85337448 1138.247142 49.42201079  2.817702613 6 2000 5 "西亚"    42 "也门"        
    43.40129852 28.79957165 23.89999962  30.1530056  3.871259086 22676199979 6 28.93623532 17.74120903 6749.152265 50.17578092   3.77569497 6 2001 5 "西亚"    34 "黎巴嫩"      
              . 20.29152993 43.09999847 44.91290665            .           . .   50.485584 28.70479584           . 37.87034978  3.812796793 . 2016 5 "西亚"    37 "巴林"        
              . 24.54597519          24 43.56256104 -1.106912723 57992510273 6 35.37992291 23.02961922 17914.02821 38.64086799  6.239210094 6 2011 5 "西亚"    41 "阿曼"        
    16.60396004 46.19673065        14.5 16.59819984  13.00097752 812196700.7 6 46.86398361  12.0844326 743.7555695 49.23495061  1.282059981 6 2009 2 "东南亚"  16 "东帝汶"      
    97.97155762 16.66759216 23.70000076 26.22597122   .707509946 1.02773e+12 6 68.17474254 29.30078888  20843.1348 49.88218322   .514682828 6 2009 1 "东亚"     4 "韩国"        
              . 43.74688158 12.89999962 12.99063492  5.666251557  1192299136 6 47.75520265 9.368288994  939.801679 49.21811634  2.207092325 6 2016 2 "东南亚"  16 "东帝汶"      
              . 30.60339812        37.5 43.15819168  6.640061263 5.20931e+11 5 36.19489591 27.87056732 8237.342158  50.7527626  1.518095558 6 2000 5 "西亚"    46 "土耳其"      
              . 37.36404092 19.39999962 28.80459213            .           . . 17.19395932 8.332414627           . 49.43376595 -1.638838749 . 2016 5 "西亚"    32 "叙利亚"      
              . 41.30839983 19.29999924 34.59195328  13.93643017 1.69731e+11 6 24.53475468 14.29857922 5178.422294 49.43559234   3.25442375 . 2012 5 "西亚"    30 "伊拉克"      
              . 30.17651345 33.09999847 43.84670258          9.9 14448045760 4 83.56604073 43.75944901 1781.246395 51.04925671   .774765939 7 2001 5 "西亚"    45 "阿塞拜疆"    
              .  48.5695855          43 48.34260559            .           . 6  16.7685324 17.11361313           . 48.50645974  3.494658738 6 2000 5 "西亚"    29 "阿富汗"      
              . 19.53345965 34.90000153  39.1884346  9.549175476 1.58822e+11 6  68.3398714 38.47191238 38117.41053 50.30328063  1.251916673 4 2004 2 "东南亚"  14 "新加坡"      
    29.75400925 33.90144299        38.5 42.75185776   7.63226759 1.99591e+11 6 63.83260396 33.37248611 2129.499247 49.52359052  1.619573147 4 2010 2 "东南亚"   6 "菲律宾"      
              . 46.72946174 16.60000038 19.34935379  14.17410714 718751924.6 6 46.78698034  14.0117712 666.6777273 49.25359706  1.226006137 6 2008 2 "东南亚"  16 "东帝汶"      
    20.93221092 38.44764918 27.89999962 34.17612457  4.999999998           . 4 19.92903021  12.8299408           .  49.0482509  3.334750651 8 2006 5 "西亚"    32 "叙利亚"      
    25.04660988 32.93579742 43.09999847 44.13132858   .517675306 1.63363e+11 6 57.00631523 37.15282822 6893.280513 49.00911443  2.189718758 7 2001 2 "东南亚"  12 "马来西亚"    
    11.71901989 33.91610685 75.69999695  78.6882782   .086696959 10609615491 6 91.10463754 77.72267151 752.9779185  51.3194373  1.499446217 6 2009 2 "东南亚"   9 "柬埔寨"      
    46.91810989 26.29499426 22.39999962 29.01993942  9.349502765 29249087911 6  30.2060149 17.46617126 7157.550781 48.95087988   .715048671 6 2007 5 "西亚"    34 "黎巴嫩"      
              . 17.77454034 33.70000076 37.02825546  -.603388298 2.05155e+11 6 72.18639869 35.74271011 41133.29981 50.62561424  3.015949915 4 2009 2 "东南亚"  14 "新加坡"      
              .           .           .           .            .           . .           .           .           .           .            . . 2013 5 "西亚"   211 "巴勒斯坦"    
    25.93504906   36.851618        19.5 29.78403091            .           . 4 17.92652511 8.902561188           . 49.54765133  -.739404269 8 2011 5 "西亚"    32 "叙利亚"      
    5.445340157 37.06057025        56.5 48.94739532  5.293294718 67013463193 5 30.62907821 21.98221588 509.2934347 48.97092327  1.958193767 7 2000 3 "南亚"    19 "孟加拉国"    
              . 25.59676842 35.29999924 41.70191956    7.6682919 44825899741 5 48.07707745 29.74916267 2296.408798 50.83096744   .755923688 8 2006 3 "南亚"    22 "斯里兰卡"    
              . 38.79640303 48.70000076 46.89050293  10.72784061 825183060.9 7 81.08867276 46.44882965 1360.792252 48.40039578  2.809384438 6 2002 3 "南亚"    18 "不丹"        
    49.47153091 28.08857249 48.40000153 58.72792435  8.169051764 1.73805e+11 6 76.40547737 54.48500443 27636.34077 50.72053211  2.642331913 6 2000 6 "西亚"    35 "以色列"      
              . 25.47001196 43.40000153  50.7262001          9.3 91059947286 4 85.54165611 47.31745529 6107.709259 51.89042723   .336402206 7 2003 4 "中亚"    24 "哈萨克斯坦"  
    86.49107361 19.78222546 32.09999847 35.15907669  7.432433614 7.97327e+11 6 67.17162109 38.78481674 16734.84566  49.8269756   .577957277 6 2002 1 "东亚"     4 "韩国"        
    23.94791985 17.84821566 50.29999924 55.61853027  10.63614046 6.10062e+12 6 81.89096156 53.16585541 4560.512586 48.52880233   .482959689 6 2010 1 "东亚"     1 "中国"        
              . 21.05653111 42.90000153 42.54133224  2.539772469 24645054296 6 49.05079691 25.71962357 20797.00522 37.75765084  6.128062258 6 2009 5 "西亚"    37 "巴林"        
              .  26.3647743 33.40000153  43.7960701 -1.545408134 33742158886 5 48.39780532 30.83274078 1795.082135 50.22200532   .758307596 8 2001 3 "南亚"    22 "斯里兰卡"    
    13.90909004 35.41057114 35.40000153 44.67758942  3.999999997 21723230594 4 69.73084209 34.97423172 859.5821277 50.29309682  1.223831519 7 2002 4 "中亚"    27 "乌兹别克斯坦"
    35.39751816 27.24247644 36.70000076 41.44643784   5.29391284 2.68517e+11 6 58.72921652 33.07190323 9377.187567 48.41653613  1.842740419 7 2011 2 "东南亚"  12 "马来西亚"    
    52.74705124 19.00425632 45.90000153 47.34571838   .839959472  3.4397e+11 6 81.45523514 39.21286774   5093.5805 51.02760649   .476955829 6 2011 2 "东南亚"  11 "泰国"        
     43.9144783 19.46110963 23.29999924 35.67499542  7.200000003 10393595650 4 73.70339215 30.13440323 3606.480554 53.15940744   .220269188 8 2012 5 "西亚"    44 "亚美尼亚"    
              . 40.25711011 25.89999962 27.08283997 -9.779168417 18748089228 . 8.874673298 4.931006908   679.66736 49.47575622  2.451502043 . 2016 5 "西亚"    42 "也门"        
    45.57901001 23.70008649 23.10000038 28.18805504  2.804246836 39859470964 6  32.8983813 17.44843292 8107.444173 49.33945731  6.905296367 6 2012 5 "西亚"    34 "黎巴嫩"      
    13.44079971 29.95621306          42 40.91385269  6.061093054 1.46997e+11 5 39.34417197  22.9413414  922.161128 49.52542005  1.157188028 7 2014 3 "南亚"    19 "孟加拉国"    
    end
    Last edited by Chen Samulsion; 06 Feb 2018, 21:06.

  • #2
    Notes: -mundlak- is installed through ssc and it is a package written by Francisco Perales.
    For saving space, I just provide 100 observations by dataex, and that is obviously not sufficient for mundlak model analysis. In my real work, the mundlak command can give me regression output with warning message listed above, although in dataset I provided there, it will give no regression output because of insufficient observations.
    Last edited by Chen Samulsion; 06 Feb 2018, 21:04.

    Comment


    • #3
      When I try to run your program, I get a great many "The variable d31 does not vary sufficiently within groups and will not be used to create additional regressors.0% of the total variance in d31 is within groups." errors.

      I assume that it means what it says - _Isregion_2 doesn't vary within country.

      Comment


      • #4
        Dear Phil Bromiley, thank you for your reply. In mundlak estimator, it allows us to add time-invariant regressors, and the variable sregion is in nature of time-invariant. In fact, the mundlak regress output gives coefficient of sregion. So I don't know why it "will not be used to create additional regressors" while have its coefficient in estimation results.

        Comment


        • #5
          The Mundlak approach is to create additional regressors as the within-group averages of time-varying regressors. The within-group averages of time-invariant regressors are those time-invariant regressors themselves and can thus not be added to the model without creating perfect multicolinearity.
          https://www.kripfganz.de/stata/

          Comment


          • #6
            Thank you Sebastian Kripfganz. I think you made a great step forward in clarifying my confuse. And as in another user-written package -xthybrid- (SSC), the regression output gives two kinds of coefficients, (1) variable coefficient beginning with the prefix W__ which means within-cluster effects; (2) variable coefficient beginning with the prefix R__ which means 'standard' random effect coefficient. For the variable that does not vary sufficiently within clusters (i.e. time-invariant variable), the -xthybrid- command warns that it "will not be used to create additional regressors", and such variable will be given a coefficient beginning with the prefix R__ (compared with other "normal" (time-varying) variables' coefficient beginning with the prefix W__). In contrast, for the same variable, the -mundlak- command also warns that it "will not be used to create additional regressors", but gives its coefficient as same as "normal" variables. or put it correctly, in -mundlak- estimate, coefficients of time-varying variable and time-invariant variable seems not distinguished (I'm not sure about that). And most important, mundlak and xthybrid give coefficents that are different to some (maybe minor) degree.

            Code:
            xi: mundlak d65 $indepent $sregion i.year, full /*mundlak model*/
            xi: xthybrid d65 $indepent $sregion i.year, full cre test star clusterid(scountry) /*the option "cre" requests a correlated random effect model, i.e. mundlak*/
            Last edited by Chen Samulsion; 08 Feb 2018, 19:34.

            Comment

            Working...
            X