Announcement

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

  • Need help interpreting spatial panel model results (spxtregress)

    I'm using Sp to estimate models with a spatial lag of the dependent variable (DV) and a spatial lag in the errors. My data consist of 254 observations for 3 years.

    I first use spregress to estimate cross sectional models for each year. The results are in line with what I expected: for all years, I get a positive and significant coefficient for the spatial lag of the DV (dv in the table) and a small, borderline positive coefficient for the error lag (e.dv in the table).

    I then use spxtregress to estimate a panel model. I assume random effects and include a year fixed effect. The results baffle me: the DV spatial lag remains similar to the annual models, as do all other independent variables, but the error lag becomes negative (!) and significant, practically as large as the DV lag.

    Code:
    ------------------------------------------------------------------
                              2019       2020       2021       Panel  
    ------------------------------------------------------------------
    iv1                      0.263 **   0.276 **   0.333 **   0.215 **
                           (0.078)    (0.074)    (0.079)    (0.066)   
    iv2                      0.071 **   0.070 **   0.079 **   0.079 **
                           (0.019)    (0.019)    (0.021)    (0.016)   
    iv3                      0.028 **   0.029 *    0.034 **   0.022 **
                           (0.010)    (0.012)    (0.013)    (0.008)   
    iv4                      0.071 **   0.079 **   0.085 **   0.066 **
                           (0.017)    (0.016)    (0.019)    (0.013)   
    iv5                      0.038 *    0.037 *    0.039 *    0.036 *
                           (0.017)    (0.018)    (0.018)    (0.014)   
    iv6                     -0.307 **  -0.319 **  -0.423 **  -0.253 **
                           (0.083)    (0.080)    (0.086)    (0.071)   
    year                                                              
      2020                                                    0.032 **
                                                            (0.008)   
      2021                                                    0.026 **
                                                            (0.009)   
    Intercept                3.841 **   3.849 **   4.362 **   3.333 **
                           (0.700)    (0.645)    (0.678)    (0.508)   
    dv                       0.435 **   0.434 **   0.454 **   0.488 **
                           (0.065)    (0.062)    (0.061)    (0.042)   
    e.dv                    -0.018      0.120      0.007     -0.444 **
                           (0.168)    (0.158)    (0.157)    (0.111)   
    var(e.dv)                0.039      0.034      0.041              
                           (0.004)    (0.003)    (0.004)              
    Intercept                                                 0.168   
                                                            (0.008)   
    Intercept                                                 0.100   
                                                            (0.003)   
    Number of observations     254        254        254        762   
    ------------------------------------------------------------------
    ** p<.01, * p<.05
    For the life of me I cannot comprehend how the panel data model is picking up negative error autocorrelation. The annual models don't have it. Tests like Moran's I on the model residuals show significant positive correlation, not negative. How am I getting -0.444? Is it because e.dv is not actually the error autoregressive parameter and instead some other parameter spxtregress uses for estimation?

    Any help or insight would be immensely appreciated. Below is the code used to generate the table. If needed, I could also provide the data used.

    Code:
    . use dbhelp, clear
    
    . xtset _ID year
    
    Panel variable: _ID (strongly balanced)
     Time variable: year, 2019 to 2021
             Delta: 1 year
    
    .
    . **# Weight matrix W
    . spmatrix create idist W_ if year == 2019, vtrunc(1/50000) norm(none) replace
    
    . spmatrix matafromsp MW id = W_
    
    . mata: MW = MW:^2
    
    . spmatrix spfrommata W = MW id, replace norm(row)
    
    .
    . **# Regressions
    . quietly spregress dv iv* if year == 2019, ml dvarlag(W) errorlag(W)
    
    . estimates store m19
    
    . quietly spregress dv iv* if year == 2020, ml dvarlag(W) errorlag(W)
    
    . estimates store m20
    
    . quietly spregress dv iv* if year == 2021, ml dvarlag(W) errorlag(W)
    
    . estimates store m21
    
    . quietly spxtregress dv iv* i.year, re dvarlag(W) errorlag(W)
    
    . estimates store mp
    
    .
    . **# Table
    . quietly: etable, estimates(m19 m20 m21 mp) column(title) showstars showstarsnote
    
    . collect label levels etable_title 1 "2019" 2 "2020" 3 "2021" 4 "Panel", modify
    
    . etable, replay
Working...
X