Description Usage Arguments Details Value Author(s) References See Also
View source: R/model_bh_intra_location.R
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.
1 2 3 4 |
data |
The data frame on which the model is run. It should come from |
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 |
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.
The function returns a list with
"data.model1": the dataframe used to run Hierarchical Bayesian intra-location model
"presence.absence.matrix": a matrix entry x environment with the number of occurence
"vec_env_with_no_data": a vector with the environments without data for the given variable
"vec_env_with_no_controls": a vector with the environments with no controls
"data_env_with_no_controls": a dataframe with the data from environments without controls.
"vec_env_with_controls": a vector with the environments with controls
"vec_env_RF": a vector with the environments as regional farms (i.e. with at least two blocks)
"vec_env_SF": a vector with the environments as satellite farms (i.e. with one block)
"MCMC": a list with the two MCMC chains (mcmc object)
"epsilon": a vector with the median value of the epsilon_ijk
"DIC": the DIC value of the model
Pierre Riviere for R code and Olivier David for JAGS code
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.
check_model
check_model.fit_model_bh_intra_location
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.