How to evaluate the spatial autoregressive model in R?

I am trying to evaluate some spatial models in R using data from an article on spatial econometric models using data from the time series of cross sections Franzese and Hays (2007) . I focus on their results, shown in table 4 (see below). Using lm , I can replicate their results for OLS, S-OLS, and S-2SLS models. However, trying to evaluate the S-ML model (spatial maximum likelihood), I ran into difficulties.

Table 4 from Franzese & Hays (2007)

If I use the GLM model, there are some slight differences for some explanatory variables, but there is a fairly large margin regarding the estimated coefficient for spatial lag (the result is shown below). I am not quite sure why GLM is not the correct evaluation method in this case. Using GLS, I get results similar to GLM (possibly).

 require(MASS) m4<-glm(lnlmtue~lnlmtue_1+SpatLag+DENSITY+DEIND+lngdp_pc+UR+TRADE+FDI+LLVOTE+LEFTC+TCDEMC+GOVCON+OLDAGE+factor(cc)+factor(year),family=gaussian,data=fh) summary(m4) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.199091355 3.924227850 1.835 0.068684 . lnlmtue_1 0.435487985 0.080844033 5.387 0.000000293 *** SpatLag -0.437680018 0.101078950 -4.330 0.000028105 *** DENSITY 0.007633016 0.010268468 0.743 0.458510 DEIND 0.040270153 0.032304496 1.247 0.214618 

I tried using the splm package, but this leads to even greater consistency (the output is shown below). Moreover, I cannot include fixed effects in the model.

 require(splm) m4a<-spml(lnlmtue~lnlmtue_1+DENSITY+DEIND+lngdp_pc+UR+TRADE+FDI+LLVOTE+LEFTC+ TCDEMC+GOVCON+OLDAGE,data=fh,index=c("cc","year"),listw=mat2listw(wmat), model="pooling",spatial.error="none",lag=T) summary(m4a) Coefficients: Estimate Std. Error t-value Pr(>|t|) (Intercept) 1.79439070 0.78042284 2.2993 0.02149 * lnlmtue_1 0.75795987 0.04828145 15.6988 < 2e-16 *** DENSITY -0.00026038 0.00203002 -0.1283 0.89794 DEIND -0.00489516 0.01414457 -0.3461 0.72928 

So basically, my question is how to correctly evaluate the SAR model with the data of the time series of the cross section in R ?

R-code

Replication data

Displacement matrix

+6
source share
1 answer

How important is using R?

I suggest you explore the possibilities of Geoda, a free spatial analysis package available at Arizona State University.

Although I only used it to run basic spatial OLS (not 2SLS), I was pleased with the flexibility and visualization of Geoda. I recommend that you review the documentation and consider downloading the latest version.

If you must use R, I suggest exploring the GeoXp package ( http://cran.r-project.org/web/packages/GeoXp/index.html ).

0
source

All Articles