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

Li, Han Han_Li at baylor.edu
Wed Feb 13 19:42:00 CET 2013


This package looks very interesting, especially function splogit() and spprobit(). And I can see the model

Y ? = ?WY ? + X + u used in these functions may cause the problem to interpret the coefficient due to the interaction (the other person Mr. Roger Bivand explained that to me). Now I am very curious about the comparison of different models. I am wondering if it is possible to compare different models to see which one fits the data better. Thanks for your help.



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>









________________________________
From: Juan Tomas Sayago Gomez [juantomas.sayago at gmail.com]
Sent: Wednesday, February 13, 2013 8:10 AM
To: Li, Han
Subject: Re: [R-sig-Geo] question on the difference between spdep function spautolm() and glm() with autocovariate


http://cran.r-project.org/web/packages/McSpatial/McSpatial.pdf

On Tue, Feb 12, 2013 at 7:57 PM, Li, Han <Han_Li at baylor.edu<mailto:Han_Li at baylor.edu>> wrote:
Hey Juan,

I am trying to do a logit model with spatial autocorrelation. what is the exact name of the package you mentioned?
I know one called "spatial". But I cannot find one called "macspatial". Thanks.
Han


Han Li
Ph.D. Candidate
Department of Biology
Baylor University
Waco, TX  76798-7388
Phone: (254) 710-2151<tel:%28254%29%20710-2151>
Fax: (254) 710-2969<tel:%28254%29%20710-2969>
han_li at baylor.edu<mailto:han_li at baylor.edu>

________________________________________
From: juantomas.sayago at gmail.com<mailto:juantomas.sayago at gmail.com> [juantomas.sayago at gmail.com<mailto:juantomas.sayago at gmail.com>]
Sent: Tuesday, February 12, 2013 8:43 AM
To: Li, Han
Subject: Re: [R-sig-Geo] question on the difference between spdep function spautolm() and glm() with autocovariate

Is your variable a dummy? Is it censored? If you estimate an slx model you can do it without problem. If you estimate a probit or logit with spatial autocorrelation you can check the package macspatial.
Juan
Sent on the Sprint® Now Network from my BlackBerry®

-----Original Message-----
From: "Li, Han" <Han_Li at baylor.edu<mailto:Han_Li at baylor.edu>>
Sender: r-sig-geo-bounces at r-project.orgDate: Tue, 12 Feb 2013 00:50:47
To: r-sig-geo at r-project.org<mailto:r-sig-geo at r-project.org><r-sig-geo at r-project.org<mailto:r-sig-geo at r-project.org>>
Subject: [R-sig-Geo] question on the difference between spdep function
 spautolm() and glm() with autocovariate

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?

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><mailto:han_li at baylor.edu<mailto:han_li at baylor.edu>>

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org<mailto:R-sig-Geo at r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



--
Juan Tomás Sayago Gómez
Graduate Research Assistant
West Virginia University - RRI
886 Chestnut Ridge Road, Room 520
P.O. Box 6825
Morgantown, WV 26506-6825



More information about the R-sig-Geo mailing list