PomaMultivariate: Multivariate Statistical Methods for Mass Spectrometry Data

Description Usage Arguments Value Author(s) Examples

View source: R/PomaMultivariate.R

Description

PomaMultivariate() allows users to perform different multivariate statistical analysis on MS data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
PomaMultivariate(
  data,
  method = "pca",
  components = 5,
  center = FALSE,
  scale = FALSE,
  labels = FALSE,
  load_length = 1,
  ellipse = TRUE,
  validation = "Mfold",
  folds = 5,
  nrepeat = 10,
  vip = 1.5,
  num_features = 10
)

Arguments

data

A MSnSet object. First pData column must be the subject group/type.

method

A multivariate method. Options are: "pca", "plsda" and "splsda".

components

Numeric. Number of components to include in the model. Default is 5.

center

Logical that indicates whether the variables should be shifted to be zero centered. Default is FALSE.

scale

Logical that indicates whether the variables should be scaled to have unit variance before the analysis takes place. Default is FALSE.

labels

Logical indicating if sample names should be plotted or not.

load_length

Numeric between 1 and 2. Define the length of biplot loadings. Default is 1.

ellipse

Logical that indicates whether a 95%CI ellipse should be plotted in scores plot. Default is TRUE.

validation

(Only for "plsda" and "splsda" methods) Validation method. Options are "Mfold" and "loo".

folds

(Only for "plsda" and "splsda" methods) Numeric. Number of folds for Mfold validation method (default is 5). If the validation method is loo, this value will become to 1.

nrepeat

(Only for "plsda" and "splsda" methods) Numeric. Number of iterations for the validation method selected.

vip

(Only for "plsda" method) Numeric indicating VIP cutoff to select features that will be displayed in vip plot.

num_features

(Only for "splsda" method) Numeric. Number of variables selected to discriminate groups.

Value

A list with all results for multivariate statistical analysis including plots and data frames.

Author(s)

Pol Castellano-Escuder

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data("st000336")

# PCA
st000336 %>% 
  PomaImpute() %>%
  PomaNorm() %>%
  PomaOutliers() %>%
  PomaMultivariate(method = "pca")

# PLSDA
st000336 %>% 
  PomaImpute() %>%
  PomaNorm() %>%
  PomaOutliers() %>%
  PomaMultivariate(method = "plsda", vip = 1)

# sPLSDA
st000336 %>% 
  PomaImpute() %>%
  PomaNorm() %>%
  PomaOutliers() %>%
  PomaMultivariate(method = "splsda")

POMA documentation built on Nov. 8, 2020, 6:26 p.m.