Published November 6, 2020 | Version 1.05
Software Open

Multivariate Ratio Analysis (MRA): R-scripts and tutorials for calculating Shape PCA, Ratio Spectra, and LDA Ratio Extractor

  • 1. Natuarl History Museum Bern, Bern, Switzerland
  • 2. Institute of Ecology and Evolution (IEE), University of Bern, Bern, Switzerland
  • 3. Université de Fribourg, Fribourg, Switzerland

Description

This package contains some R-scripts that allow the calculation of various morphometric methods published by Baur & Leuenberger (2011). Later these methods were addressed under the name "Multivariate Ratio Analysis" (MRA, see Baur et al. 2014). The scripts were originally provided by the authors in an electronic supplementary file together with the original paper, and later in slightly modified form also by Baur et al. (2014). However, it is our wish to publish them in a manner that they may be cited separately and also be updated when necessary.

The package contains the main scripts in two files:

Shape_PCA_vX.XX.R
LDA_Ratio_Extractor_vY.YY.R

Important note: In the script of the LDA Ratio Extractor the case for more than 2 groups is now also included. This case was described by Baur & Leuenberger (2011, p. 817), but was left out from the R-script originally published in Systematic Biology. We think that the implementation is a welcome addition to the entire set of methods provided by MRA.

For both scripts, separate tutorials are available:
Tutorial_1_ Shape_PCA.R
Tutorial_2_LDA_Ratio_Extractor.R

It is recommended to work through these brief tutorials, starting with the first one.

A dataset (from Baur et al. 2014) is supplied as well:
Anisopteromalus_data.csv

In order to avoid any troubles, make sure that all files are put into one and the same folder. RStudio is recommended for performing the R-scripts (especially for beginners).

PDFs of the two papers cited below are also provided in the package.

New tutorials: Additional tutorial are available from Baur, H. (2024, May 31). R-tutorials, datasets, and presentations from the workshop Morphometrics in Taxonomy (University of Bern). Zenodo. 10.5281/zenodo.11400348.  A further tutorial contrasts standard ordination methods with MRA in an exemplary way, see Baur (2025)  (full citation below).

Citation: You may use the citation of the package as indicated by Zenodo on this webpage. Do also cite the original paper by Baur & Leuenberger (2011, https://doi.org/10.1093/sysbio/syr061), as only this article contains the mathematical background and scientific context concerning the methods.

Contact: Hannes Baur, Natural History Museum Bern, Bernastrasse 15, 3005 Bern, Switzerland, Email: hannes.baur@nmbe.ch
Website: https://www.nmbe.ch/en/hannes.baur.

References: Cited references and some useful applications of the methods are listed below under References.

Notes

What is new in version 1.05

1. Minor change for controlling also "cex" in the plots generated by the ldaRE() function:

line 146
..., cexlegend=0.9), replaced by
..., cexlegend=1, cex=1)

line 239
..., cexlegend=cexlegend), replaced by
..., cexlegend=cexlegend, cex=cex)


2. Preventing possible issue related to the new way of handeling stringsAsFactors in R 4.0.0 and later (see https://developer.r-project.org/Blog/public/2020/02/16/stringsasfactors/)

line 148
..., g <- factor(g), replaced by
..., g <- as.factor(g)

Files

Anisopteromalus_data.csv

Files (4.3 MB)

Name Size Download all
md5:05260b438adcc5cbe75789dbd0425863
57.2 kB Preview Download
md5:5ad6a8b0d4ea75783388fc660fcc5fbc
293.2 kB Preview Download
md5:8abf761879bc8ba8464cf1cff87efbc2
3.9 MB Preview Download
md5:4fc9345f29a56980ab6bc0f27bd05053
6.7 kB Download
md5:d69c86afe44b84abc5b8f7bcd505a398
10.6 kB Download
md5:4315be45a7791f64b1b840438b17dbdd
17.3 kB Download
md5:273629251e4ce75218f67bd4e1fcd3f9
5.3 kB Download

Additional details

References

  • Baur H, Kranz-Baltensperger Y, Cruaud A, Rasplus J-Y, Timokhov AV, Gokhman VE (2014) Morphometric analysis and taxonomic revision of Anisopteromalus Ruschka (Hymenoptera: Chalcidoidea: Pteromalidae) - an integrative approach. Systematic Entomology 39: 691–709. https://doi.org/10.1111/syen.12081
  • Baur H (2025) Data resource and R-tutorials for morphometric methods for species recognition (1.00). Zenodo. https://doi.org/10.5281/zenodo.10505876 (March 25, 2025)
  • Baur H, Leuenberger C (2011) Analysis of ratios in multivariate morphometry. Systematic Biology 60: 813–825. https://doi.org/10.1093/sysbio/syr061
  • Huber C, Schnitter PH (2020) Nebria (Pseudonebriola) tsambagarav sp. nov., a new alpine species from the Mongolian Altai (Coleoptera, Carabidae). Alpine Entomology 4: 29–38. https://doi.org/10.3897/alpento.4.50408
  • Petrović TG, Vukov TD, Tomašević Kolarov N (2017) Morphometric ratio analyses: Locomotor mode in anurans. Comptes Rendus Biologies 340: 250–257. https://doi.org/10.1016/j.crvi.2017.02.004
  • R Core Team (2020). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/