####=========================================####
#### 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
# # Indirect genetic effects model without covariance between DGE and IGE
# modIGE <- mmec(trait ~ block, dateWarning = FALSE,
# random = ~ focal + neighbour,
# rcov = ~ units, nIters=100,
# data = DT)
# summary(modIGE)$varcomp
# pmonitor(modIGE)
#
# # Indirect genetic effects model with covariance between DGE and IGE using relationship matrices
# modIGE <- mmec(trait ~ block, dateWarning = FALSE,
# random = ~ covc( vsc(isc(focal)), vsc(isc(neighbour)) ),
# rcov = ~ units, nIters=100,
# data = DT)
# summary(modIGE)$varcomp
# pmonitor(modIGE)
#
# # form relationship matrix
# Ai <- as( solve(A_ige + diag(1e-5, nrow(A_ige),nrow(A_ige) )), Class="dgCMatrix")
# # Indirect genetic effects model with covariance between DGE and IGE using relationship matrices
# modIGE <- mmec(trait ~ block, dateWarning = FALSE,
# random = ~ covc( vsc(isc(focal), Gu=Ai), vsc(isc(neighbour), Gu=Ai) ),
# rcov = ~ units, nIters=100,
# data = DT)
# summary(modIGE)$varcomp
# pmonitor(modIGE)
Run the code above in your browser using DataLab