[R-sig-ME] heterogeneous variance models

Ben Bolker bbolker at gmail.com
Sun May 10 22:22:00 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


   Someone sent me an e-mail recently asking how/whether heterogeneous
variances can be implemented in lme4.  I can't find it any more, so
I'm answering here in hopes that they'll see it. The short answer is
that they can, at least for heterogeneity among categorical groups
(similar to what varIdent does in the nlme package), although it's a
bit of a nuisance for categorical variables with lots of levels, as
the variance terms all need to be specified separately.

   The trick is to set up a dummy variable for each level: there is a
helper function dummy() for this purpose, and example("dummy") gives
an example showing how to estimate heterogeneous residual variances
for females vs. males in the standard sleep study example.

  Ben Bolker


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJVT73oAAoJEOCV5YRblxUHlzQIAMuoYv9K06NGG+3mEcvHcmPW
Xp7rLyxRfiTtRkmr/UieR52WpFDapxNgMurLT1aESD5TWeSBTXmeev2ltajPM5It
A5Mz1cNob1Tl67zsBCUrKMVVclRicO/Ymbpab1QJYcXxGAVZ03gkaguPWJpw3aHQ
kt2GZW6SGidbI17PwZXTyVb69cJ8p/mq459LwMAFNusD4MCiIt1/K2HTL8NnekVn
G7XPMDBg/JoyHmnqWpJbhzccjxZetNMtK6GyXaamlnyPJaJI0i9j6t/X0jKiAqO0
k1BdwNkLo03sneHodyhdRqAS5KMzeNSo8FOinDIUCLtVikz5k0IbQhHO6JWChz4=
=KPfA
-----END PGP SIGNATURE-----



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