1

My data is taken from an area where I do expect a certain degree of spatial correlation for each variable. My question is how to account for spatial correlation (defined with X and Y) in the GLM syntax?

Model1 <- glm(INC ~ Var1 + Var2 +Var3 + X:Y , 
          data = MyData, 
          family = binomial(logit)) 
MIH
  • 165
  • 1
  • 8
  • You must really give more details of what you want to achieve. The 'glm' function is for independence models and cannot include spatial correlation. For that maybe 'geoRglm' (on CRAN) or have a look at https://cran.r-project.org/web/views/Spatial.html – kjetil b halvorsen Jan 31 '17 at 20:55
  • I would look at the mgcv package for this - see the answer to https://stats.stackexchange.com/questions/16485/what-are-ways-to-deal-with-circular-covariates-e-g-with-a-gam – Tom Wenseleers Oct 02 '21 at 18:57

0 Answers0