[R] analyzing binomial data with spatially correlated errors

Rubén Roa-Ureta rroa at udec.cl
Thu Mar 20 14:08:26 CET 2008


Roger Bivand wrote:
> Ben Bolker <bolker <at> ufl.edu> writes:
> 
>> Jean-Baptiste Ferdy <Jean-Baptiste.Ferdy <at> univ-montp2.fr> writes:
>>
>>> Dear R users,
>>>
>>> I want to explain binomial data by a serie of fixed effects. My 
>>> problem is that my binomial data  are spatially correlated. Naively, 
>>> I thought I could found something similar to gls to analyze such
>>> data. After some reading, I decided that lmer is probably to tool
>>> I need. The model I want to fit would look like
>>>
> (...)
>> You could *almost* use glmmPQL from the MASS package,
>> which allows you to fit any lme model structure
>> within a GLM 'wrapper', but as far as I know it wraps only lme (
>> which requires at least one random effect) and not gls.
>>
> 
> The trick used in:
> 
> Dormann, C. F., McPherson, J. M., Araujo, M. B., Bivand, R.,
> Bolliger, J., Carl, G., Davies, R. G., Hirzel, A., Jetz, W., 
> Kissling, W. D., Kühn, I., Ohlemüller, R., Peres-Neto, P. R., 
> Reineking, B., Schröder, B., Schurr, F. M. & Wilson, R. J. (2007): 
> Methods to account for spatial autocorrelation in the analysis of 
> species distributional data: a review. Ecography 30: 609–628
> 
> (see online supplement), is to add a constant term "group", and set 
> random=~1|group. The specific use with a binomial family there is for 
> a (0,1) response, rather than a two-column matrix. 
> 
>>   You could try gee or geoRglm -- neither trivially easy, I think ...
> 
> The same paper includes a GEE adaptation, but for a specific spatial
> configuration rather than a general one.
> 
> Roger Bivand
> 
>>   Ben Bolker

I suggest you also check out the package geoRglm, where you can model 
binomial and Poisson spatially correlated data. I used it to model 
spatially correlated binomial data but without covariates, i.e. without 
your fixed effects (so my model was a logistic regression with the 
intercept only) (Reference below). But I understand that you can add 
covariates and use them to estimate the non-random set of predictors. 
Here is the geoRglm webpage:
http://www.daimi.au.dk/~olefc/geoRglm/
This approach would be like tackling the problem from the point of view 
of geostatistics, rather than from mixed models. But I believe the 
likelihood-based geostatistical model is the same as a generalized 
linear mixed model where the distance is the random effect.
In SAS you can do this using the macro glimmix but from the point of 
view of generalized linear mixed models because there they have 
implemented a correlation term, so that you can identify typical spatial 
correlation functions such as Gauss and exponential, particular cases of 
the Matern family.

Rubén

Roa-Ureta, R. and E.N. Niklitschek (2007) Biomass estimation from 
surveys with likelihood-based geostatistics. ICES Journal of Marine 
Science 64:1723-1734



More information about the R-help mailing list