[R-sig-Geo] question on the difference between spdep function spautolm() and glm() with autocovariate

Roger Bivand Roger.Bivand at nhh.no
Tue Feb 12 08:05:50 CET 2013


On Tue, 12 Feb 2013, Li, Han wrote:

> Dear list,
>
> I am currently working on spatial autoregression modeling for my 
> dissertation research. I want to use regression models to identify 
> socioeconomic/landscape variables (15 total, var1$bat_survey - 
> var15$bay_survey) that can affect the presence/absence of bats 
> (p/a$bat_survey). Since spatial autocorrelation exists in my P/A data, I 
> tried different spatial models.
>
> My question is:
>
> If I use the same way (same neighboring criteria, same weight style) to 
> define neighbors, and build model #1 spatial simultaneous autoregression 
> model (SAR) by function spautolm(), and model #2 glm() with 
> autocovariate generated by function autocov_dist(), should I expect the 
> same result, or not?

No, because obviously they are different models:

spautolm: y = Xb + u, u = lambda W u + e, e ~ N(0, sigma2 I)

glm+auto: y = rho W y + Xb + e

Interpreting the latter is subject to great difficulty (see ?impacts) 
because the DGP is:

(I - rho W) y = Xb + e,

y = (I - rho W)^{-1} (Xb + e)

so the b coefficients cannot be interpreted directly. In addition, the glm 
estimate of rho is biassed because it is not constrained to its feasible 
range (so that (I - rho W) can be inverted).

Using geo-additive models, ML in the spautolm case, or others, is easier 
to handle because the fitted coefficients don't interact. It is only in 
some settings that the observations interact with each other directly, 
more often the autocorrelation is in the residuals.

Hope this clarifies,

Roger

>
> I understood that if I use glm() with autocovariate it will include one 
> more variable (the autocovariate) in the result. I also learned that 
> glm() is more a predicting model and spautolm() is more an explanatory 
> model. But I am not sure whether the significant variables selected by 
> these two models will be same.
>
>
> ##r code example##
> model_1 <- spautolm (p/a ~ var1 + var2 + ... + var15, data = bat_survey, 
> listw = neighbor_regime1, family="SAR")
> ####
> autocov_model_2 <- autocov_dist (p/a$bat_survey, xy = coords, style = 
> "W", type = "one")
> model_2 <- glm (p/a ~ var1 + var2 + ... + var15 + autocov_model_2, 
> family = "binomial", data = bat_survey)
>
> Thanks in advance. Your insight will be deeply appreciated.
>
> Han
>
>
> Han Li
> Department of Biology
> Baylor University
> Waco, TX  76798-7388
> Phone: (254) 710-2151
> Fax: (254) 710-2969
> han_li at baylor.edu<mailto:han_li at baylor.edu>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list