modelBasedQCPlots: Visualization for model-based quality control in fitting...

Description Usage Arguments Details Author(s) References Examples

View source: R/GroupComparison.R View source: R/modelBasedQCPlots.R

Description

To check the assumption of linear model for whole plot inference, modelBasedQCPlots takes the results after fitting models from function (groupComparison) as input and automatically generate two types of figures in pdf files as output : (1) normal quantile-quantile plot (specify "QQPlot" in option type) for checking normally distributed errors.; (2) residual plot (specify "ResidualPlot" in option type).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
modelBasedQCPlots(data,
                  type,
                  axis.size=10,
                  dot.size=3,
                  text.size=7,
                  legend.size=7,
                  width=10, 
                  height=10,
                  address="")

Arguments

data

output from function groupComparison.

type

choice of visualization. "QQPlots" represents normal quantile-quantile plot for each protein after fitting models. "ResidualPlots" represents a plot of residuals versus fitted values for each protein in the dataset.

axis.size

size of axes labels. Default is 10.

dot.size

size of points in the graph for residual plots and QQ plots. Default is 3.

text.size

size of labeling for feature names only in normal quantile-quantile plots separately for each feature. Default is 7.

legend.size

size of legend for feature names only in residual plots. Default is 7.

width

width of the saved file. Default is 10.

height

height of the saved file. Default is 10.

address

the name of folder that will store the results. Default folder is the current working directory. The other assigned folder has to be existed under the current working directory. If type="residualPlots" or "QQPlots", "ResidualPlots.pdf" or "QQPlots.plf" will be generated. The command address can help to specify where to store the file as well as how to modify the beginning of the file name. If address=FALSE, plot will be not saved as pdf file but showed in window.

Details

Results based on statistical models for whole plot level inference are accurate as long as the assumptions of the model are met. The model assumes that the measurement errors are normally distributed with mean 0 and constant variance. The assumption of a constant variance can be checked by examining the residuals from the model.

The input of this function is the result from function (groupComparison).

Author(s)

Ching-Yun Chang, Meena Choi, Olga Vitek.

Maintainer: Meena Choi (mnchoi67@gmail.com)

References

Ching-Yun Chang, Paola Picotti, Ruth Huttenhain, Viola Heinzelmann-Schwarz, Marko Jovanovic, Ruedi Aebersold, Olga Vitek. "Protein significance analysis in selected reaction monitoring (SRM) measurements." Molecular & Cellular Proteomics, 11:M111.014662, 2012.

Timothy Clough, Safia Thaminy, Susanne Ragg, Ruedi Aebersold, Olga Vitek. "Statistical protein quantification and significance analysis in label-free LC-M experiments with complex designs" BMC Bioinformatics, 13:S16, 2012.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
QuantData <- dataProcess(SRMRawData)
head(QuantData$ProcessedData)

levels(QuantData$ProcessedData$GROUP_ORIGINAL)
comparison <- matrix(c(-1,0,0,0,0,0,1,0,0,0),nrow=1)
row.names(comparison) <- "T7-T1"

# Tests for differentially abundant proteins with models:
# label-based SRM experiment with expanded scope of biological replication.

testResultOneComparison <- groupComparison(contrast.matrix=comparison, data=QuantData)

# normal quantile-quantile plots
modelBasedQCPlots(data=testResultOneComparison, type="QQPlots", address="")

# residual plots
modelBasedQCPlots(data=testResultOneComparison, type="ResidualPlots", address="")

lindsaypino/MSstats-patch documentation built on May 24, 2019, 6 p.m.