[R-sig-ME] models with overdispersion and autocorr.
Highland Statistics Ltd.
highstat at highstat.com
Sat May 23 12:36:31 CEST 2009
>I'm trying to fit repeated count models at several locations. The
>locations are a random effect as there are >50, and we're not
>interested in the actual location values.
>But the data needs to be fitted with a quasi or zero-inflated model,
>and there is autocorrelation through time.
>I can't find a function which allows quasi/zi AND autocorrelation to
>be fitted. Is there one? Or is there another way the model could
>be constructed to avoid the problem?
I guess you want the following:
Y_ijk ~ ZIP(mu_ijk, pi_ijk) (or its NB cousin)
Y_ijk = observation i at time j at location k
logit(pi_ijk) = X_ijk* beta + b_k + epsilon_ijk
log(mu_ijk) = X'_ijk * beta' + b'_k + eta_ijk
Then this can be solved in RBugs. So..MCMC stuff. The b_k and b'_k
are the random intercepts for location. The epsilon and eta can be
used to introduce some extra auto-regressive correlation. See also
Ntzoufras (2009) for ZIP code, or Chapter 23 in Zuur et al (2009) for
a simple auto-correlation Poisson GLM example. In fact, most of the
ingredients are in Ntzoufras (2009).
But such a model would only do correlation between observations from
the same location. Things get a bit more nasty if you also have
correlation between locations (if your birds fly from one location to
nearby locations in the same year)....and it becomes even more nasty
if your birds fly from one location to another location the next
year. I guess you could try to add some spatial correlations via the
epsilon and the eta..using some of the spatial correlation functions
described in Chapter 5 of Pinheiro and Bates (2000). That would be
very nice to try...:-). Try to visualise a very big correlation
matrix for the entire data set. Which values would be most correlated?
The ZIP above can be fitted in RBugs.......but I guess that you want
to do this in the context of a GAM? Then you need to program the
spline into X*beta. See Wood (2006).
It is not impossible to solve this problem...but it will keep you
busy for a while. We have a book scheduled for the end of 2009 in
which all this stuff is applied; "Analysing Ecological Data;
Practical Solutions When Things Get Complicated". Not that this is of
much use to you right now.
Dr. Alain F. Zuur
First author of:
1. Analysing Ecological Data (2007).
Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p.
2. Mixed effects models and extensions in ecology with R. (2009).
Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer.
3. A Beginner's Guide to R (2009).
Zuur, AF, Ieno, EN, Meesters, EHWG. Springer
Statistical consultancy, courses, data analysis and software
Highland Statistics Ltd.
6 Laverock road
UK - AB41 6FN Newburgh
Tel: 0044 1358 788177
More information about the R-sig-mixed-models