Learn R Programming

mdatools (version 0.9.1)

plotResiduals.pca: Residuals plot for PCA

Description

Shows a plot with Q residuals vs. Hotelling T2 values for selected number of components.

Usage

# S3 method for pca
plotResiduals(obj, ncomp = NULL, norm = F, main = NULL,
  xlab = NULL, ylab = NULL, show.labels = F, show.legend = T,
  show.limits = T, xlim = NULL, ylim = NULL, lim.col = c("#333333",
  "#333333"), lim.lwd = c(1, 1), lim.lty = c(2, 3), ...)

Arguments

obj

a PCA model (object of class pca)

ncomp

how many components to use (if NULL - user selected optimal value will be used)

norm

logical, show normalized Q vs T2 (norm = T) values or original ones (norm = F)

main

main title for the plot

xlab

label for x axis

ylab

label for y axis

show.labels

logical, show or not labels for the plot objects

show.legend

logical, show or not a legend on the plot

show.limits

logical, show or not lines with statistical limits for the residuals

xlim

limits for x-axis

ylim

limits for y-axis

lim.col

vector with two values - line color for extreme and outlier borders

lim.lwd

vector with two values - line width for extreme and outlier borders

lim.lty

vector with two values - line type for extreme and outlier borders

...

other plot parameters (see mdaplotg for details)

Details

See examples in help for pca function.