model_bh_variance_intra: Run Hierarchical Bayesian variance-intra model

Description Usage Arguments Details Value Author(s) See Also

View source: R/model_bh_variance_intra.R

Description

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.

Usage

1
2
3
model_bh_variance_intra(data, variable, nb_iterations = 1e+05,
  thin = 10, return.mu = TRUE, return.sigma = TRUE,
  return.epsilon = FALSE, return.DIC = FALSE)

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 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.

Details

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.

Value

The function returns a list with

Author(s)

Pierre Riviere and Gaelle van Frank for R code; Olivier David for JAGS code

See Also


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