[R-sig-ME] Replicating analysis in asreml in lme4

Aravind J. aravindjayaramanagri at gmail.com
Sat Jul 30 07:41:03 CEST 2016


Dear members,

I am trying to reproduce analyse an alpha lattice design (an unbalanced
design) in  `lme4`.

https://cran.r-project.org/web/packages/agridat/agridat.pdf#page.184

library(agridat)
library(lme4)

The model can be fitted in lme4

# genotypes - fixed
model <- lmer(yield ~ 0 + gen + rep + (1|rep:block), dat)
# genotypes - random
model <- lmer(yield ~ 0 + (1|gen) + rep + (1|rep:block), dat)

However further calculations seem to required `asreml`.

library(asreml)

m3 <- asreml(yield ~ 1 + rep, data=dat, random=~ gen + rep:block)
sg2 <- summary(m3)$varcomp[1,'component']
vblup <- predict(m3, classify="gen")$pred$avsed ^ 2

m3 <- asreml(yield ~ 1 + gen + rep, data=dat, random = ~ rep:block)
vblue <- predict(m3, classify="gen")$pred$avsed ^ 2
sg2 / (sg2 + vblue/2)
1-(vblup / 2 / sg2)

Here `avsed` is the "mean variance of difference of adjusted means" (BLUP
or BLUE). Is it possible to replicate the last part also in `lme4`?

`avsed` can be computed from the "variance-covariance matrix of adjusted
means" for genotypes. (
https://static-content.springer.com/esm/art%3A10.1186%2F1471-2164-14-860/MediaObjects/12864_2013_5591_MOESM1_ESM.doc).
How to get that matrix from lme4?


Warm Regards,

-- 
J.Aravind
Division of Germplasm Conservation,
ICAR-National Bureau of Plant Genetic Resources,
New Delhi - 110 012
<aravindj at nbpgr.ernet.in>

	[[alternative HTML version deleted]]



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