# NOT RUN {
####=========================================####
#### For CRAN time limitations most lines in the
#### examples are silenced with one '#' mark,
#### remove them and run the examples
####=========================================####
####=========================================####
#### EXAMPLES
#### Different models with sommer
####=========================================####
data(DT_ige)
DT <- DT_ige
Af <- A_ige
An <- A_ige
### Direct genetic effects model
# modDGE <- mmer(trait ~ block,
# random = ~ focal,
# rcov = ~ units,
# data = DT)
# summary(modDGE)$varcomp
#
### Indirect genetic effects model without covariance between DGE and IGE
# modDGE <- mmer(trait ~ block,
# random = ~focal + neighbour,
# rcov = ~ units,
# data = DT)
# summary(modDGE)$varcomp
#
### Indirect genetic effects model with covariance between DGE and IGE
# modIGE <- mmer(trait ~ block,
# random = ~ gvs(focal, neighbour),
# rcov = ~ units, iters=4,
# data = DT)
# summary(modIGE)$varcomp
#
### Indirect genetic effects model with covariance between DGE and IGE using relationship matrices
# modIGEb <- mmer(trait ~ block,
# random = ~ gvs(focal, neighbour, Gu=list(Af,An)),
# rcov = ~ units,
# data = DT)
# summary(modIGEb)$varcomp
# }
Run the code above in your browser using DataLab