Skip to content
Prev 13971 / 20628 Next

glmer random effects structure: a case

Dear Simone,

nlme models correlation structures on the residuals. Those are the epsilons
in the model. Y = X * beta + epsilon. Don't confuse them with the output of
resid(model). In the case of a Gaussian model, they happen to be the same.
In case of a binomial, and many other distributions, they are not. Because
there is not such thing as epsilon in a binomial model. Y = Binom(pi),
logit(pi) = X * beta. Since there are no epsilons in the binomial model,
the correlation structures for nlme don't work.

The correlation structures in nlme work within the finest level of the
random effects. So in your case within dates rather than among dates. Which
is not what you are looking for.

Also note that adding a random intercept is equivalent to a compound
symmetry correlation structure on that variable. Having some correlation
structure is often sufficient.

Have a look at the INLA package (www.rinla.org) if you want to model the
temporal autocorrelation and willing to go Bayesian. INLA can model
correlated random effects. Be warned: it not for the faint of heart.

inla(Var1 ~ SEX + AGE + Var2meanID + Var2varIND + f(DATE, model = "AR1") +
f(IND, model = "iid"), data = mydata, family = "binomial")

Best regards,


ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2015-11-16 16:45 GMT+01:00 Malcolm Fairbrother <M.Fairbrother at bristol.ac.uk>
: