Spatial Durbin Model (.lagsarlm codes): I cannot run a summary of impacts with z-values and p-values of regressors

956 Views Asked by At

I have not much time left to run my spatial regression model, thus I would be thankful for help.

I do not know how to run impacts function for spatial durbin model (.lagsarlm) so that I can see the p-values of total effects of regressors.

I am using Queen contiguity matrix (the .gal file) I run exactly the same code below for Spatial Error Durbin Model or Spatially Lagged X Model and it worked fine. But for spatial Durbin model using .lagsarlm function it does not work

# The model:
regSDM.5=lagsarlm(reg.eq5,data=spat.data,listw1,type="mixed")

# Impacts, not working:
impacts (regSDM.5, listw=listw1)
summary(impacts(regSDM.5,listw=listw.wts,R=500),zstats=TRUE)

What I get is just an error:

> summary(impacts(regSDM.5,listw=listw1,R=500),zstats=TRUE)



Error in eigen(Sigma, symmetric = TRUE) : 
infinite or missing values in 'x'
In addition: Warning message:
Method impacts.sarlm moved to the spatialreg package

I need to get results like this (here SLX example is shown), the p-values of total effect at the very bottom of this result are most important.

> summary(impacts(regSLX.5,listw=listw1,R=500),zstats=TRUE)
Impact measures (SLX, estimable, n-k):
                   Direct      Indirect         Total
ROI_Act    -0.79420742945  1.0099291341  0.2157217047
Home_Aff   -0.00731795312 -0.0588033114 -0.0661212645
Emmissions -0.01044269992 -0.0280940042 -0.0385367041
Pop_Dens   -0.00002670612 -0.0001296893 -0.0001563955
lnEl_Cons  -0.67494998732 -0.3364665653 -1.0114165526
lnDisp_Y   -1.28264355334 -0.3288232887 -1.6114668421
Own_Occ    -0.00564662179 -0.0495448745 -0.0551914962
Detached    0.01517019074  0.0123018795  0.0274720702
========================================================
Standard errors:
                 Direct      Indirect         Total
ROI_Act    0.1669871799 0.18392867854 0.08612939462
Home_Aff   0.0206790208 0.04270741415 0.04326666551
Emmissions 0.0043738633 0.00817558337 0.00888052007
Pop_Dens   0.0000358991 0.00005264358 0.00004279778
lnEl_Cons  0.4147250666 0.66547133438 0.59146099150
lnDisp_Y   0.3609449462 0.56077965701 0.54018324532
Own_Occ    0.0064277564 0.01138136501 0.01089799081
Detached   0.0089160665 0.01223168037 0.00945775531
========================================================
Z-values:
               Direct   Indirect     Total
ROI_Act    -4.7560982  5.4908736  2.504623
Home_Aff   -0.3538830 -1.3768877 -1.528226
Emmissions -2.3875232 -3.4363302 -4.339465
Pop_Dens   -0.7439218 -2.4635356 -3.654289
lnEl_Cons  -1.6274637 -0.5056064 -1.710031
lnDisp_Y   -3.5535712 -0.5863681 -2.983186
Own_Occ    -0.8784748 -4.3531575 -5.064374
Detached    1.7014443  1.0057391  2.904714

p-values:
           Direct       Indirect       Total        
ROI_Act    0.0000019737 0.000000039995 0.0122582    
Home_Aff   0.72342660   0.16854698     0.1264563    
Emmissions 0.01696233   0.00058965     0.00001428302
Pop_Dens   0.45692378   0.01375743     0.0002579    
lnEl_Cons  0.10363865   0.61313299     0.0872602    
lnDisp_Y   0.00038004   0.55762819     0.0028527    
Own_Occ    0.37968613   0.000013419067 0.00000040975
Detached   0.08885959   0.31454108     0.0036759  

I found that certain power traces would be needed to run it (the 'tr') but I don't know exactly if it applies to Queen type matrix.

Sorry for a lot of details and thank you for help in advance!

0

There are 0 best solutions below