Cullis heritability for lme4 models
Usage
h_cullis(model, genotype, re_MME = FALSE)
Arguments
- model
Object of class lmer
.
- genotype
A character string indicating the column in data that
contains genotypes.
- re_MME
A logical value to ask if we want to reconstruct the mixed models
equations to estimate the Cullis heritability. (FALSE
by default)
Value
A numerical value of the Cullis heritability estimate. If
re_MME
is TRUE
, a list with matrices of the mixed models
equations is returned.
Author
Paul Schmidt, Johan Aparicio.
Examples
# \donttest{
library(lme4)
#> Loading required package: Matrix
library(agridat)
library(agriutilities)
dat <- john.alpha
g.ran <- lmer(
formula = yield ~ rep + (1 | gen) + (1 | rep:block),
data = dat
)
h_cullis(model = g.ran, genotype = "gen")
#> [1] 0.7979968
# }