cross_validation_model_bh_GxE runs complete cross validation with Hierarchical Bayesian GxE model

cross_validation_model_bh_GxE(data, variable, nb_iterations = 1e+05,
  mc.cores = 1)

Arguments

data

The data frame on which the model will be run. It should have at least the following columns : c("year", "germplasm", "location", "block", "X", "Y", "..."), with "..." the variables.

variable

The variable on which runs the model

nb_iterations

Number of iterations of the MCMC

mc.cores

The number of cores used for parallelisation of the computing

Value

The function returns a data frame with real values and estimated values by cross validation

Details

The convergence is not checked for each validation. If the parameters converge (cf check_model), then it is assumed that the parameters in the cross validation converge as well.

The model is run on data sets where germplasms are on at least three environments so the smallest data set where the cross validation is run has germplasms on at least two environments.

Parallelization is done with the function parallel::mclapply.

See also