ChangePointEstimator: A function to identify the time of a change in the mean or...

Description Usage Arguments Value Examples

View source: R/ChangePointEstimator.R

Description

A function to identify the time of a change in the mean or variability of a metric

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ChangePointEstimator(
  data = NULL,
  peptide,
  L = 1,
  U = 5,
  metric,
  normalization = TRUE,
  ytitle = "Change Point Plot - mean",
  type = "mean",
  selectMean = NULL,
  selectSD = NULL
)

Arguments

data

comma-separated (.csv), metric file. It should contain a "Precursor" column and the metrics columns. It should also include "Annotations" for each observation.

peptide

the name of precursor of interest.

L

Lower bound of the guide set.

U

Upper bound of the guide set.

metric

the name of metric of interest.

normalization

TRUE metric is standardized and FALSE if not standardized.

ytitle

the y-axis title of the plot. Defaults to "Change Point Plot - mean". The x-axis title is by default "QCno-name of peptide"

type

the type of the control chart. Two values can be assigned, "mean" or "variability". Default is "mean".

selectMean

the mean of a metric. It is used when mean is known. It is NULL when mean is not known. The default is NULL.

selectSD

the standard deviation of a metric. It is used when standard deviation is known. It is NULL when mean is not known. The default is NULL.

Value

A plot of likelihood statistics versus time per peptide and metric generated from CP.data.prepare data frame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# First process the data to make sure it's ready to use
sampleData <- DataProcess(S9Site54)
head(sampleData)
# Find the name of the peptides
levels(sampleData$Precursor)
# Calculate change point statistics
ChangePointEstimator(data = sampleData, peptide = "VLVLDTDYK", metric = "BestRetentionTime")
ChangePointEstimator(data = sampleData, peptide = "VLVLDTDYK", metric = "BestRetentionTime",
                     ytitle = "Change Point Plot - variability", type = "variability")
ChangePointEstimator(data = sampleData, peptide = "VLVLDTDYK", metric = "BestRetentionTime",
                     selectMean = 27.78, selectSD = 8.19)
ChangePointEstimator(data = sampleData, peptide = "DDGSWEVIEGYR", metric = "TotalArea")
ChangePointEstimator(data = sampleData, peptide = "DDGSWEVIEGYR", metric = "TotalArea",
                     selectMean = 35097129, selectSD = 34132861)
ChangePointEstimator(data = sampleData, peptide = "TAAYVNAIEK", metric = "MaxFWHM")

MSstatsQC documentation built on Nov. 8, 2020, 5:30 p.m.