[R-sig-ME] unsolved problem: SAS estimate function equivalent to estimate BLUP in lme4 or nlme or any other R package
David Duffy
davidD at qimr.edu.au
Thu Apr 21 09:52:48 CEST 2011
On Mon, 18 Apr 2011, Nilaya Sharma wrote:
> Dear Mixed Model Experts
>
> I was trying to fit a mixed model in animal experiment but stuck at simple
> point. The following similar example is from SAS mixed model pp 212.
>
> require(lme4); mod <- lmer(adg ~ 1 + (1|sire) + (1|dam:sire),
> data=genetic_evaluation)
> ranef (mod)
>
> provides random effects associated with dam:sire and sire, but do not
> provide the comparisons I need. It looks like I need to define and apply
> own contrasts or there is any other functions to do so?
> ****************Expected outputs according to SAS
> Estimate
> sire 1 BLUP "broad 2.2037
> sire 1 BLUP "narrow" 2.1609
> sire 1 BLUP with dam1 2.1002
If you look at mod and the output from ranef(mod), you will see that you
have all the necessary coefficients to form the BLUPs as defined in
Littell et al., recalling that they are centred. It's easy
to write your own routines to automate this if you have a large
application.
Cheers, David Duffy.
More information about the R-sig-mixed-models
mailing list