Thanks for all of the suggestions regarding this issue. Unfortunately, I did not come up with a solution to this problem and need to return to this issue once again. I'm still not sure what is appropriate to use to assess residual spatial autocorrelation in my negative binomial regression model.

I have a model with the count of facilities within a zone as the response and the only available variables I have for explanatory variables are urban classification (classifications 1 to 6, a zone level measure) and deprivation (classifications 1 to 5, a zone level measure). I have used the population size within a zone as an offset as I am interested in facilities per head of the population. I also have information about the local authority- the zones are nested within local authorities so there is a hierarchy to the data structure.

I have previously used single-level models with local authority as a fixed effect and I have also used multilevel modelling with zone at level 1 and local authority at level 2 to assess this problem. However, I am interested in whether the number of facilities within a zone is correlated with the numbers in the surrounding zones. With that in mind, I constructed a square matrix of 0s and 1s, where a 1 represents zones which share a common boundary, to use if required in a spatial analysis. Before carrying out this spatial regression I would like to check whether or not it is necessary by assessing spatial correlation in the residuals of my single level models. I also would like to check that the correlation is positive so that I can use some sort of CAR model. If it is negative I am not sure how to proceed.

Anyway, regarding the assessment of residual spatial correlation, it was suggested that I may be interested in trying out lmmoran.test() for my models and seeing how the figures change with the addition of each new explanatory variable which I have tried. However, I noticed that lmmoran.test() does not like offsets to be specified in the model. Is there an alternative specification of the test I can use which can include an offset term? When should moran.test() be used? It was suggested by a colleague who frequently works with spatial regression models that with glm models the residuals should be assessed for spatial autocorrelation by just extracting observed-expected from the model and putting this into the moran test in R. However, from reading some of the accounts on this list I am not sure if this is advisable.

Any further assistance would be greatly appreciated.

Cheers,
Karen

  ----- Original Message ----- 
  From: Roger Bivand 
  To: Luis Iván Ortiz Valencia 
  Cc: Karen Lamb ; r-sig-geo@stat.math.ethz.ch 
  Sent: Thursday, November 26, 2009 12:37 PM
  Subject: Re: [R-sig-Geo] Assessing residual spatial autocorrelation in a Poisson or Negative Binomial model


  On Thu, 26 Nov 2009, Luis Iván Ortiz Valencia wrote:

  > Hi Karen
  >
  > I am interested in this points too. What variable are you modeling? Counts
  > or incidence? did you standardized by population areas?
  >
  > R has lot of spatial models for spatial models. see at
  > http://r-spatial.sourceforge.net/

  Rather:

  http://cran.r-project.org/view=Spatial

  please, the sourceforge site is more for development, and is linked from 
  the task view on your nearest CRAN mirror.

  While lm.morantest() can be used on glm output objects, no work has been 
  done to establish whether this is a sensible idea. It remains problematic 
  to simulate spatially dependent discrete variables. However, it is 
  possible that if you ignore the "test" of doubtful substance, you could 
  track how Moran's I moves when adding variables in an exploratory way. Try 
  with a smaller dataset first.

  Hope this helps,

  Roger

  >
  > hope this help
  >
  > ivan
  >
  > 2009/11/26 Karen Lamb <k.lamb@sphsu.mrc.ac.uk>
  >
  >> Hi,
  >>
  >> I am currently trying to determine a way of assessing whether or not there
  >> is spatial autocorrelation present in my model residuals and was hoping
  >> someone could help me with this.
  >>
  >> I have information on counts in over six thousand areas, with around half
  >> of the areas found to have  a count of zero. I decided to fit a
  >> Zero-Inflated Poisson model and a Negative Binomial as the data is greatly
  >> overdispersed. However, neither of these approaches take into account the
  >> likelihood that there is spatial autocorrelation present in the data set.
  >>
  >> I have been searching for the last two weeks to find appropriate methods to
  >> fit a spatial glm model. However, as I am new to spatial statistical
  >> methodology I am finding it difficult to decide how best to do this. It am
  >> not sure that any of the existing R functions are particularly suitable to
  >> my use. I am not interested in prediction as I have data on a population. I
  >> am interested in assessing the coefficients of variables and whether or not
  >> the variables are significant in determining outcome. I have noticed that a
  >> lot of analyses use a Bayesian approach which may be the way forward.
  >>
  >> My question, however, relates to the glm models I have fitted. I have
  >> included variables which may explain some of the spatial correlations such
  >> as urban/rural classification. I would like to see if any residual spatial
  >> autocorrelation remains in the model but cannot find a way of doing this. On
  >> searching the R-sig-Geo archives the Morans Test or Morans I are mentioned.
  >> However, I noticed someone had queried using the moran test in R for
  >> residuals from a logistic regression and had been told that lm.morantest()
  >> is available for linear regression but there is not an alternative for the
  >> glm. Has anyone got any suggestions for how to check my residuals? Are there
  >> particular plots that can be assessed?
  >>
  >> Thanks for your assistance.
  >>
  >> Cheers,
  >> Karen
  >>
  >> _______________________________________________
  >> R-sig-Geo mailing list
  >> R-sig-Geo@stat.math.ethz.ch
  >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
  >>
  >
  >
  >
  >

  -- 
  Roger Bivand
  Economic Geography Section, Department of Economics, Norwegian School of
  Economics and Business Administration, Helleveien 30, N-5045 Bergen,
  Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
  e-mail: Roger.Bivand@nhh.no

	[[alternative HTML version deleted]]

