model_bh_intra_location: Run Hierarchical Bayesian intra-location model

Description Usage Arguments Details Value Author(s) References See Also

View source: R/model_bh_intra_location.R

Description

model_bh_intra_location runs Hierarchical Bayesian intra-location model to get mean comparisons on each environment of the network. See details for more information.

Usage

1
2
3
4
model_bh_intra_location(data, variable, nb_iterations = 1e+05,
  thin = 10, return.mu = TRUE, return.beta = TRUE,
  return.sigma = TRUE, return.nu = TRUE, return.rho = TRUE,
  return.epsilon = FALSE, return.DIC = FALSE, nu.max = 10)

Arguments

data

The data frame on which the model is run. It should come from format_data_PPBstats.data_agro

variable

The variable on which runs the model

nb_iterations

Number of iterations of the MCMC

thin

thinning interval to reduce autocorrelations between samples of the MCMC

return.mu

Return the value for each entry in each environment (mu_ij)

return.beta

Return the value for each block in each environment (beta_jk)

return.sigma

Return the value for each within-environment variance (sigma_j)

return.nu

Return the value of nu

return.rho

Return the value of rho

return.epsilon

Return the value of all residuals in each environment (epsilon_ijk)

return.DIC

Return the DIC value of the model. See details for more information.

nu.max

Set the nu.max. It is 10 by default

Details

This model estimates entry effects (mu_ij), block effects (beta_jk), residuals (epsilon_ijk) and within-environment variance (sigma_j) on each environment. An environment is a combinaison of a location and a year.

The variance are taken in an inverse Gamma distribution of parameters nu and rho. This model takes into acount all the information on the network in order to cope with the high disequilibrium within each environment (i.e. low degree of freedom at the residual in each environment).

More information can be found in the book : https://priviere.github.io/PPBstats_book/family-1.html#model-1

For DIC value, see ?dic.samples from the rjags package for more information.

Value

The function returns a list with

Author(s)

Pierre Riviere for R code and Olivier David for JAGS code

References

P. Riviere, J.C. Dawson, I. Goldringer, and O. David. Hierarchical Bayesian Modeling for Flexible Experiments in Decentralized Participatory Plant Breeding. Crop Science, 55, 2015.

See Also


priviere/PPBstats documentation built on May 6, 2021, 1:20 a.m.