[R] analyzing binomial data with spatially correlated errors
Ben Bolker
bolker at ufl.edu
Thu Mar 20 15:08:51 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Douglas Bates wrote:
| On Wed, Mar 19, 2008 at 3:02 PM, Ben Bolker <bolker at ufl.edu> wrote:
|> 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
|> >
|> > lmer ( cbind(n.success,n.failure) ~ (x1 + x2 + ... + xn)^2 ,
family=binomial,
|> > correlation=corExp(1,form=~longitude+latitude))
|> >
| This is more than a notational difference. In a linear model the
| effect of b is limited to the linear predictor and, through that, the
| mean. The variance-covariance specification can be separated from the
| mean and, hence, can be specified separately. It is easy to fool
| yourself into thinking that the same should be true for generalized
| linear models, just like it is easy to fool yourself into thinking
| that all the arguments for the lme function will work unchanged in
| lmer.
~ Fair enough. I guess the model I was thinking of was
~ Y ~ Binomial(p,N)
~ logit(p) ~ MVN(mu,Sigma)
~ mu = (determined by model matrix and predictors)
~ Sigma = (exponential spatial correlation matrix)*sigma^2
~ This model is certainly different from the model that the original
poster may have been thinking of, because in the limit where there
is no extra-binomial variation, there can't be any correlation either.
On the other hand, it seems to be a sensible model.
~ cheers
~ Ben Bolker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH4m/zc5UpGjwzenMRAi02AJ9UNy8WsUkN8hVI5ih1yOLxtQn3TwCfeovt
Q1iOmczhkWqi4d4VeZDcylo=
=Mr7v
-----END PGP SIGNATURE-----
More information about the R-help
mailing list