plotXYResiduals.pls {mdatools}R Documentation

Residual XY-distance plot

Description

Shows a plot with full X-distance (f) vs. orthogonal Y-distance (z) for PLS model results.

Usage

## S3 method for class 'pls'
plotXYResiduals(
  obj,
  ncomp = obj$ncomp.selected,
  norm = TRUE,
  log = FALSE,
  main = sprintf("XY-distances (ncomp = %d)", ncomp),
  cgroup = NULL,
  xlim = NULL,
  ylim = NULL,
  show.limits = c(TRUE, TRUE),
  lim.col = c("darkgray", "darkgray"),
  lim.lwd = c(1, 1),
  lim.lty = c(2, 3),
  show.legend = TRUE,
  legend.position = "topright",
  res = obj$res,
  ...
)

Arguments

obj

a PLS model (object of class pls)

ncomp

how many components to use (by default optimal value selected for the model will be used)

norm

logical, normalize distance values or not (see details)

log

logical, apply log tranformation to the distances or not (see details)

main

title for the plot

cgroup

color grouping of plot points (works only if one result object is available)

xlim

limits for x-axis

ylim

limits for y-axis

show.limits

vector with two logical values defining if limits for extreme and/or outliers must be shown

lim.col

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

lim.lwd

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

lim.lty

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

show.legend

logical, show or not a legend on the plot (needed if several result objects are available)

legend.position

position of legend (if shown)

res

list with result objects to show the plot for (by defaul, model results are used)

...

other plot parameters (see mdaplotg for details)

Details

The function presents a way to identify extreme objects and outliers based on both full distance for X-decomposition (known as f) and squared residual distance for Y-decomposition (z). The approach has been proposed in [1].

The plot is available only if data driven methods (classic or robust) have been used for computing of critical limits.

References

1. Rodionova O. Ye., Pomerantsev A. L. Detection of Outliers in Projection-Based Modeling. Analytical Chemistry (2020, in publish). doi: 10.1021/acs.analchem.9b04611


[Package mdatools version 0.14.1 Index]