[R-sig-ME] heteroscedastic model in lme4

Leo Gürtler leog at anicca-vijja.de
Mon Dec 22 12:50:54 CET 2008

Doran, Harold schrieb:

Dear SIG-ME,

> This isn't an entirely accurate statement. nlme has built-in
> functions that implement the methods for correlational and variance
> structures as described in section 5 of Pinhiero and Bates. lme4
> doesn't have these functions built in as does nlme, but those same
> methods can be implemented by the user and then the data can be
> analyzed using functions in lme4. So, functions in lme4 can "handle"
> the same issues as nlme, it just requires the user to perform the
> steps described in PB section 5 et seq on their own.

has someone did this and can provide some R-code or references with
R-Code to learn how to do that?


> -----Original Message----- From:
> r-sig-mixed-models-bounces at r-project.org on behalf of Alan Cobo-Lewis
>  Sent: Fri 12/19/2008 11:19 AM To: r-sig-mixed-models at r-project.org 
> Subject: Re: [R-sig-ME] heteroscedastic model in lme4
> Anna,
> lme4 cannot handle certain kinds of heteroscedasticity, but I believe
> it can handle the kind you have in mind. Search the
> r-sig-mixed-models archive for a discussion involving me and David
> Afshartous, especially the summary message titled "[R-sig-ME] random
> effect variance per treatment group in lmer" that David posted
> 07/13/2007 04:18:08 PM
> I can't be certain that the suggestion below would work without
> knowing more about your design, but if width were a factor with three
> levels then you might try setting up indicator variables Wind1,
> Wind2, and Wind3 (that each take on the value 1 when a site is at the
> indicator's target width and 0 otherwise) and then fit the model with
> something like mrem <- lmer( log(Nhat+1)~Group + GreenPerc + sess +
> crop + VegDensity + Group:sess + Group:VegDensity + (0+Wind1|site) +
> (0+Wind2|site) + (0+Wind3|site), data=all, method="REML" )
> alan

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