QC_PCA {MWASTools} | R Documentation

## Principal Component Analysis

### Description

This function performs PCA on a matrix of metabolic data and returns the results as an object of class "prcomp". When quality control (QC) samples are available, "QC_PCA()" can be used to assess the stability and reproducibility of the dataset.

### Usage

    QC_PCA (metabo_SE, scale = FALSE, center = TRUE,...)

### Arguments

`metabo_SE` | SummarizedExperiment object. See "MWAS_SummarizedExperiment()".
`scale` | logical constant indicating whether the metabolic variables will be scaled to have unit variance before the analysis. For more details, check "prcomp()".
`center` | logical constant indicating whether the metabolic variables will be shifted to be zero-centered before the analysis. For more details, check "prcomp()".
`...` | other arguments passed to "prcomp()".

### Value

A list with class "prcomp". For more details, check "prcomp()".

### References

Mardia K, et al. (1979). Multivariate Analysis, London: Academic Press.

### Examples

    ## Load data
    data(metabo_SE)
    data(targetMetabo_SE)

    ## PCA model using all metabolic data
    PCA_model <- QC_PCA (metabo_SE)

    ## PCA model using target metabolites
    PCA_subset <- QC_PCA (targetMetabo_SE)

[Package MWASTools version 1.16.0 Index]