Category Archives: Autocorrelation

Chapter 12 – Revised Script

Hi class,

Here is the final script for Chapter 12 (Chapter12_jtf_v2.r).  I made a few changes in class and after class, I figured out why I was confused about the QIC and yags.  It looks like yags (using QIC) and geeglm (using anova) come to different conclusions about whether to drop the interaction. The QIC says don’t, and the anova says do.  It’s hard to know if the problem is the software (yags vs geeglm) or the metric (likelihood ratio vs. QIC).

I think the bottom line on GEE is that it is very useful to try, especially if you can’t get just the right distribution to work.  It can mimic mixed effects (using intraclass correlation), can account for various other correlation structures (like AR1) and may be able to give you most of what you want.  I’d stick to the anova approach, unless you want to look at the references in detail.

Jack

AutoRegressive Moving Average Correlation Structures

Hi All,

Here is the script ( Chapter6_jtf.new.r ) I ended up with at the end of class today (I was trying to plot a smoother through the residuals of the M3.gls model, but it didn’t actually work until after class) .  I have also uploaded the slides I did to explain ARMA models.  Tomorrow, we’ll work with some of your data and try to diagnose what to do with the random part of the model (fix heterogeneous variances, add random effects, add autocorrelation, or something else we haven’t gotten to yet).

Jack