plotXResiduals.pls {mdatools}R Documentation

Residual distance plot for decomposition of X data

Description

Shows a plot with orthogonal distance vs score distance for PLS decomposition of X data.

Usage

## S3 method for class 'pls'
plotXResiduals(
  obj,
  ncomp = obj$ncomp.selected,
  norm = TRUE,
  log = FALSE,
  main = sprintf("X-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 is almost identical to plotResiduals.pca.


[Package mdatools version 0.14.1 Index]