Skip to content
Prev 7483 / 20628 Next

lmer blocking by subject?

[cc'ing back to r-sig-mixed-models]
On 12-02-05 11:31 PM, Tiffanie Cross wrote:
So the samples are unevenly spaced too ... ?
The closest equivalent to PROC GLIMMIX in SAS is glmmPQL from the
MASS package, in R.  Most of what you can do in GLIMMIX you can also do
in glmmPQL.

  The model statement for blocking by bird and allowing for correlation
within birds across time would be something like

  glmmPQL(present ~  gender + period + homecolony + colony,
   random=~period|bird), correlation=corCAR1(form=~time|bird),
    data = FD, family = binomial)
why do you think so?

  this allows for the effect of period to vary across birds.  I would
say you *might* want ~period+colony|bird , if your data can support it ...


   The two drawbacks with using glmmPQL or GLIMMIX are that (1) they
both use penalized quasi-likelihood, which are known to give biased
estimates of the variances for binary data; and (2) it's possible to fit
models that don't really make much sense in them.  However, both of
these are matters of taste (in my opinion) rather than absolute
show-stoppers.  I hate to say it, but if SAS was mostly working for you
and it was just a matter of getting residuals wouldn't that be an
easier problem to solve ... ?  (I

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a0000001413.htm


  BTW GLIMMIX now does Laplace and quadrature methods too, but it does
not allow autocorrelation with these methods:

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a0000001405.htm

 *  Because a valid conditional distribution is required, R-side random
 effects are not permitted for METHOD=LAPLACE in the GLIMMIX procedure.
In other words, the GLIMMIX procedure requires for METHOD=LAPLACE
conditional independence without R-side overdispersion or covariance
structure.
Well, I think they could be useful, but no need to delve into
unnecessary complications ...
Well, the point is that (1|bird) *is* more or less equivalent (as I
understand it) to "Subject=bird".

  I would definitely follow Murtaugh's advice here and use the
*simplest* method that you think will make sense.  Doing a two-stage
analysis might be just fine.

  Ben Bolker