Package: bayesammi 1.0.0

bayesammi: Bayesian Estimation of the Additive Main Effects and Multiplicative Interaction Model

Bayesian estimation of the additive main effects and multiplicative interaction (AMMI) model of multi-environment trials by the Gibbs sampler of Crossa, Perez-Elizalde, Jarquin, Cotes, Viele, Liu and Cornelius (2011) <doi:10.2135/cropsci2010.06.0343>: posterior distributions of the overall mean, genotype and environment effects, singular values, genotype and environment scores (von Mises-Fisher conditionals on the constrained spheres) and error variance; several chains with burn-in and thinning; posterior summaries with highest posterior density intervals; the convergence diagnostics of Raftery-Lewis, Heidelberger-Welch and Gelman-Rubin; the AMMI biplot with highest posterior density regions for inference on genotypes and environments; least-squares AMMI; and a plain-language interpretation of every result, computed from its numbers. Beyond the article: unbalanced trials with missing plots and cells (data augmentation), environment-specific error variances, the Bayesian GGE (sites regression) model of Perez-Elizalde, Jarquin and Crossa (2012) <doi:10.1007/s13253-011-0063-9>, probabilities of superior performance and stability (Dias et al. 2022 <doi:10.1007/s00122-022-04041-y>), posterior ranks, Bayesian stability measures, predictions and the winner of every environment, model choice by DIC and WAIC with posterior predictive checks, draws for the 'posterior', 'bayesplot' and 'coda' packages, a compiled sampler, and a built-in 'shiny' application. Bayesian stability analysis: the Finlay-Wilkinson, Eberhart-Russell and Shukla models by Gibbs sampling, and the posterior distributions of classical stability indices (Wricke, Shukla, Lin-Binns, Annicchiarico, Eskridge's safety-first) and of AMMI-based indices (ASV, SIPC, EV, Za, WAAS, WAASY). Every result prints the references of its method.

Authors:Muhammad Yaseen [aut, cre], Jose Crossa [aut, ctb], Sergio Perez-Elizalde [aut, ctb], Diego Jarquin [aut, ctb], Jose Miguel Cotes [aut, ctb], Kert Viele [aut, ctb], Genzhou Liu [aut, ctb], Paul L. Cornelius [aut, ctb], Julian Garcia Abadillo Velasco [aut, ctb]

bayesammi_1.0.0.tar.gz
bayesammi_1.0.0.zip(r-4.7-x86_64)bayesammi_1.0.0.zip(r-4.7-arm64)bayesammi_1.0.0.zip(r-4.6-x86_64)bayesammi_1.0.0.zip(r-4.6-arm64)bayesammi_1.0.0.zip(r-4.5-x86_64)
bayesammi_1.0.0.tgz(r-4.6-x86_64)bayesammi_1.0.0.tgz(r-4.6-arm64)bayesammi_1.0.0.tgz(r-4.5-x86_64)bayesammi_1.0.0.tgz(r-4.5-arm64)
bayesammi_1.0.0.tar.gz(r-4.7-arm64)bayesammi_1.0.0.tar.gz(r-4.7-x86_64)bayesammi_1.0.0.tar.gz(r-4.6-arm64)bayesammi_1.0.0.tar.gz(r-4.6-x86_64)
bayesammi_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
bayesammi/json (API)

# Install 'bayesammi' in R:
install.packages('bayesammi', repos = c('https://myaseen208.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/myaseen208/bayesammi/issues

Pkgdown/docs site:https://myaseen208.com

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • Maiz - Maize multi-environment trial

On CRAN:

Conda:

quartoopenblascppopenmp

5.68 score 32 scripts 556 downloads 31 exports 25 dependencies

Last updated from:72c420e63f. Checks:13 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE195
linux-devel-x86_64NOTE187
source / vignettesOK411
linux-release-arm64NOTE172
linux-release-x86_64NOTE204
macos-release-arm64NOTE192
macos-release-x86_64NOTE329
macos-oldrel-arm64NOTE210
macos-oldrel-x86_64NOTE326
windows-devel-arm64NOTE350
windows-devel-x86_64NOTE257
windows-release-arm64NOTE340
windows-release-x86_64NOTE181
windows-oldrel-x86_64NOTE209
wasm-releaseOK126

Exports:bam_ammi_indicesbam_appbam_app_objectbam_citebam_comparebam_indicesbam_interpretbam_notationbam_ppcbam_predictbam_priorsbam_ranksbam_referencebam_savebam_stab_priorsbam_stabilitybam_superioritybam_themebam_winnersbayes_ammibayes_stabilitybiplotse_effg_effge_ammige_effge_meange_modelge_varmatrix_korthnorm

Dependencies:clicodacollapsecpp11data.tablefarverggplot2ggrepelgluegtableisobandlabelinglatticelifecycleMASSR6RColorBrewerRcppRcppArmadillorlangS7scalesvctrsviridisLitewithr

Bayesian stability models: Eberhart-Russell, Finlay-Wilkinson and Shukla
Abstract | Model | Priors | The sampler | The Eberhart-Russell model on Maiz | Least squares and Bayes | The safety-first index | Which model? | The stability fit and the decision tools | Interpretation and sources | References

Last update: 2026-11-07
Started: 2026-11-07

Bayesian stability models: Eberhart-Russell, Finlay-Wilkinson and Shukla (PDF)
Abstract | Model | The Eberhart-Russell model on Maiz | The safety-first index | Which model? | The stability fit and the decision tools | Interpretation and sources | References

Last update: 2026-11-07
Started: 2026-11-07

Convergence of the chains
Abstract | Several chains | Traces | Gelman-Rubin | Raftery-Lewis | Heidelberger-Welch | Effective sample size and Monte Carlo error | The draws for further analysis | posterior and bayesplot | Interpretation of convergence | References

Last update: 2026-11-07
Started: 2026-11-07

Convergence of the chains (PDF)
Abstract | Several chains | Traces | Gelman-Rubin | Raftery-Lewis | Heidelberger-Welch | Effective sample size and Monte Carlo error | The draws for further analysis | posterior and bayesplot | Interpretation of convergence | References

Last update: 2026-11-07
Started: 2026-11-07

Decision tools for breeders
Abstract | Probabilities of superior performance and stability | Posterior ranks | Bayesian stability | Predictions | Which genotype wins where | Model choice | Information criteria | Posterior predictive checks | Working with posterior, bayesplot and coda | Interpretation | References

Last update: 2026-11-07
Started: 2026-11-07

Decision tools for breeders (PDF)
Abstract | Probabilities of superior performance and stability | Posterior ranks | Bayesian stability | Predictions | Which genotype wins where | Model choice | Working with posterior, bayesplot and coda | Interpretation | References

Last update: 2026-11-07
Started: 2026-11-07

Getting started with bayesammi
Abstract | The data | The least-squares AMMI fit | The Bayesian fit | Traces and the biplot | Interpretation | Where to go next | References

Last update: 2026-11-07
Started: 2026-11-07

Getting started with bayesammi (PDF)
Abstract | The data | The least-squares AMMI fit | The Bayesian fit | Traces and the biplot | Interpretation | Where to go next | References

Last update: 2026-11-07
Started: 2026-11-07

Inference on the biplot
Abstract | The coordinates | HPD regions | Stable genotypes and environments | Only the unstable ones | Reading genotype and environment together | References

Last update: 2026-11-07
Started: 2026-11-07

Inference on the biplot (PDF)
Abstract | The coordinates | HPD regions | Stable genotypes and environments | Only the unstable ones | Reading genotype and environment together | References

Last update: 2026-11-07
Started: 2026-11-07

Interpreting the results
Abstract | The Bayesian AMMI fit | The facts behind the sentences | The biplot | Stability models | Decisions and model choice | Markdown for reports | How each method is read | References

Last update: 2026-11-07
Started: 2026-11-07

Interpreting the results (PDF)
Abstract | The Bayesian AMMI fit | The facts behind the sentences | The biplot | Stability models | Decisions and model choice | Markdown for reports | How each method is read | References

Last update: 2026-11-07
Started: 2026-11-07

Model, priors and the Gibbs sampler
Abstract | Model | Priors | Conditional distributions | Overall mean and main effects | Singular values | Score vectors | Error variance | Signs and identifiability | The sampler | Extensions | References

Last update: 2026-11-07
Started: 2026-11-07

Model, priors and the Gibbs sampler (PDF)
Abstract | Model | Priors | Conditional distributions | Signs and identifiability | The sampler | Extensions | References

Last update: 2026-11-07
Started: 2026-11-07

Posterior distributions of stability indices
Abstract | Classical indices | AMMI-based indices | Indices from a stability model | Interpretation | References

Last update: 2026-11-07
Started: 2026-11-07

Posterior distributions of stability indices (PDF)
Abstract | Classical indices | AMMI-based indices | Indices from a stability model | Interpretation | References

Last update: 2026-11-07
Started: 2026-11-07

Priors and the number of bilinear terms
Abstract | Vague priors | Informative priors | How many terms? | The posterior of the error variance with more terms | Information criteria | References

Last update: 2026-11-07
Started: 2026-11-07

Priors and the number of bilinear terms (PDF)
Abstract | Vague priors | Informative priors | How many terms? | The posterior of the error variance with more terms | Information criteria | References

Last update: 2026-11-07
Started: 2026-11-07

References of the methods
How to cite | References by method

Last update: 2026-11-07
Started: 2026-11-07

References of the methods (PDF)
How to cite | References by method

Last update: 2026-11-07
Started: 2026-11-07

Reproducing Crossa et al. (2011)
Abstract | The run of the paper | Table 1 | The error variance | Table B1: the first term | Table B1: the second term | Figure 1: traces and histograms of the singular values | Figures 2 to 4: biplots | References

Last update: 2026-11-07
Started: 2026-11-07

Reproducing Crossa et al. (2011) (PDF)
Abstract | The run of the paper | Table 1 | Table B1: the first term | Table B1: the second term | Figure 1: traces and histograms of the singular values | Figures 2 to 4: biplots | References

Last update: 2026-11-07
Started: 2026-11-07

The Bayesian GGE (SREG) model
Abstract | Model | The fit | The GGE biplot with HPD regions | Which genotype wins where | AMMI or GGE? | Interpretation | References

Last update: 2026-11-07
Started: 2026-11-07

The Bayesian GGE (SREG) model (PDF)
Abstract | Model | The fit | The GGE biplot with HPD regions | Which genotype wins where | AMMI or GGE? | Interpretation | References

Last update: 2026-11-07
Started: 2026-11-07

The built-in application
Abstract | Starting the application | The pages | Reproducibility | Deploying | References

Last update: 2026-11-07
Started: 2026-11-07

The built-in application (PDF)
Abstract | Starting the application | The pages | Reproducibility | Deploying | References

Last update: 2026-11-07
Started: 2026-11-07

Unbalanced trials and environment-specific variances
Abstract | Missing plots and empty cells | The idea | An example | Environment-specific error variances | The model | The fit | Which variance model? | References

Last update: 2026-11-07
Started: 2026-11-07

Unbalanced trials and environment-specific variances (PDF)
Abstract | Missing plots and empty cells | Environment-specific error variances | Which variance model? | References

Last update: 2026-11-07
Started: 2026-11-07

Validation and corrections
Abstract | Corrections to version 0.3.0 | The tables agree with version 0.3.0 | The building blocks | The compiled sampler and the R reference | The stability sampler | The information criteria | Simulated data | The published analysis | References

Last update: 2026-11-07
Started: 2026-11-07

Validation and corrections (PDF)
Abstract | Corrections to version 0.3.0 | The tables agree with version 0.3.0 | The building blocks | The compiled sampler and the R reference | The stability sampler | The information criteria | Simulated data | The published analysis | References

Last update: 2026-11-07
Started: 2026-11-07

Readme and manuals

Help Manual

Help pageTopics
Posterior distributions of AMMI-based stability indicesbam_ammi_indices
Bayesian AMMI and GGE analysis in a web browserbam_app bam_app_object
References of a result or of the packagebam_cite
Compare Bayesian AMMI and GGE modelsbam_compare
Posterior distributions of classical stability indicesbam_indices
Interpretation of a Bayesian AMMI analysisbam_interpret format.bam_interpretation print.bam_interpretation
Notation of bayesammibam_notation
Posterior predictive checksbam_ppc
Predictions of every genotype-environment cellbam_predict
Prior distributions of the Bayesian AMMI modelbam_priors print.bam_priors
Posterior distribution of the ranks of the genotypesbam_ranks
Published values used by the tests and vignettesbam_reference
Save a figure (vector PDF by default)bam_save
Priors of the Bayesian stability modelsbam_stab_priors
Bayesian stability of the genotypesbam_stability
Probabilities of superior performance and stabilitybam_superiority
ggplot2 theme of bayesammibam_theme
Which genotype wins where: posterior probabilitiesbam_winners
The draws of a fit for posterior, bayesplot and codaas.mcmc.list.bam_bayes_ammi as_draws.bam_bayes_ammi as_draws_df.bam_bayes_ammi bam-draws
Methods for bayesammi resultsas.data.frame.bam_result as.data.table.bam_result bam-methods format.bam_result plot.bam_result print.bam_result print.summary.bam_result summary.bam_result
Bayesian estimation of the AMMI and GGE modelsbayes_ammi bayes_ammi.default
Bayesian stability analysis: Finlay-Wilkinson, Eberhart-Russell and Shukla modelsbayes_stability
Biplots with highest posterior density regionsbiplots biplots.default
Environment effectse_eff e_eff.default
Genotype effectsg_eff g_eff.default
Least-squares AMMI modelge_ammi ge_ammi.default
Genotype-by-environment interaction effectsge_eff ge_eff.default
Genotype-by-environment meansge_mean ge_mean.default
Linear mixed model of a multi-environment trialge_model ge_model.default
Genotype-by-environment variancesge_var ge_var.default
Maize multi-environment trialMaiz
Orthonormal contrast matrixmatrix_k matrix_k.default
Gram-Schmidt orthonormalisationorthnorm orthnorm.default