sel.plot {SeleMix} | R Documentation |
Scatterplot with information about outliers and influential errors
Description
In addition to a standard scatterplot, outliers and influential errors are highlighted.
Usage
sel.plot (data, vars=1:2, outl = rep(0, nrow(data)), sel = rep(0, nrow(data)),
log = TRUE, n.identify=0, file=NULL, title=NULL)
Arguments
data |
named matrix or data frame containing at least the coordinates of points |
vars |
vector with the names or column numbers of the two variables to plot |
outl |
vector identifying outliers (1 or TRUE means outlier) |
sel |
vector identifying influential errors (1 or TRUE means influential error) |
log |
if TRUE logarithm of |
n.identify |
number of points to be identified on the scattrerplot. Corresponding data are printed on console or file (if a file name is specified) |
file |
name of the output file. If |
title |
an overall title for the plot |
Details
The scatterplot contains the first varaible plotted against the second. Outliers are represented as blue circles, influential errors as red circles and points that are both outlier and influential error as cyan circles.
Examples
data(ex2.data)
par.joint <- ml.est(y=ex2.data)
sel <- sel.edit(y=ex2.data, ypred=par.joint$ypred)
sel.plot(ex2.data,outl=par.joint$outlier, sel=sel[,"sel"], title="EXAMPLE 2")
## Not run:
sel.plot(ex2.data,outl=par.joint$outlier, sel=sel[,"sel"], title="EXAMPLE 2", n.identify=3)
## End(Not run)