Mandala for R
Purpose-built mixed model analysis for breeding programs, simplified for R.
Why Mandala?
Field Trial Focus
Purpose-built for agricultural experiments. Supports RCBD, alpha-lattice, row-column, and multi-environment trial designs out of the box.
Spatial Analysis
AR1×AR1 correlation structures and P-spline smoothing (pspline2D) with interactive variogram diagnostics for field heterogeneity.
Simple Syntax
Clean, intuitive formula interface. Specify fixed and random effects clearly—no steep learning curve required.
Heritability & BLUPs
Unified heritability estimates (Cullis, Piepho methods) and easy extraction of BLUPs/BLUEs for selection decisions.
Genomic Prediction
GBLUP with relationship matrices via GM(), cross-validation workflows, and high-level mandala_gp() wrapper for genomic selection.
Factor-Analytic G×E
Model complex genotype-by-environment interactions with FA() models, biplots, environment correlations, and reliability estimates.
Quick Start
Request free access from Listo Agriculture:
# Mandala is distributed directly by Listo Agriculture.
# 1. Request free access at https://listoagriculture.com/products
# 2. You will receive an email with installation instructions
# 3. Follow the emailed instructions to install from the Listo repositoryAnalyze a field trial in just a few lines:
library(mandala)
# Fit a Randomized Complete Block Design
model <- mandala(
fixed = yield ~ genotype,
random = ~ block,
data = field_data
)
# View variance components
summary(model)$varcomp
# Get heritability estimates
h2 <- h2_estimates(random_mod = model_random,
fixed_mod = model,
genotype = "genotype")
# Extract BLUEs for selection
blues <- model$BLUEsSupported Experimental Designs
RCBD
Randomized Complete Block Design with genotypes as fixed effects and blocks as random.
Alpha-Lattice
Incomplete block designs with nested blocking structure for large germplasm sets.
Row-Column
Resolvable designs accounting for both row and column effects in field layouts.
Multi-Environment
Analyze G×E with diagonal, FA, or heterogeneous variance structures across locations.
Spatial Models
AR1×AR1 correlation and P-spline (pspline2D) smoothing with variogram diagnostics.
Genomic Selection
GBLUP with relationship matrices, cross-validation, and two-stage genomic workflows.
Package Comparison
Wondering which package to use? Here’s how Mandala compares:
| Feature | Mandala | Sommer | lme4 | SpATS |
|---|---|---|---|---|
| Field trial focus | ✓✓✓ | ✓✓ | ✓ | ✓✓✓ |
| Spatial models | ✓✓✓ | ✓✓✓ | ○ | ✓✓✓ |
| P-spline spatial | ✓✓✓ | ✓✓ | ○ | ✓✓✓ |
| Genomic selection | ✓✓✓ | ✓✓✓ | ○ | ○ |
| Built-in two-stage workflow | ✓✓✓ | ✓ | ○ | ○ |
| Factor-analytic G×E | ✓✓✓ | ✓✓ | ○ | ○ |
| General purpose | ✓ | ✓✓ | ✓✓✓ | ✓ |
| Ease of use | ✓✓✓ | ✓✓ | ✓✓ | ✓✓✓ |
| Multi-trait (multivariate) | ○ | ✓✓✓ | ○ | ○ |
| Speed (typical trials) | ✓✓✓ | ✓✓ | ✓✓✓ | ✓✓ |
✓✓✓ = Excellent | ✓✓ = Good | ✓ = Basic | ○ = Limited
Use Mandala when:
- Analyzing standard field trial designs
- Spatial modeling (AR1 or P-spline)
- Genomic prediction (GBLUP) workflows
- Factor-analytic G×E analysis
- Multi-environment trial analysis
- Two-stage workflow with uncertainty propagation
Consider alternatives when:
- Multi-trait analysis (→ sommer)
- General mixed models outside agriculture (→ lme4)
- Need maximum flexibility (→ lme4/sommer)
- Already invested in SpATS workflows (→ SpATS)
Learn More
Introduction to Mandala
Installation, key features, and your first analysis
Working with Example Datasets
RCBD, alpha-lattice, and multi-environment trial examples
Comparison with Sommer
Side-by-side analysis for quantitative genetics applications
Comparison with lme4
When to use Mandala vs general-purpose mixed models
Comparison with SpATS
P-spline spatial analysis and variogram diagnostics
About
Mandala is developed by Listo Agriculture, a software company specializing in tools for plant and animal breeding programs.
Mandala is free to use for any lawful purpose, including commercial use, with no restrictions on outputs. See the full Mandala License for details.
If you use Mandala in your research, please cite:
Bhoja R. Basnet (2025). mandala: Mixed Models with Modular G/R Structures.
R package version 1.0.1. https://listoagriculture.com/products
