Title: Analysis of Designed High-Dimensional Data using the Comprehensive MultANOVA Framework
Version: 1.0.1
Description: A comprehensive and computationally fast framework to analyze high dimensional data associated with an experimental design based on Multiple ANOVAs (MultANOVA). It includes testing the overall significance of terms in the model, post-hoc analyses of significant terms and variable selection. Details may be found in Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). <doi:10.1002/cem.70039>.
License: GPL (≥ 3)
Encoding: UTF-8
RoxygenNote: 7.3.2
Depends: R (≥ 4.0)
LazyData: false
Imports: ellipse, ggplot2, ggrepel, stats
NeedsCompilation: no
Packaged: 2025-08-26 08:52:09 UTC; benjamin.mahieu
Author: Benjamin Mahieu [aut, cre], Veronique Cariou [aut]
Maintainer: Benjamin Mahieu <benjamin.mahieu@oniris-nantes.fr>
Repository: CRAN
Date/Publication: 2025-09-01 09:50:12 UTC

MultANOVA: Analysis of Designed High-Dimensional Data using the Comprehensive MultANOVA Framework

Description

A comprehensive and computationally fast framework to analyze high dimensional data associated with an experimental design based on Multiple ANOVAs (MultANOVA). It includes testing the overall significance of terms in the model, post-hoc analyses of significant terms and variable selection. Details may be found in Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). doi:10.1002/cem.70039.

Author(s)

Maintainer: Benjamin Mahieu benjamin.mahieu@oniris-nantes.fr

Authors:

References

Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). doi:10.1002/cem.70039

See Also

MultANOVA

MultLSD

DCDA

FisherS


Diagonal Canonical Discriminant Analysis (DCDA)

Description

Performs the Diagonal Canonical Discriminant Analysis of a term from the model defined by formula as defined in Mahieu & Cariou (2025).

Usage

DCDA(formula, design, responses, term)

Arguments

formula

A formula with no left term that specify the model from the elements of the design argument.

design

A data.frame that contains only factors specifying the design on which rely the specified model of formula argument.

responses

A matrix or data.frame that contains only numerics or integers being the responses variables to be explained by the model from formula.

term

A character specifying the term from formula for which the MultLSD tests must be performed.

Value

Returns a list of the following elements:

scores

A data.frame giving the scores of the individuals of the diagonal canonical variates.

eigen

A matrix giving the eigenvalues, corresponding percentages of inertia and cumulative percentages of inertia of the DCDA.

level.coord

A matrix giving the coordinates of the levels of the term on the diagonal canonical variates.

var.coord

A matrix giving the coordinates of the variables of the on the diagonal canonical variates.

raw.coef

A matrix giving the raw diagonal canonical coefficients.

error

A list containing several information relative to the error. Most of this information are used to compute the approximate ellipses when calling plot.DCDA.

svd

Results of the svd of the weighted orthogonalized effect matrix of term.

References

Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). doi:10.1002/cem.70039

Dudoit, S., Fridlyand, J., & Speed, T. P. (2002). Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data. Journal of the American Statistical Association, 97(457), 77–87. doi:10.1198/016214502753479248

Examples

data(OTU)
acd=DCDA(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
lsd=MultLSD(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
fish=FisherS(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
plot(acd,axes = c(1,2),pair.comp = lsd,expansion.var = 1.5,select.var = which(fish[2,]<=0.05))

Variable-wise Type III Fisher tests

Description

Computes the variable-wise Type III Fisher tests of a term from the model defined by formula. This enables investigating the most discriminant variables for that term and possibly leads to variable selection.

Usage

FisherS(
  formula,
  design,
  responses,
  term,
  alpha = 0.05,
  graph = TRUE,
  size.graph = 2.25
)

Arguments

formula

A formula with no left term that specify the model from the elements of the design argument.

design

A data.frame that contains only factors specifying the design on which rely the specified model of formula argument.

responses

A matrix or data.frame that contains only numerics or integers being the responses variables to be explained by the model from formula.

term

A character specifying the term from formula for which the MultLSD tests must be performed.

alpha

The alpha risk to evaluate significance of the p-values of each Type III Fisher test. Variables will be colored differently according to their significance with graph=TRUE.

graph

A logical indicating whether or not variable-wise Type III Fisher statistics must be plotted together with their significance and average value.

size.graph

If graph=TRUE, the overall size of labels and titles.

Value

A matrix with two rows and as much columns as responses. The first row contains the Type III Fisher statistic and the second row contains the fdr correct p-value.

Examples

data(OTU)
fish=FisherS(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
print(fish)

Multiple ANOVAs (MultANOVA)

Description

Performs the MultANOVA omnibus test of each term from the model defined by formula as defined in Mahieu & Cariou (2025).

Usage

MultANOVA(formula, design, responses, graph = TRUE, size.graph = 2.25)

Arguments

formula

A formula with no left term that specify the model from the elements of the design argument.

design

A data.frame that contains only factors specifying the design on which rely the specified model of formula argument.

responses

A matrix or data.frame that contains only numerics or integers being the responses variables to be explained by the model from formula.

graph

A logical indicating whether or not multivariate type III r-squared by term must be plotted.

size.graph

If graph=TRUE, the overall size of labels and titles.

Value

An ANOVA-like table where each row corresponds to a term in the model or the residuals, the first column indicates the degrees of freedom, the second column corresponds to the multivariate type III r-squared and the third column corresponds to the p-value of the MultANOVA test.

References

Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). doi:10.1002/cem.70039

Examples

data(OTU)
an=MultANOVA(~Lot+Lactate+Atm+Time+Lactate:Atm+Lactate:Time,OTU[,1:4],OTU[,-c(1:4)])
print(an)

Multiple Least-Squares Difference tests (MultLSD)

Description

Performs the Multiple Least-Squares Difference tests of a term from the model defined by formula as defined in Mahieu & Cariou (2025).

Usage

MultLSD(formula, design, responses, tested.term)

Arguments

formula

A formula with no left term that specify the model from the elements of the design argument.

design

A data.frame that contains only factors specifying the design on which rely the specified model of formula argument.

responses

A matrix or data.frame that contains only numerics or integers being the responses variables to be explained by the model from formula.

tested.term

A character specifying the term from formula for which the MultLSD tests must be performed.

Value

A symmetric matrix having as rows and columns as there is levels of the tested.term and that contains the pairwise fdr corrected p-values of the MultLSD tests.

References

Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). doi:10.1002/cem.70039

Examples

data(OTU)
lsd=MultLSD(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
print(lsd)

OTU data

Description

Metagenomics data of example 1 from Mahieu & Cariou (2025)

Usage

data(OTU)

Format

An object of class data.frame with 80 rows and 89 columns.

References

Mahieu, B., & Cariou, V. (2025). MultANOVA Followed by Post Hoc Analyses for Designed High‐Dimensional Data: A Comprehensive Framework That Outperforms ASCA, rMANOVA, and VASCA. Journal of Chemometrics, 39(7). doi:10.1002/cem.70039

Poirier S, Luong N-DM, Anthoine V, et al. Large-scale multivariate dataset on the characterization of microbiota diversity, microbial growth dynamics, metabolic spoilage volatilome and sensorial profiles of two industrially produced meat products subjected to changes in lactate concentration and packaging atmosphere. Data Brief. 2020;30:105453. doi:10.1016/j.dib.2020.105453

Luong N-DM, Membré J-M, Coroller L, et al. Application of a path-modelling approach for deciphering causality relationships between microbiota, volatile organic compounds and off-odour profiles during meat spoilage. Int J Food Microbiol. 2021;348:109208. doi:10.1016/j.ijfoodmicro.2021.109208

Examples

data(OTU)

Plots for DCDA objects

Description

Plots results from DCDA with possible customizations from the different arguments.

Usage

## S3 method for class 'DCDA'
plot(
  x,
  axes = c(1, 2),
  pair.comp = NULL,
  alpha = 0.05,
  select.var = 1:nrow(x$var.coord),
  select.level = 1:nrow(x$level.coord),
  title = NULL,
  size = 2.25,
  expansion.var = 1.25,
  ...
)

Arguments

x

An object resulting from DCDA.

axes

Which dimensions should be plotted?

pair.comp

An optional objects resulting from MultLSD. When provided, no discriminated modalities of the factor at the alpha risk will linked on the plot.

alpha

The alpha risk to determine evaluate significance of the p-values from pair.comp.

select.var

The indices of the variables to be plotted. By default all variables are plotted.

select.level

The indices of the levels of the term to be plotted. By default all levels of the term are plotted.

title

An optional character specifying a title for the plot.

size

The overall size of labels, points, etc.

expansion.var

The factor of expansion applied to variables coordinates to increase readability

...

further arguments passed to or from other methods.

Value

The required plot.

Examples

data(OTU)
acd=DCDA(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
lsd=MultLSD(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
fish=FisherS(~Lot+Atm+Time,OTU[,1:4],OTU[,-c(1:4)],"Time")
plot(acd,axes = c(1,2),pair.comp = lsd,expansion.var = 1.5,select.var = which(fish[2,]<=0.05))