Last updated: 2026-07-13

Checks: 2 0

Knit directory: nonlinear-ge-interaction-shap/

This reproducible R Markdown analysis was created with workflowr (version 1.7.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version a6fc1fc. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rproj.user/

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/about.Rmd) and HTML (docs/about.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd a6fc1fc WevertonGomesCosta 2026-07-13 Configure initial website and project documentation
Rmd 037bf18 WevertonGomesCosta 2026-07-13 Start workflowr project.

About This Project

Background

Multi-environment trials are used to evaluate the performance of genotypes across contrasting environmental conditions.

A relevant component of these trials is genotype-by-environment interaction, which occurs when genotypes present different response patterns across environments. The evaluation of this interaction supports the identification of productive, adapted, responsive, and stable genotypes.

Traditional approaches such as the Additive Main Effects and Multiplicative Interaction model use linear and multiplicative structures to describe genotype-by-environment interaction.

Tree-based machine learning algorithms provide an additional framework for modeling complex response patterns. Shapley Additive Explanations can then be used to decompose model predictions and quantify the contribution of the model features to individual predictions.

Tutorial objective

The objective of this tutorial is to present a reproducible analytical pipeline for evaluating genotype-by-environment interaction through:

  • tree-based machine learning;
  • Random Forest prediction;
  • SHAP decomposition;
  • AMMI analysis;
  • stability indices;
  • simultaneous selection;
  • genotype ranking;
  • methodological concordance.

The analytical sequence follows the methods and results presented in the associated manuscript.

Data set

The data set contains maize grain-yield observations collected from:

  • nine genotypes;
  • twenty environments;
  • four replicates per genotype-by-environment combination.

The complete experiment contains 720 observations.

The variables are:

Variable Description
ENV Environment identifier
GEN Genotype identifier
REP Replicate identifier
GY Grain yield in kilograms per hectare

Analytical organization

The reproducible analysis is organized sequentially into:

  1. computational setup;
  2. package loading;
  3. data import;
  4. data preparation;
  5. descriptive visualization;
  6. Random Forest fitting and validation;
  7. SHAP decomposition;
  8. AMMI decomposition;
  9. stability and selection indices;
  10. genotype ranking;
  11. rank concordance;
  12. correlation analysis.

The complete code is presented directly in the R Markdown analysis page. The organization prioritizes transparency and direct access to every analytical step.

Reproducibility framework

The project uses workflowr to integrate:

  • literate programming;
  • version control;
  • computational documentation;
  • reproducibility checks;
  • website publication.

Each published analysis page is connected to a specific Git commit, allowing the source code and rendered results to be tracked together.