Announcement

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

  • LSDV and XTGLS: How are they different/same?

    Hello, I am posting to ask on several questions.

    Briefly, my data is T>N. I ran LSDV and XTGLS controlling for id dummy. The results are as follow.

    For LSDV:

    Code:
    . xi: regress cdi lnfer irrig temp rain fcy nfcy lngni cl alru lnexp i.id
    i.id              _Iid_1-8            (naturally coded; _Iid_1 omitted)
    
          Source |       SS           df       MS      Number of obs   =       264
    -------------+----------------------------------   F(17, 246)      =    146.68
           Model |  5.76527759        17  .339133976   Prob > F        =    0.0000
        Residual |  .568779897       246  .002312113   R-squared       =    0.9102
    -------------+----------------------------------   Adj R-squared   =    0.9040
           Total |  6.33405749       263  .024083869   Root MSE        =    .04808
    
    ------------------------------------------------------------------------------
             cdi | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
           lnfer |  -.0314733    .017407    -1.81   0.072    -.0657591    .0028124
           irrig |   .0021448   .0012271     1.75   0.082    -.0002722    .0045617
            temp |   .0031805   .0127533     0.25   0.803     -.021939    .0283001
            rain |  -.0000259   .0000137    -1.90   0.059    -.0000528    9.74e-07
             fcy |    .000762   .0004754     1.60   0.110    -.0001744    .0016984
            nfcy |   .0008506   .0003323     2.56   0.011      .000196    .0015052
           lngni |   .0109708   .0082119     1.34   0.183    -.0052037    .0271454
              cl |   .0020964   .0015982     1.31   0.191    -.0010516    .0052444
            alru |  -.2176545   .1597933    -1.36   0.174     -.532392     .097083
           lnexp |  -.3029439   .0433172    -6.99   0.000    -.3882639   -.2176239
          _Iid_2 |   .4248126   .0428037     9.92   0.000      .340504    .5091211
          _Iid_3 |   .1340014    .051711     2.59   0.010     .0321487    .2358542
          _Iid_4 |   .1689825   .0815408     2.07   0.039     .0083754    .3295896
          _Iid_5 |   .3077498    .062906     4.89   0.000     .1838468    .4316528
          _Iid_6 |   .3666829   .0586044     6.26   0.000     .2512525    .4821132
          _Iid_7 |   .2149445   .0421197     5.10   0.000     .1319834    .2979057
          _Iid_8 |   .1050272   .0856174     1.23   0.221    -.0636094    .2736639
           _cons |   .2814417   .3490769     0.81   0.421     -.406119    .9690024
    ------------------------------------------------------------------------------
    While, for XTGLS:

    Code:
    xtgls cdi lnfer irrig temp rain fcy nfcy lngni cl alru lnexp i.id
    
    Cross-sectional time-series FGLS regression
    
    Coefficients:  generalized least squares
    Panels:        homoskedastic
    Correlation:   no autocorrelation
    
    Estimated covariances      =         1          Number of obs     =        264
    Estimated autocorrelations =         0          Number of groups  =          8
    Estimated coefficients     =        18          Time periods      =         33
                                                    Wald chi2(17)     =    2675.96
    Log likelihood             =  435.9081          Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
             cdi | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
           lnfer |  -.0314733   .0168031    -1.87   0.061    -.0644068    .0014601
           irrig |   .0021448   .0011845     1.81   0.070    -.0001769    .0044664
            temp |   .0031805   .0123108     0.26   0.796    -.0209483    .0273093
            rain |  -.0000259   .0000132    -1.97   0.049    -.0000518   -8.67e-08
             fcy |    .000762   .0004589     1.66   0.097    -.0001375    .0016614
            nfcy |   .0008506   .0003208     2.65   0.008     .0002218    .0014794
           lngni |   .0109708    .007927     1.38   0.166    -.0045658    .0265074
              cl |   .0020964   .0015428     1.36   0.174    -.0009274    .0051202
            alru |  -.2176545   .1542496    -1.41   0.158    -.5199782    .0846692
           lnexp |  -.3029439   .0418144    -7.24   0.000    -.3848987   -.2209891
                 |
              id |
              2  |   .4248126   .0413188    10.28   0.000     .3438293    .5057959
              3  |   .1340014    .049917     2.68   0.007      .036166    .2318369
              4  |   .1689825   .0787119     2.15   0.032       .01471     .323255
              5  |   .3077498   .0607236     5.07   0.000     .1887338    .4267659
              6  |   .3666829   .0565712     6.48   0.000     .2558053    .4775604
              7  |   .2149445   .0406584     5.29   0.000     .1352555    .2946336
              8  |   .1050272   .0826471     1.27   0.204    -.0569581    .2670125
                 |
           _cons |   .2814417   .3369664     0.84   0.404    -.3790004    .9418838
    ------------------------------------------------------------------------------
    I figured that the coefficient results are almost the same. However, there are differences in their standard errors but not that much. My questions are:

    1. How can I explain the differences of these estimation of LSDV and XTGLS controlled for id dummy?
    2. I also ran -xtreg- with -fe- and got almost the same coefficient for the independent variable. However, there is no dummy for id. I need help for clearer understanding on interpretation of these result, and how this too same/different with stated in question no 1.

    Your help will be greatly appreciated.

    Best,
    Clara

  • #2
    Clara:
    1) different models (OLS; FGLS) produce different results, that in your case are not that different though;
    2) in your first regression you do not include -i.time- (that is accounted for by -xtgls-); in addition, -xi:- is redundant;
    3) -xtreg- is out of debate for T>N panel datasets.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your respond , really appreciate!

      2) Do you mean that with -xtgls- alone, it already incorporate both time and unit effect? I am still unclear whether -xtgls- command is a fixed effect or random effect estimation.
      Also, thank you for correcting me on the redundancy I did for xi.

      Best,
      Clara

      Comment


      • #4
        Clara:
        2) my mistake: -xtgls- does not include time effect by default, too: so I'd add it.
        Then I would check the joint significance of -i.time- in both your regressions via -testparm-;
        3) see xtreg re vs xtgls - Statalist as far as your last question about the (admittedly, a bit obscure) nature of -xtgls- is concerned.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X