# NOT RUN {
####=========================================####
#### For CRAN time limitations most lines in the
#### examples are silenced with one '#' mark,
#### remove them and run the examples
####=========================================####
####=========================================####
####=========================================####
#### EXAMPLE 1
#### simple example
####=========================================####
####=========================================####
data(BTdata)
head(BTdata)
# mix4 <- mmer2(tarsus ~ sex, random = ~ dam + fosternest,
# data = BTdata)
# summary(mix4)
# ### calculate the ratio and its SE
# pin(mix4, dam.prop ~ V1 / ( V1 + V2 + V3 ) )
####=========================================####
####=========================================####
####=========================================####
#### EXAMPLE 2
#### more complex multivariate model
####=========================================####
####=========================================####
# data(BTdata)
# mix3 <- mmer2(cbind(tarsus, back) ~ sex,
# random = ~ us(trait):dam + us(trait):fosternest,
# rcov= ~ diag(trait):units,
# data = BTdata)
# summary(mix3)
# #### calculate the genetic correlation
# pin(mix3, gen.cor ~ V2 / sqrt(V1*V3))
# }
Run the code above in your browser using DataLab