Announcement

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

  • Omitted results in fixed effect model

    Hello, Currently I'm doing my Master thesis about firms credit rating (dependent var) & Employer Sponsored Insurance spending (independent var) in US state level to investigate how employees insurance would affect firms credit rating which I'm very new to Stata and Econometric field. I would like to ask something regarding my data regression since I've been struggling with it for several days. First of all, when I tried to run fixed effect regression the results appeared "omitted" in all variables (I've declared panel data set and everything as the instruction. This also happened when I tried to run random effect.

    Here is my code
    Code:
     gen CompanyID_n year
    then
    Code:
     xtreg SPcreditratingno TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq income fulltimeemp Parttimeemp, fe
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte SPcreditratingno double(TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq income) long(fulltimeemp Parttimeemp)
     9 3071.51                   0  .015651909634282115                   0                     0        0                   0                     0                    0 165.89045736871824      0      0
     9    3332   .7514256018427484     -.28393085787452                   0                     0        0                   0                     0    .2504951375850396 168.75486381322958      0      0
     9    3854   .7879775410024461    .6415646898859952                   0                     0        0                   0                     0                    0 169.22228260869565    296      0
     9    3830  1.2096575702028418    .5018380590096857                   0                     0        0                   0                     0                    0 171.41079936474324    296      0
     9    4623  1.1656937604081778    .5095281449157062                   0                     0        0                   0                     0                    0  170.3732718894009    289      0
     9    4712  1.2272072675893053    1.067427347586869                   0                     0        0                   0                     0                    0 174.97668650793653    299      0
     9       0                   0                    0                   0                     0        0                   0                     0                    0 175.46083282692362      0      0
     9    4733                   0                    0                   0                     0        0                   0                     0                    0  167.8806147615221      0      0
     9    4955                   0                    0                   0                     0        0                   0                     0                    0 169.82105650773528      0      0
     9    5653                   0                    0                   0                     0        0                   0                     0                    0 168.93733719778405      0      0
     9    5603                   0                    0                   0                     0        0                   0                     0                    0  177.4925646508609      0      0
     9    5583                   0                    0                   0                     0        0                   0                     0                    0 175.93360453670394      0      0
     9    5934   1.023694939153358 -.013380505284165723  .05499880696731091   -.39651932712956334  4.44402                   0                     0                    0 176.42869714153258      0      0
     9    6145  1.2491876661137866  -.12089417388009747  .12280350711245318   -.46976752646705716   1.8058                   0 -.0004860721630211254                    0  181.7704109218708      0      0
     9    6288  1.2061221712178765   .17133356667833377  .08924807638589097    -.2084867569008863  3.16319                   0 -.0034480809451133345                    0 190.77154803241962    231      0
     9   11031   .7656480247000211   .35696922098807043  .09099235753366901   -.08269323033530897  4.50271   665.7050021716332  -.007951607395482707    .3655671694269787 193.51435583128827    286      0
     9   11732   .7157508404864725   1.3600568417313028  .11236776927489317   -.12318634360645823  4.25314   573.3307402242662  -.011189943336031617                    0 197.76517624020886    289      0
     9   11270   .6529641077621642    1.881975841824685  .06176084610823264   -.09329451448902022  6.13929    2016.04465566223  -.006528665048944354                    0  203.8620986272784    520      0
     9   12544    .671763878687996   3.5909248354693477  .05785769814131245   -.05035514888217026  8.11724   435.9753070567254     .1522654990392473                    0 208.10108856788588    466      0
     9   11764    .679692933560999    4.048787721509601  .04657202849284943  -.033884402661921297  7.34087   992.0773840865075   .026658023178821075                    0 215.85944955971735    408      0
     9   12606   .7156127402087905   1.5491707317073162  .03768867996379301   -.04998669856549144  8.16729   768.2551826559018   .011477434857309957                    0  221.9197697162047    426      0
     9 3071.51                   0                    0    .542052129953597     .1170546260701997   .68847                   0                     0                    0 165.89045736871824      0      0
     9    3332                   0                    0   .4871314981329413    .14285027253326926   .81106                   0                     0                    0 168.75486381322958      0      0
     9    3854 .049738931529528164                    0   .5300502967918296    .13777024986367217   .92059                   0                     0                    0 169.22228260869565      0      0
     9    3830   .6016699177353566    7.297193071184706   .5440819109683757    .14465555778183503   .82014                   0                     0                    0 171.41079936474324   3400      0
     9    4623   .5210963684737915    6.200444328897917                   0                     0        0                   0                     0                    0  170.3732718894009   3600      0
     9    4712   .5801722884776604     6.58575946625077                   0                     0        0                   0                     0                    0 174.97668650793653   3300      0
     9       0   .5837287590725304    7.793999083829594                   0                     0        0                   0                     0                    0 175.46083282692362   2800      0
     9    4733   .6439922762343351    7.606091265208707                   0                     0        0                   0                     0                    0  167.8806147615221   2100      0
     9    4955   .6745976015185262    6.088769786862769    .977977616593915                     0 16.68823                   0                     0                    0 169.82105650773528   1900      0
     9    5653   .7732253499397165    8.698651593571242                   0                     0        0                   0                     0                    0 168.93733719778405   1940      0
     9    5603    .714614567933084     7.63435527502254                   0                     0        0                   0                     0                    0  177.4925646508609   1860      0
     9    5583   .7577542148857429    7.475476790851301                   0                     0        0                   0                     0                    0 175.93360453670394   1868      0
     9    5934   .7866880862231758     9.51391664287753                   0                     0        0                   0                     0                    0 176.42869714153258   1700      0
     9    6145   .8026942057783624   7.5851107541742815   .9090879291977382                     0   .19105                   0                     0                    0  181.7704109218708   1700      0
     9    6288   .7827677329082398   6.5795845219808315   .8356488163972288                     0  3.11168                   0                     0                    0 190.77154803241962   1600      0
     9   11031   .7514933455217647    7.669451361555143   .8829849951505239                     0  4.09009                   0                     0                    0 193.51435583128827   1600      0
     9   11732   .6392070350843461    8.264829210836279                   0                     0        0                   0                     0                    0 197.76517624020886   1500      0
     9   11270   .6779075497271039    6.359273588296224                   0                     0        0                   0                     0                    0  203.8620986272784   2400      0
     9   12544    .734008286795172    5.042863993507686                   0                     0        0                   0                     0                    0 208.10108856788588   2178     22
     9   11764   .6169082079513037   3.9339435609735496                   0                     0        0                   0                     0                    0 215.85944955971735   2079     21
     9   12606   .4673096745692829   -2.274595117234696                   0                     0        0                   0                     0                    0  221.9197697162047   2034     21
     8 3071.51                   0   .38448102116224475 .024277924963042714                     0        0   366.2775384421423     .3175738135810307                    0 165.89045736871824      0      0
     8    3332   .6228766459207608  -.11367851622874835 .025189325701069586                     0        0  330.35438536763036     .3131801486872321                    0 168.75486381322958      0      0
     8    3854   .6055915817477849  -.09677419354838497  .02354323083293507                     0        0    396.148996741229     .2908779387376004    .6407109552405541 169.22228260869565   1850      0
     8    3830  .23898900007977378   1.0461071231363932 .023609635905542933                     0        0   401.3027181912381     .2918313824555991   1.9488446671618722 171.41079936474324   2500      0
     8    4623   .3511950180461606  -3.4076544145509704  .02844900938349917                     0        0   413.2064762134213    .29706795468428243    .4788414600851919  170.3732718894009   5339      0
     8    4712    .274387209684135     -3.0699305415065 .026860513833268037                     0        0   362.5978189742254     .3209429614574389    .4301419267599415 174.97668650793653   5790      0
     8       0  .26661314095234595   2.4909168021488757 .026094008632364014                     0        0     315.87436609302     .3120437287988895   .25190860307136326 175.46083282692362   6410      0
     8    4733  .46480588339755496    3.424653973617519 .024033610368250365                     0        0   317.5263089183598      .310803998071106   .11482532879887587  167.8806147615221   5905      0
     8    4955   .6492541186145009    5.714663318575297 .022617479320993842                     0        0   266.9078284980984    .30461483818743496   .18481597949574294 169.82105650773528   4551      0
     8    5653     .57646039405046    2.237436141142923 .021305252271077726                     0        0  266.65098595020953    .30255183513346995   .35011289610753804 168.93733719778405   5430      0
     8    5603   .6144257331327847    .8071538068472118  .01844831369407111                     0        0  250.00555263014274     .3186373955148477   .16061971133824962  177.4925646508609   6356      0
     8    5583   .5686147407685397   1.3298161852470733  .01709020866767881                     0        0  220.82233397554467    .31903273391402076   .13329378271345094 175.93360453670394   6480      0
     8    5934   .5781135461253675     2.29397258974724   .0162124400291331                     0        0   289.6637879932742    .32136680344439894   .12492103497190243 176.42869714153258   6480      0
     8    6145   .5644270952098202   1.8095674840702822 .015865072842360762                     0        0  273.10063584191994    .31762140992167104   .12775883610108302  181.7704109218708   6850      0
     8    6288    .535346809755738    1.448710145606067  .01501652390278026                     0        0  256.20188074253366    .30396412602818296   .09551811541492392 190.77154803241962   6700      0
     8   11031   .5437803925227106    1.552955792525106 .013911278874371408                     0        0   339.6779707463126    .30959963092729514   .09900486395733545 193.51435583128827   7000      0
     8   11732  .43432417245075294    1.130972896757007 .014194986875546515                     0        0    331.020703077794    .25674827953141915    .1299410401891253 197.76517624020886   8250      0
     8   11270   .3968082425464274  -.27705096756608866 .013714309097582367                     0        0  305.34309079068333    .19470085250191577          .0849653975  203.8620986272784   8355      0
     8   12544  .44780485790200675   1.7124295461287418 .014783247113678392                     0        0   332.3627881937434    .20510882196973973   .10093951344430219 208.10108856788588   7347      0
     8   11764  .39970464794342975    3.000048536620883  .01168737064883628                     0        0   293.1207761065537    .19786344740671566   .11616278783308195 215.85944955971735   7200      0
     8   12606  .44020106639248524   1.6927274353699002 .010595466423150119                     0        0   311.6769803148699    .21231354755420728   .12526710189452125  221.9197697162047   7300      0
    10 3071.51                   0                    0  .46000681193902576   .014466794247587029   .73957                   0  -.006305591672583414                    0 165.89045736871824      0      0
    10    3332                   0                    0   .4555719940159097    .13994435458495036   .72098                   0    .05630408588016212                    0 168.75486381322958      0      0
    10    3854                   0                    0   .4541844390838751    .21190179508070142   .80834                   0    .09673362621147591                    0 169.22228260869565      0      0
    10    3830                   0                    0  .43059056156076986    .17520959662536248   .74107                   0    -1.214438274241777                    0 171.41079936474324      0      0
    10    4623                   0                    0   .4459302842507046    .09438783070681293   .72397                   0   -.02215011005233304                    0  170.3732718894009      0      0
    10    4712                   0                    0   .2847214786488209    .20153728489483747   .71961                   0  -.020650041796677787                    0 174.97668650793653      0      0
    10       0                   0                    0  .31407049910621776    .16686685360434225   .79469                   0    -40.45414847161572                    0 175.46083282692362      0      0
    10    4733                   0                    0  .33939790100591927     .2109918775949934    .1822                   0     .0294762873439432                    0  167.8806147615221      0      0
    10    4955                   0                    0  .26409429715483956    .14610655664377706   .80486  5.5005774609852605  -.012912940221080704                    0 169.82105650773528      0      0
    10    5653                   0                    0   .2691915196351896    .12082595503237382   .86479  15.036088500841378    .33527171675586664                    0 168.93733719778405      0      0
    10    5603  .16667189435879742   12.057048899056333   .2798331813233694    .07131719085586513   .84115  25.418825601810195  -.039191176470588236 .0071797463257635506  177.4925646508609      0      0
    10    5583  .18708942968050163    45.43658413340073  .21685646933829145    .04037650652412098   .52367   30.73137309540905    .06218851140718385  .008232670741348235 175.93360453670394      0      0
    10    5934   .2619929868634532   34.437306158617645 .033781934306569346     -.141297901459854   .88256  10.595415516231594    .29703839706234536   .01359369148872904 176.42869714153258   3200      0
    10    6145  .22949069447647355   27.177195198989264  .32720318241750834  -.003921854968595673  1.52117   60.37153571342652     .6618144986253798    .1499575509746834  181.7704109218708   3600      0
    10    6288  .38460323578854944   24.056982343499186  .07820056940498346   .012588094418547668  3.77268   69.51219100744507    .23340411384938764   .22139603268661248 190.77154803241962   4510      0
    10   11031  .36079161211439204    16.91581673951757  .10103355017289324   .010580980475974826  3.54653  234.39843402774494   -1.1268097744196712     .340424341388309 193.51435583128827   5292      0
    10   11732   .4869359698732717    8.102928485127437  .11644963794014358   .012400161606116171  2.81698   154.8646951075753   -.26917561822344094    .5421205431106089 197.76517624020886   6900      0
    10   11270   .5552621552779702    7.530152224824355 .057858482733171374 -.0018296995602570805  5.03425     60.253761851361   .013165112452002192   .25709289675001373  203.8620986272784   7700      0
    10   12544   .5646156042998547    5.827996014802162  .02542287627725163   .012000057485305318  2.69991  13.127539953774125      .345679012345679    .4404367622362334 208.10108856788588   8500      0
    10   11764   .5245420468208501   5.0206662044831845  .02269549956869627  .0017847050774859453   .04468   34.22037935803268    -.2517985611510791    .6141527156359688 215.85944955971735   8950      0
    10   12606   .5670057258580621   5.2113147798550665   .2216361280769943   .029428095502498614   .93561 -265.67996565223814   -.06939281288723667    .9372107326771331  221.9197697162047   9500      0
    10 3071.51                   0                    0                   0                     0        0                   0                     0                    0 165.89045736871824      0      0
    10    3332                   0                    0                   0                     0        0                   0                     0                    0 168.75486381322958      0      0
    10    3854                   0                    0                   0                     0        0                   0                     0                    0 169.22228260869565      0      0
    10    3830                   0  -3.3076115313304992                   0                     0        0                   0                     0                    0 171.41079936474324      0      0
    10    4623  .35696127668650984   -3.535585955753218                   0                     0        0                   0                     0                    0  170.3732718894009      0      0
    10    4712   .3426149327505829   -2.966658481560493                   0                     0        0                   0                     0                    0 174.97668650793653 160000  80000
    10       0   .5560443576926584   -.8974956857838997                   0                     0        0                   0                     0                    0 175.46083282692362 165200  85000
    10    4733   .5713874114675642   -.7699743504047168                   0                     0        0                   0                     0                    0  167.8806147615221 175200  85000
    10    4955   .5772969228267861   -.6235237009922885                   0                     0        0                   0                     0                    0 169.82105650773528 165200  90000
    10    5653   .5508010974460265   -.6368234439935708                   0                     0        0                   0                     0                    0 168.93733719778405 162200  92000
    10    5603   .6044892374180598   -.7782269776183172                   0                     0        0                   0                     0                    0  177.4925646508609 157200  93000
    10    5583   .5817155595205425   -.8250272826482343                   0                     0        0                   0                     0                    0 175.93360453670394      0      0
    10    5934   .5733789054091777   -.7144206918042961                   0                     0        0                   0                     0                    0 176.42869714153258 162200 110000
    10    6145   .5241236520620872   -.6300147048344592                   0                     0        0                   0                     0                    0  181.7704109218708 163500 106000
    10    6288   .5221347192923904   -1.189466954981641                   0                     0        0                   0                     0                    0 190.77154803241962 167500  98000
    10   11031   .5018756251138718    -1.64571212004239                   0                     0        0                   0                     0                    0 193.51435583128827 168000  98500
    end
    Here is my results:

    Code:
     
    Fixed-effects (within) regression               Number of obs     =     28,120
    Group variable: CompanyID_n                     Number of groups  =      1,340
    
    R-squared:                                      Obs per group:
         Within  =      .                                         min =          1
         Between =      .                                         avg =       21.0
         Overall =      .                                         max =         21
    
                                                    F(12,26768)       =          .
    corr(u_i, Xb) =      .                          Prob > F          =          .
    
    -----------------------------------------------------------------------------------
     SPcreditratingno | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    ------------------+----------------------------------------------------------------
          TotalMEPSIC |          0  (omitted)
             Leverage |          0  (omitted)
     Interestcoverage |          0  (omitted)
          Tangibility |          0  (omitted)
                  ROA |          0  (omitted)
           Quickratio |          0  (omitted)
    Markettobookratio |          0  (omitted)
     EffectiveTaxRate |          0  (omitted)
               Tobinq |          0  (omitted)
               income |          0  (omitted)
          fulltimeemp |          0  (omitted)
          Parttimeemp |          0  (omitted)
                _cons |   11.45704          .        .       .            .           .
    ------------------+----------------------------------------------------------------
              sigma_u |  3.5861831
              sigma_e |          0
                  rho |          1   (fraction of variance due to u_i)
    -----------------------------------------------------------------------------------
    F test that all u_i=0: F(1339, 26768) = .                    Prob > F =      .
    PS* for my S&P credit rating, I've categorized into number representing each credit rating and my TotalMEPSIC is the spending in each US state.

    Please help me figure out what happened and how I can solve it, Thank you! (I want to graduate master degreeT_T)

  • #2
    Pat:
    welcome to this forum.
    Your data excerpt does not allow to rpelicate the issue, as some variables are left unrfeported.
    That said, with the shared example, I can produce what follows:
    Code:
    . xtset SPcreditratingno
    
    Panel variable: SPcreditratingno (unbalanced)
    
    . xtreg SPcreditratingno TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq income fulltimeemp Parttimeemp, fe
    the panel variable SPcreditratingno may not be included as an independent variable
    r(198);
    
    . xtreg  TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq income fulltimeemp Parttimeemp, fe
    
    Fixed-effects (within) regression               Number of obs     =        100
    Group variable: SPcreditra~o                    Number of groups  =          3
    
    R-squared:                                      Obs per group:
         Within  = 0.8133                                         min =         21
         Between = 0.9802                                         avg =       33.3
         Overall = 0.8120                                         max =         42
    
                                                    F(11,86)          =      34.06
    corr(u_i, Xb) = -0.1689                         Prob > F          =     0.0000
    
    -----------------------------------------------------------------------------------
          TotalMEPSIC | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    ------------------+----------------------------------------------------------------
             Leverage |    631.025   685.4098     0.92   0.360    -731.5247    1993.575
     Interestcoverage |    7.50611   24.25948     0.31   0.758    -40.72015    55.73237
          Tangibility |  -177.3652   984.6625    -0.18   0.857     -2134.81    1780.079
                  ROA |   866.1115   2415.557     0.36   0.721    -3935.857     5668.08
           Quickratio |   64.46604   97.87063     0.66   0.512    -130.0943    259.0264
    Markettobookratio |    .493768    .789616     0.63   0.533    -1.075937    2.063473
     EffectiveTaxRate |   129.7359   40.62427     3.19   0.002      48.9775    210.4943
               Tobinq |  -149.0272   710.9634    -0.21   0.834    -1562.376    1264.321
               income |   182.5134   11.57404    15.77   0.000     159.5049    205.5218
          fulltimeemp |  -.0207143   .0284161    -0.73   0.468    -.0772036     .035775
          Parttimeemp |   .0323613   .0490141     0.66   0.511    -.0650755    .1297981
                _cons |  -27102.54   2035.621   -13.31   0.000    -31149.22   -23055.86
    ------------------+----------------------------------------------------------------
              sigma_u |  224.23319
              sigma_e |  1587.8127
                  rho |  .01955353   (fraction of variance due to u_i)
    -----------------------------------------------------------------------------------
    F test that all u_i=0: F(2, 86) = 0.40                       Prob > F = 0.6737
    
    .
    From your Stata table, it would seem that there's no variation in your data.

    In addition, you have a T>N dataset. Therefore, you should take a look at -xtgls- or -xtregar-.
    Last edited by Carlo Lazzaro; 14 May 2023, 03:39.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Carlo Lazzaro Thank you so much! I've tried it by using xtgls and this is what I got

      Code:
       xtgls SPcreditratingno TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq
      Code:
       
      Cross-sectional time-series FGLS regression
      
      Coefficients:  generalized least squares
      Panels:        homoskedastic
      Correlation:   no autocorrelation
      
      Estimated covariances      =         1          Number of obs     =     28,120
      Estimated autocorrelations =         0          Number of groups  =      1,340
      Estimated coefficients     =        10          Obs per group:
                                                                    min =          1
                                                                    avg =   20.98507
                                                                    max =         21
                                                      Wald chi2(9)      =      76.49
      Log likelihood             = -75773.42          Prob > chi2       =     0.0000
      
      -----------------------------------------------------------------------------------
       SPcreditratingno | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      ------------------+----------------------------------------------------------------
            TotalMEPSIC |   .0000227   4.93e-06     4.60   0.000      .000013    .0000323
               Leverage |    .000145   .0003341     0.43   0.664    -.0005097    .0007998
       Interestcoverage |  -.0000696   .0000227    -3.07   0.002     -.000114   -.0000251
            Tangibility |   .3328533   .0829869     4.01   0.000      .170202    .4955047
                    ROA |   .2884002   .0878274     3.28   0.001     .1162617    .4605387
             Quickratio |   .0001219   .0000466     2.62   0.009     .0000306    .0002133
      Markettobookratio |  -4.64e-08   1.25e-07    -0.37   0.711    -2.92e-07    1.99e-07
       EffectiveTaxRate |   .0001808   .0001143     1.58   0.114    -.0000433    .0004049
                 Tobinq |   2.27e-07   1.26e-07     1.79   0.073    -2.10e-08    4.74e-07
                  _cons |   11.20511   .0435757   257.14   0.000      11.1197    11.29052
      -----------------------------------------------------------------------------------
      I'm just wondering if the result of Log likehood is good or not since it shows -75773.42. Would you kindly please explain this part? Thank you!

      Comment


      • #4
        Pat:
        from the code run on your whole dataset, now it seems that N(=1,340)>T(=21).
        Therefore, you should use -xtreg,fe- and compare it against -xtreg,re- via -hausman-.
        That said, the Log likelihood reported before the -xtgls- outcome table shows that value that allows the MLE to converge (something that you should not care about).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo Lazzaro I've tried using xtreg,fe and xtreg, re again but it still show results being omitted in all variables like this.

          Code:
           xtreg SPcreditratingno TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq, fe
          
          Fixed-effects (within) regression               Number of obs     =     28,120
          Group variable: CompanyID_n                     Number of groups  =      1,340
          
          R-squared:                                      Obs per group:
               Within  =      .                                         min =          1
               Between =      .                                         avg =       21.0
               Overall =      .                                         max =         21
          
                                                          F(9,26771)        =          .
          corr(u_i, Xb) =      .                          Prob > F          =          .
          
          -----------------------------------------------------------------------------------
           SPcreditratingno | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
          ------------------+----------------------------------------------------------------
                TotalMEPSIC |          0  (omitted)
                   Leverage |          0  (omitted)
           Interestcoverage |          0  (omitted)
                Tangibility |          0  (omitted)
                        ROA |          0  (omitted)
                 Quickratio |          0  (omitted)
          Markettobookratio |          0  (omitted)
           EffectiveTaxRate |          0  (omitted)
                     Tobinq |          0  (omitted)
                      _cons |   11.45704          .        .       .            .           .
          ------------------+----------------------------------------------------------------
                    sigma_u |  3.5861831
                    sigma_e |          0
                        rho |          1   (fraction of variance due to u_i)
          -----------------------------------------------------------------------------------
          F test that all u_i=0: F(1339, 26771) = .                    Prob > F =
          Code:
           
          xtreg SPcreditratingno TotalMEPSIC Leverage Interestcoverage Tangibility ROA Quickratio Markettobookratio EffectiveTaxRate Tobinq, re
          
          Random-effects GLS regression                   Number of obs     =     28,120
          Group variable: CompanyID_n                     Number of groups  =      1,340
          
          R-squared:                                      Obs per group:
               Within  = 0.0000                                         min =          1
               Between = 0.0000                                         avg =       21.0
               Overall = 0.0000                                         max =         21
          
                                                          Wald chi2(0)      =          .
          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =          .
          
          -----------------------------------------------------------------------------------
           SPcreditratingno | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
          ------------------+----------------------------------------------------------------
                TotalMEPSIC |          0  (omitted)
                   Leverage |          0  (omitted)
           Interestcoverage |          0  (omitted)
                Tangibility |          0  (omitted)
                        ROA |          0  (omitted)
                 Quickratio |          0  (omitted)
          Markettobookratio |          0  (omitted)
           EffectiveTaxRate |          0  (omitted)
                     Tobinq |          0  (omitted)
                      _cons |          0  (omitted)
          ------------------+----------------------------------------------------------------
                    sigma_u |  3.5218498
                    sigma_e |          0
                        rho |          1   (fraction of variance due to u_i)
          so I'm not sure if I should just skip this part or not and just stick with xtgls.
          Thank you for your reply

          Comment


          • #6
            Pat:
            I cannot understand how you can get this outcome table.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Carlo Lazzaro I ran the xtgls first like I showed you then ran the xtreg, fe and xtreg,re again. It still came up with omitted in the results. I also tried deleting the variable one by one when I ran the xtreg, fe and xtreg, re the results still show omitted

              Comment


              • #8
                Pat:
                my guess is that you have 1 observation only for most of your panels. Therefore, -xtreg- cannot work.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Pat: Please show how you xtset your data. I wouldn't just ignore the fact that xtreg is giving you nothing. It could be a simple mistake or something more fundamental. I'd work it out before abandoning the usual panel data staples. xtgls is set up for when T is large and N is small, but, as Carlo pointed out, your dimensions don't support that.

                  In your extract, I don't see identifiers for i and t. Are they company and year identifiers? How did you xtset your data? Like this?

                  Code:
                  xtset companyID_n year


                  Comment


                  • #10
                    Jeff Wooldridge yes I set it companyID_n year then I ran xtreg, fe and xtreg,re and the results just came up like that.

                    Comment


                    • #11
                      I think I see the problem. It looks like your y variable has no variation across time. So any differences in y across unit are perfectly explained by the unobserved effect. There is no work to do for the other variables. If that's truly the data structure, you might as well collapse the data to a cross section and analyze it that way.

                      Comment


                      • #12
                        Jeff Wooldridge oh so in this case can I ignore running fixed and random effect and use xtgls directly?

                        Comment


                        • #13
                          You shouldn't be using any panel data estimators because, while you technically have panel data, it's not interesting to treat as a panel data set. Your y variable doesn't change over time, so how can using variation over time in other variables help to explain y? All information is in the cross-sectional variation, use the averages over time. Equivalently, use the "be" option in xtreg.

                          Comment

                          Working...
                          X