Learn R Programming

mdatools (version 0.8.2)

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, main = NULL, xlab = "T2",
  ylab = "Squared residual distance (Q)", show.labels = F,
  show.legend = T, show.limits = T, cgroup = NULL, ...)

Arguments

obj

a PCA model (object of class pca)

ncomp

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

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

cgroup

a vector with numeric values or a factor for color grouping of plot points.

...

other plot parameters (see mdaplotg for details)

Details

See examples in help for pca function.