plotXResiduals.pls: Residual distance plot for decomposition of X data

Description Usage Arguments Details

View source: R/pls.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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.


mdatools documentation built on Sept. 13, 2021, 9:07 a.m.