[R-sig-ME] Incorporating a Temporal Correlation Structure, in a GLM

Highland Statistics Ltd highstat at highstat.com
Wed Feb 22 20:26:20 CET 2012


* you could just use glm (or whatever) and evaluate the correlations
among the residuals -- if there's nothing going on there then you
have a reasonable excuse for proceeding without a correlation model.

* the fact that the _predictor_ variables are autocorrelated isn't
that much of a big deal -- it's really the response (or rather the
residuals of the response) that you should be worried about, although
there is always a bit of an issue in time-series analysis in
looking at relationships of autocorrelated series with other
autocorrelated series ...

* generalized estimating equations (GEE: see geepack etc.) are
another approach, although I don't know if any of the R packages
that do GEEs have an option for autocorrelations on unevenly
spaced data (try installing the "sos" package and searching
via something like findFn("gee uneven"))

* in my opinion the gold standard (if the data are rich enough
to warrant it) is to build a hierarchical model with a latent
normally distributed variable with temporal autocorrelation and
an observed binary variable (emergence) on top of it, but this
is fairly hard work -- you'd need AD Model Builder or some
dialect of BUGS.

  I will be interested to see if anyone has better suggestions.



Kevin,

Ben..thanks for the advertisement..:-))

The last chapter in our 2009 book shows how a Poisson GLM can be 
extended with an AR1 correlation structure on the residuals. We took 
this further in our upcoming book "Zero inflated models and GLMM with 
R", which comes out in 2 weeks. We extend GLM models with spatial or 
temporal correlations by using CAR structures on the residuals. We have 
done it in a Poisson/NB GLM/GAM context...but also in a binomial context 
(which means that you can then also do it for a ZIP). These are models 
of the form:

Y_i ~ Poisson(mu_i)

log(mu_i) = alpha + beta * X_i + epsilon_i

where the epsilon_i are spatially correlated following a CAR. And you 
can also use this for time series. Some recent papers used CAR on the 
random effects.

The bad news is that this is indeed MCMC...and we used WinBUGS (the book 
actually starts with a beginner's intro to MCMC and WinBUGS). I am 
tempted to write an ADMB supplement as it seems to be much faster in 
fitting these models.  The ADMB guys were kind enough to provide code to 
fit some of the models used in the book.


In our experience adding a correlation to a GLM works fine as long as it 
represents small-scale correlation. As soon as you allow it to capture 
large scale correlation then it may start to fight with the covariates. 
And then you get very poor mixing of chains. So..it is a bit of an art. 
I think it also depends on what type of correlation you are trying to 
model...does the spatial (or temporal) correlation represent a missing 
covariate...it is small scale variation...or is it 'real' dependency 
(pseudo replication).

A paper from VerHoef and Janssen was quite inspiring.

Anyway...enough advertisement...

Kind regards,

Alain


>   I would check the books from Highland Statistics (Zuur et al.)
> to see if they have anything useful ...
>
>
>
> ------------------------------
>
> _______________________________________________
> R-sig-mixed-models mailing list
> R-sig-mixed-models at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> End of R-sig-mixed-models Digest, Vol 62, Issue 43
> **************************************************
>


-- 

Dr. Alain F. Zuur
First author of:

1. Analysing Ecological Data (2007).
Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p.
URL: www.springer.com/0-387-45967-7


2. Mixed effects models and extensions in ecology with R. (2009).
Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer.
http://www.springer.com/life+sci/ecology/book/978-0-387-87457-9


3. A Beginner's Guide to R (2009).
Zuur, AF, Ieno, EN, Meesters, EHWG. Springer
http://www.springer.com/statistics/computational/book/978-0-387-93836-3


Other books: http://www.highstat.com/books.htm


Statistical consultancy, courses, data analysis and software
Highland Statistics Ltd.
6 Laverock road
UK - AB41 6FN Newburgh
Tel: 0044 1358 788177
Email: highstat at highstat.com
URL: www.highstat.com
URL: www.brodgar.com




More information about the R-sig-mixed-models mailing list