Learn R Programming

MetStaT (version 1.0)

ASCA.Calculate: ASCA method (ANOVA-simultaneous component analysis)

Description

ASCA does PCA on the averages of the treatment levels for an experimental design.

Usage

ASCA.Calculate(data, levels, equation.elements = "", scaling = FALSE, 
only.means.matrix = FALSE, use.previous.asca = NULL)

Arguments

data
numeric data matrix that is to be analyzed with ASCA. Variables are represented by columns, observations by rows.
levels
numeric matrix describing the experimental design. Each factor is represented by a column. The elements of the columns give the treatment level the row belongs to.
equation.elements
a string value indicating which factors and interactions are to be part of the ASCA analysis. A factor is defined by writing its column number in the 'levels' matrix (eg. "1") and an interaction by combining the interacting factors' column numbers from th
scaling
boolean; determines autoscaling of the data. Default is FALSE, data is not auto-scaled.
only.means.matrix
boolean; if TRUE, only the matrix with averages for the treatment levels is returned. Default is FALSE. (Note: this is generally only used for performance optimization during many runs, such as permutation testing)
use.previous.asca
previous ASCA results can be used for some calculations that are independent of the data values. Useful for permutation testing. Default is NULL, do not use previous results.

Value

  • PerformAsca returns a list with the following components:
  • dataoriginal data matrix.
  • levelsoriginal matrix with treatment levels.
  • svdan SVD performed on all elements in "equation.elements" using this package's custom PCA.Calculate.
  • remainderresidual matrix.
  • ee.namesstring array containing the factors and interactions that were used in this ASCA (i.e. "equation.elements")
  • factors.evaluatednumerical array of the relevant factor (or multiple factors for an interactions)
  • level.combinationscontains all information on which combinations of factor-levels occur in the data (row.patterns) and, for each combination, lists the row-indices where it occurs
  • means.matrixthe matrix with means of the treatment levels
  • reduced.matrixvalues left after the (already reduced by previously calculated factors/interactions). The data matrix is reduced by this factor/interaction's means matrix
  • svda SVD performed on this factor/interaction's means matrix using PCA.Calculate

Details

ASCA decomposes a data matrix X in effect matrices A, B, ... containing the level averages for each treatment level, interaction matrices U, V, ... between two or more factors and a residual matrix E with data that is not represented by the model: X = A + B + ... + U + V + ... + E. Principal component analysis is then used as a variable reduction method on each of the effect and interaction matrices. Scores, loadings and singular values for each factor and each interaction are returned.

References

Smilde AK, Jansen JJ, Hoefsloot HCJ, Lamers R JAN, van der Greef J, Timmerman ME. ANOVA simultaneous component analysis (ASCA): a new tool for analyzing designed metabolomics data. Bioinformatics 21, (2005), p. 3043 - 3048. Gooitzen Zwanenburg, Huub C.J. Hoefsloot, Johan A. Westerhuis, Jeroen J. Jansen and Age K. Smilde, ANOVA principal component analysis and ANOVA simultaneous component analysis: a comparison. J Chemometrics, 25, (2011), p. 561 - 567

See Also

ASCA.DoPermutationTest, PCA.Calculate

Examples

Run this code
## use the data matrix, 'ASCAX', and an experimental design matrix, 'ASCAF'
data(ASCAdata)
ASCA <- ASCA.Calculate(ASCAX, ASCAF, equation.elements = "1,2,12", scaling = FALSE)

## plot the results
ASCA.Plot(ASCA)

Run the code above in your browser using DataLab