# NOT RUN {
library(metan)
# fitting the model considering an RCBD
# Genotype as random effects
rcbd <- gamem(data_g,
gen = GEN,
rep = REP,
resp = c(PH, ED, EL, CL, CW, KW, NR, TKW, NKE))
# Likelihood ratio test for random effects
get_model_data(rcbd, "lrt")
# Variance components
get_model_data(rcbd, "vcomp")
# Genetic parameters
get_model_data(rcbd, "genpar")
# random effects
get_model_data(rcbd, "ranef")
# Predicted values
predict(rcbd)
# fitting the model considering an alpha-lattice design
# Genotype and block-within-replicate as random effects
# Note that block effect was now informed.
alpha <- gamem(data_alpha,
gen = GEN,
rep = REP,
block = BLOCK,
resp = YIELD)
# Genetic parameters
get_model_data(alpha, "genpar")
# Random effects
get_model_data(alpha, "ranef")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab