plres2x {plgraphics}R Documentation

Plot Residuals vs. Two Explanatory Variables

Description

Plot 2 variables, showing a third one with line symbols. Most suitable for showing residuals of a model as this third variable.

Usage

plres2x(formula = NULL, reg = NULL, data = NULL, restrict = NULL,
  size = 1, xlab = NULL, ylab = NULL, pale = 0.2,
  plargs = NULL, ploptions = NULL, assign = TRUE, ...)

Arguments

formula

a formula of the form ~x+y, where x, y are the 2 variables shown by the coordinates of points, and residuals are shown by line symbols: their orientation corresponds to the sign of the residual, and their length, to the absolute value.

reg

the result of the model fit, from which the residuals are extracted

data

the data.frame where the variables are found. Only needed if the variable 'x' or 'y' is not available from the fitting results.

restrict

absolute value which truncates the size. if TRUE, the inner plotting limits of the residuals is used if available. Truncation is shown by stars at the end of the line symbols.

size

the symbols are scaled so that size*par("cin")[1] is the length of the largest symbol, as a percentage of the length of the horizontal axis.

xlab, ylab

labels for horizontal and vertical axes. Default to the variable names (or labels)

.

pale

scalar between 0 and 1: The points are shown in a more pale color than the segments as determined by colorpale with argument pale=pale.

plargs

result of calling pl.control. If NULL, pl.control will be called to generate it. If not null, arguments given in ... will be ignored.

ploptions

list of pl options.

assign

logical: Should the plargs be stored in the pl.envir environment?

...

further arguments, passed to plotregr.control

Value

none.

Author(s)

Werner A. Stahel and Andreas Ruckstuhl

Examples

  data(d.blast)
  t.r <- lm(log10(tremor)~location+log10(distance)+log10(charge),
            data=d.blast)
  plres2x(~distance+charge, t.r)

[Package plgraphics version 1.2 Index]