[R-sig-ME] lme4 heteroscedasticity???

Ben Bolker bbolker at gmail.com
Tue Oct 14 04:25:41 CEST 2014

Paul Johnson <paul.johnson at ...> writes:

> I did this a few years ago for ~250 patients (nested within ~10
> hospitals) being assessed by 7 adjudicators, so roughly a 250 x 6
> table of crossed random effects. The aim was to look for differences
> in precision between clinicians rating patients on a symptoms
> scale. It did take a several minutes to fit on a server with 24 GB
> of RAM, and required a little fiddling with the control options, but
> was nevertheless worth the time and trouble. Looking back at my code
> (below), I find that your advice helped me to fit it, via a post of
> yours from 2004, for which thanks!

 Lots of details snipped (sorry).

  I just want to point that I think that this model (crossed random
effects with fixed-categorical-predictor-dependent heteroscedasticity)
*is* probably do-able, albeit with a bit of a hassle, in lme4, by
combining the following two tricks:

  (1) setting up dummy variables for group, as in the last example
shown in ?lmer
  (2) use the trick shown by Steve Walker at
https://github.com/lme4/lme4/issues/224 (this is in the context
of the flexLambda branch, but you don't need the flexLambda branch
for this example) of using an individual-level random effect, and
setting the weights large to effectively suppress the residual
variance term

  (Not enough time to put together a worked example -- sorry)

  Ben Bolker

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