Announcement

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

  • Lead operator F in Panel data regression - As Dependent variable.


    Hi Statalist,

    Can a lead operator be used along with the dependent variable in panel data regression?

    My study uses land use change analysis using historical panel data.

    I am looking to see if last year's change in arable and barren areas would result in the current year's area under non-agriculture as conversion from one category to another and its reporting does not happen together. How do I model this for a panel regression? I have used F(Lead operator) in the DV. Is that right?


    I would appreciate any help.

    Thanks beforehand

    Radhika


    Code:
     xtreg  F.shreofnonagrlarea shareofbarrenarea  shareofarablearea ,fe
    
    Fixed-effects (within) regression               Number of obs      =       540
    Group variable: disid                           Number of groups   =        27
    
    R-sq:  within  = 0.8961                         Obs per group: min =        20
           between = 0.1064                                        avg =      20.0
           overall = 0.1100                                        max =        20
    
                                                    F(2,511)           =   2203.73
    corr(u_i, Xb)  = -0.8376                        Prob > F           =    0.0000
    
    -----------------------------------------------------------------------------------
    F.                |
    shreofnonagrlarea |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
    shareofbarrenarea |  -1.312984   .0765696   -17.15   0.000    -1.463414   -1.162554
    shareofarablearea |  -.8670699   .0130697   -66.34   0.000    -.8927469    -.841393
                _cons |   .7183172   .0100656    71.36   0.000     .6985421    .7380923
    ------------------+----------------------------------------------------------------
              sigma_u |  .16110238
              sigma_e |  .00409206
                  rho |  .99935524   (fraction of variance due to u_i)
    -----------------------------------------------------------------------------------
    F test that all u_i=0:     F(26, 511) =  9189.29             Prob > F = 0.0000
    
    .
    .

  • #2
    Sure, but not sure why you wouldn't just use lags of the X's instead? It's more traditional, but you'll get the same results. I had one case where I had a lot more data on the DV than the X's, so f. was more useful to retain more data.

    Code:
    webuse nlswork , clear
    xtset idcode year
    
    xtreg f.ln_w age ttl_exp tenure , fe
    xtreg ln_w l.age l.ttl_exp l.tenure , fe

    Comment


    • #3
      Originally posted by George Ford View Post
      Sure, but not sure why you wouldn't just use lags of the X's instead? It's more traditional, but you'll get the same results. I had one case where I had a lot more data on the DV than the X's, so f. was more useful to retain more data.

      Code:
      webuse nlswork , clear
      xtset idcode year
      
      xtreg f.ln_w age ttl_exp tenure , fe
      xtreg ln_w l.age l.ttl_exp l.tenure , fe
      Thank you for your kind reply. It helps a lot. I have one more question: When we use lagged independent variables in the panel regression model, do we need to look for autocorrelation? I tried to use the xtserial command to check for this, but it will not accept the time-series lagged response variables, and I used it without lags as below. Is it correct? Do I need to check for any other post-regression tests?
      Please help with this. Thank you



      Code:
       xtreg  shreofnonagrlarea L. shareofbarrenarea L. shareofarablearea,fe
      
      Fixed-effects (within) regression               Number of obs      =       540
      Group variable: disid                           Number of groups   =        27
      
      R-sq:  within  = 0.8961                         Obs per group: min =        20
             between = 0.1064                                        avg =      20.0
             overall = 0.1100                                        max =        20
      
                                                      F(2,511)           =   2203.73
      corr(u_i, Xb)  = -0.8376                        Prob > F           =    0.0000
      
      -----------------------------------------------------------------------------------
      shreofnonagrlarea |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ------------------+----------------------------------------------------------------
      shareofbarrenarea |
                    L1. |  -1.312984   .0765696   -17.15   0.000    -1.463414   -1.162554
                        |
      shareofarablearea |
                    L1. |  -.8670699   .0130697   -66.34   0.000    -.8927469    -.841393
                        |
                  _cons |   .7183172   .0100656    71.36   0.000     .6985421    .7380923
      ------------------+----------------------------------------------------------------
                sigma_u |  .16110238
                sigma_e |  .00409206
                    rho |  .99935524   (fraction of variance due to u_i)
      -----------------------------------------------------------------------------------
      F test that all u_i=0:     F(26, 511) =  9189.29             Prob > F = 0.0000
      
      . xttest3
      
      Modified Wald test for groupwise heteroskedasticity
      in fixed effect regression model
      
      H0: sigma(i)^2 = sigma^2 for all i
      
      chi2 (27)  =    7.8e+05
      Prob>chi2 =      0.0000
      
      
      . xtserial  shreofnonagrlarea shareofbarrenarea shareofarablearea
      
      Wooldridge test for autocorrelation in panel data
      H0: no first order autocorrelation
          F(  1,      26) =    100.164
                 Prob > F =      0.0000
      
      . xi:xtreg  shreofnonagrlarea L. shareofbarrenarea L. shareofarablearea,re
      
      Random-effects GLS regression                   Number of obs      =       540
      Group variable: disid                           Number of groups   =        27
      
      R-sq:  within  = 0.8961                         Obs per group: min =        20
             between = 0.1065                                        avg =      20.0
             overall = 0.1100                                        max =        20
      
                                                      Wald chi2(2)       =   3950.22
      corr(u_i, X)   = 0 (assumed)                    Prob > chi2        =    0.0000
      
      -----------------------------------------------------------------------------------
      shreofnonagrlarea |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ------------------+----------------------------------------------------------------
      shareofbarrenarea |
                    L1. |  -1.285381   .0799252   -16.08   0.000    -1.442032   -1.128731
                        |
      shareofarablearea |
                    L1. |  -.8533832   .0135878   -62.81   0.000    -.8800148   -.8267516
                        |
                  _cons |    .708109   .0211089    33.55   0.000     .6667363    .7494818
      ------------------+----------------------------------------------------------------
                sigma_u |  .09073038
                sigma_e |  .00409206
                    rho |     .99797   (fraction of variance due to u_i)
      -----------------------------------------------------------------------------------
      
      . xtoverid
      
      Test of overidentifying restrictions: fixed vs random effects
      Cross-section time-series model: xtreg re   
      Sargan-Hansen statistic  56.843  Chi-sq(2)    P-value = 0.0000
      
      . xtreg  shreofnonagrlarea L. shareofbarrenarea L. shareofarablearea,fe robust
      
      Fixed-effects (within) regression               Number of obs      =       540
      Group variable: disid                           Number of groups   =        27
      
      R-sq:  within  = 0.8961                         Obs per group: min =        20
             between = 0.1064                                        avg =      20.0
             overall = 0.1100                                        max =        20
      
                                                      F(2,26)            =   2268.60
      corr(u_i, Xb)  = -0.8376                        Prob > F           =    0.0000
      
                                            (Std. Err. adjusted for 27 clusters in disid)
      -----------------------------------------------------------------------------------
                        |               Robust
      shreofnonagrlarea |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      ------------------+----------------------------------------------------------------
      shareofbarrenarea |
                    L1. |  -1.312984    .164084    -8.00   0.000    -1.650264   -.9757047
                        |
      shareofarablearea |
                    L1. |  -.8670699   .0129038   -67.19   0.000    -.8935941   -.8405457
                        |
                  _cons |   .7183172   .0119108    60.31   0.000     .6938343    .7428002
      ------------------+----------------------------------------------------------------
                sigma_u |  .16110238
                sigma_e |  .00409206
                    rho |  .99935524   (fraction of variance due to u_i)
      -----------------------------------------------------------------------------------
      
      .


      Comment


      • #4
        use clustered standard errors.

        Comment

        Working...
        X