Announcement

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

  • #16
    Hi JanDitzen,

    Thank you very much for your response. Could you please suggest me which estimator and command that might be suitable for my panel data while addressing the issues?

    Many thanks,
    Abdul

    Comment


    • #17
      I would use standard panel estimator such as fixed effects and IV+fixed effects. Do not use the mean group estimator, it is not possible to estimate the unit specific equations.

      Given the short time dimension, tests for/estimation of strong cross-section dependence will be biased or over powered and hence I would not worry about it. Adding time fixed effects is a better solution.

      Comment


      • #18
        Dear JanDitzen,

        Thank you very much for your suggestion.

        I have previously used 2SLS FE by including the IV with fixed effects into the model to address endogeneity issue using the following command:

        My endogenous variable is lnpax and my instrumental variables are lnpop and lntrade.

        Code:
        . xtset routeid year
        
        Panel variable: routeid (strongly balanced)
         Time variable: year, 2012 to 2019
                 Delta: 1 unit
        
        . xtivreg lnfare (lnpax = lnpop lntrade) asam totalcarriers desigcarriers fscper lngdp countryfuel atii i.year, fe vce(robust)
        
        Fixed-effects (within) IV regression            Number of obs     =      5,032
        Group variable: routeid                         Number of groups  =        629
        
        R-squared:                                      Obs per group:
             Within  =      .                                         min =          8
             Between = 0.0121                                         avg =        8.0
             Overall = 0.0015                                         max =          8
        
        
                                                        Wald chi2(15)     =   33619.84
        corr(u_i, Xb) = -0.6653                         Prob > chi2       =     0.0000
        
                                       (Std. err. adjusted for 629 clusters in routeid)
        -------------------------------------------------------------------------------
                      |               Robust
               lnfare | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
        --------------+----------------------------------------------------------------
                lnpax |   .5087595    .322941     1.58   0.115    -.1241932    1.141712
                 asam |  -.0898262   .0396187    -2.27   0.023    -.1674775   -.0121749
        totalcarriers |  -.0583593    .031977    -1.83   0.068     -.121033    .0043143
        desigcarriers |  -.0613801   .0325806    -1.88   0.060     -.125237    .0024767
               fscper |   .0023645   .0011204     2.11   0.035     .0001686    .0045604
                lngdp |  -.2661736   .1708156    -1.56   0.119    -.6009659    .0686188
          countryfuel |  -.1371823   .0428347    -3.20   0.001    -.2211367   -.0532279
                 atii |  -.0119196   .0058801    -2.03   0.043    -.0234443   -.0003948
                      |
                 year |
                2013  |  -.1701968   .0547684    -3.11   0.002    -.2775408   -.0628527
                2014  |  -.2884796   .0704503    -4.09   0.000    -.4265597   -.1503994
                2015  |  -.5909791   .1349744    -4.38   0.000    -.8555241   -.3264342
                2016  |  -.6658244   .1440267    -4.62   0.000    -.9481116   -.3835373
                2017  |   -.631819   .1415059    -4.46   0.000    -.9091655   -.3544725
                2018  |  -.5676029   .1322243    -4.29   0.000    -.8267579    -.308448
                2019  |  -.6477493    .137719    -4.70   0.000    -.9176736    -.377825
                      |
                _cons |   3.165659   2.092094     1.51   0.130    -.9347709    7.266089
        --------------+----------------------------------------------------------------
              sigma_u |  .68559818
              sigma_e |  .24511511
                  rho |  .88666584   (fraction of variance due to u_i)
        -------------------------------------------------------------------------------
        Endogenous: lnpax
        Exogenous:  asam totalcarriers desigcarriers fscper lngdp countryfuel atii
                    2013.year 2014.year 2015.year 2016.year 2017.year 2018.year
                    2019.year lnpop lntrade
        
        .
        end of do-file
        As I assume that 2SLS FE cannot address the cross-sectional dependence issue, I try to combine the IV FE with DK Standard Errors using the following command:

        Code:
        . reg lnpax lnpop lntrade
        
              Source |       SS           df       MS      Number of obs   =     5,032
        -------------+----------------------------------   F(2, 5029)      =    398.67
               Model |  1028.50044         2  514.250218   Prob > F        =    0.0000
            Residual |  6487.01765     5,029  1.28992198   R-squared       =    0.1369
        -------------+----------------------------------   Adj R-squared   =    0.1365
               Total |  7515.51809     5,031   1.4938418   Root MSE        =    1.1357
        
        ------------------------------------------------------------------------------
               lnpax | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
               lnpop |   .2790867    .027533    10.14   0.000       .22511    .3330634
             lntrade |   .1553236   .0083099    18.69   0.000     .1390326    .1716145
               _cons |   5.081224   .4201694    12.09   0.000     4.257509    5.904939
        ------------------------------------------------------------------------------
        
        .
        end of do-file
        
        . predict lnpax_hat, xb
        
        .
        end of do-file
        
        
        . xtscc lnfare lnpax_hat asam totalcarriers desigcarriers fscper lngdp countryfuel atii i.year, fe lag(7)
        
        Regression with Driscoll-Kraay standard errors   Number of obs     =      5032
        Method: Fixed-effects regression                 Number of groups  =       629
        Group variable (i): routeid                      F( 15,     7)     =   1748.71
        maximum lag: 7                                   Prob > F          =    0.0000
                                                         within R-squared  =    0.3672
        
        -------------------------------------------------------------------------------
                      |             Drisc/Kraay
               lnfare | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        --------------+----------------------------------------------------------------
            lnpax_hat |   .3029089   .0770061     3.93   0.006     .1208183    .4849995
                 asam |  -.0466783   .0067542    -6.91   0.000    -.0626496   -.0307071
        totalcarriers |  -.0113627    .004257    -2.67   0.032    -.0214288   -.0012966
        desigcarriers |  -.0193062   .0026888    -7.18   0.000    -.0256642   -.0129482
               fscper |   .0007941   .0002361     3.36   0.012     .0002357    .0013524
                lngdp |  -.0804757   .0450378    -1.79   0.117    -.1869733    .0260219
          countryfuel |  -.0989573    .017999    -5.50   0.001    -.1415182   -.0563963
                 atii |  -.0074234   .0036861    -2.01   0.084    -.0161396    .0012928
                      |
                 year |
                2012  |          0  (empty)
                2013  |  -.0847815   .0019525   -43.42   0.000    -.0893983   -.0801646
                2014  |   -.180373   .0050292   -35.86   0.000    -.1922653   -.1684808
                2015  |  -.3930609     .02954   -13.31   0.000    -.4629118   -.3232099
                2016  |  -.4575731    .036477   -12.54   0.000    -.5438275   -.3713186
                2017  |  -.4227544   .0308447   -13.71   0.000    -.4956905   -.3498183
                2018  |  -.3692728    .021621   -17.08   0.000    -.4203982   -.3181473
                2019  |  -.4439532    .024419   -18.18   0.000     -.501695   -.3862113
                      |
                _cons |   3.213833   .7129194     4.51   0.003     1.528046    4.899619
        -------------------------------------------------------------------------------
        .
        end of do-file
        I am not confident at all with the solution that I have used in combining 2SLS FE with DK standard errors. As per your suggestion that "the short time dimension, tests for/estimation of strong cross-section dependence will be biased or over powered," please kindly advice:

        1. Should I just ignore the potential of cross-sectional dependence issue in my model given that my panel data has large N and small T?
        2. Is my first model -xtivreg lnfare (lnpax = lnpop lntrade) asam totalcarriers desigcarriers fscper lngdp countryfuel atii i.year, fe vce(robust)- already correct and robust to be applied by focusing only on endogeneity, heteroskedasticity, and autocorrelation issues?

        Thank you very much for your helpful advice. I really appreciate it.

        Best regards,
        Abdul
        Last edited by Abdul Sazali; 28 Jan 2025, 02:49.

        Comment


        • #19
          I am also not confident with my 2SLS FE model as the R-squared is very small.

          Thanks,
          Abdul

          Comment


          • #20
            To the best of my knowledge, there is no theory on IV + DK SE, so I would be very careful with it. Also note that your first stage is missing any FE and the other exogenous variables.

            On your questions:
            1) Correct. Strong CSD in the Pesaran (2006) context/interactive fixed effects will be impossible to accommodate. Hence I would add the time fixed effects.
            2) I am not an expert in this, but I think robust accounts for heteroskedasticity, not for autocorrelation. Instead of xtivreg I would use xtivreg2 which is based in ivreg2 and has some variance estimator for the presence of autocorrelation.

            Comment


            • #21
              Dear Jan,

              Thank you very much your answers and explanation. They are very helpful.

              Best,
              Abdul

              Comment


              • #22
                Hi JanDitzen,

                I have tried running the model using -xtivreg2- to address the issues on endogeneity and heteroskedasticity in the presence of autocorrelation. I prefixed the code with -xi:- following the advice in this post using the following command:

                Code:
                 . xi: xtivreg2 lnpax (lnfare = lncountryfuel atii) totalcarriers desigcarriers lnpop lngdp lntrade visa ttci i.year, fe cluster(routeid)
                i.year            _Iyear_2012-2019    (naturally coded; _Iyear_2012 omitted)
                
                FIXED EFFECTS ESTIMATION
                ------------------------
                Number of groups =       629                    Obs per group: min =         8
                                                                               avg =       8.0
                                                                               max =         8
                
                IV (2SLS) estimation
                --------------------
                
                Estimates efficient for homoskedasticity only
                Statistics robust to heteroskedasticity and clustering on routeid
                
                Number of clusters (routeid) =     629                Number of obs =     5032
                                                                      F( 15,   628) =    29.53
                                                                      Prob > F      =   0.0000
                Total (centered) SS     =  730.4952556                Centered R2   =   0.1046
                Total (uncentered) SS   =  730.4952556                Uncentered R2 =   0.1046
                Residual SS             =  654.0980561                Root MSE      =    .3854
                
                -------------------------------------------------------------------------------
                              |               Robust
                        lnpax | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
                --------------+----------------------------------------------------------------
                       lnfare |  -1.217123   .9949571    -1.22   0.221    -3.167203    .7329569
                totalcarriers |   .0934962   .0212316     4.40   0.000      .051883    .1351093
                desigcarriers |   .0565155    .035087     1.61   0.107    -.0122538    .1252848
                        lnpop |   1.391638   .8241165     1.69   0.091    -.2236003    3.006877
                        lngdp |   .1782343   .1908032     0.93   0.350    -.1957331    .5522017
                      lntrade |   .1357787   .0618093     2.20   0.028     .0146347    .2569226
                     visafree |   .1968128   .1221559     1.61   0.107    -.0426084     .436234
                         ttci |  -.0890813   .1397518    -0.64   0.524    -.3629897    .1848272
                  _Iyear_2013 |   .0434494    .093443     0.46   0.642    -.1396955    .2265943
                  _Iyear_2014 |  -.0530545   .1617121    -0.33   0.743    -.3700043    .2638953
                  _Iyear_2015 |  -.0928531   .2440553    -0.38   0.704    -.5711927    .3854864
                  _Iyear_2016 |  -.1418022   .3160252    -0.45   0.654    -.7612003    .4775958
                  _Iyear_2017 |  -.1281309    .332412    -0.39   0.700    -.7796465    .5233846
                  _Iyear_2018 |  -.1143521   .3646413    -0.31   0.754    -.8290358    .6003316
                  _Iyear_2019 |  -.2141635   .4398561    -0.49   0.626    -1.076266    .6479386
                -------------------------------------------------------------------------------
                Underidentification test (Kleibergen-Paap rk LM statistic):              4.554
                                                                   Chi-sq(2) P-val =    0.1026
                ------------------------------------------------------------------------------
                Weak identification test (Cragg-Donald Wald F statistic):                3.101
                                         (Kleibergen-Paap rk Wald F statistic):          2.276
                Stock-Yogo weak ID test critical values: 10% maximal IV size             19.93
                                                         15% maximal IV size             11.59
                                                         20% maximal IV size              8.75
                                                         25% maximal IV size              7.25
                Source: Stock-Yogo (2005).  Reproduced by permission.
                NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
                ------------------------------------------------------------------------------
                Hansen J statistic (overidentification test of all instruments):         0.184
                                                                   Chi-sq(1) P-val =    0.6677
                ------------------------------------------------------------------------------
                Instrumented:         lnfare
                Included instruments: totalcarriers desigcarriers lnpop lngdp lntrade visafree
                                      ttci _Iyear_2013 _Iyear_2014 _Iyear_2015 _Iyear_2016
                                      _Iyear_2017 _Iyear_2018 _Iyear_2019
                Excluded instruments: lncountryfuel atii
                ------------------------------------------------------------------------------
                Could you please help me check whether the steps that I have taken are already correct or not as most of the variables are not statistically significant and the R-squared is still small?

                Many thanks,
                Abdul

                Comment

                Working...
                X