sel.plot: Scatterplot with information about outliers and influential...

Description Usage Arguments Details Examples

View source: R/sel.plot.R

Description

In addition to a standard scatterplot, outliers and influential errors are highlighted.

Usage

1
2
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 data[,vars] are plotted

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 n.identify is equal 0 the graphic is saved in a jpeg file. If n.identify is greater than 0 data rows corresponding selected points are saved in a csv file

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

1
2
3
4
5
6
7
8
9
    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)
    

SeleMix documentation built on Nov. 29, 2020, 9:09 a.m.

Related to sel.plot in SeleMix...