Description Usage Arguments Details Value Author(s) See Also
View source: R/model_bh_variance_intra.R
model_bh_variance_intra
runs Hierarchical Bayesian variance-intra model to get intra-population variance on each environment of the network. See details for more information.
1 2 3 |
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 and each plot (mu_ijk) |
return.sigma |
Return the value for each intra-population variance in each environment (sigma_ij) |
return.epsilon |
Return the value of all residuals in each environment on each plot (epsilon_ijk) |
return.DIC |
Return the DIC value of the model. See details for more information. |
Model on intra-population variance estimates entry effects (mu_ijk) and within-population variance (sigma_ij) 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 10^-6.
More information can be found in the book : https://priviere.github.io/PPBstats_book/family-4.html#variance-intra
For DIC value, see ?dic.samples
from the rjags
package for more information.
The function returns a list with
"data.model_bh_variance_intra": the dataframe used to run mode variance_intra
"MCMC": a list with the two MCMC chains (mcmc object)
"DIC": the DIC value of the model
Pierre Riviere and Gaelle van Frank for R code; Olivier David for JAGS code
check_model
check_model.fit_model_bh_variance_intra
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.