Learn R Programming

mvoutlier (version 2.1.1)

map.plot: Plot Multivariate Outliers in a Map

Description

The function map.plot creates a map using geographical (x,y)-coordinates. This is thought for spatially dependent data of which coordinates are available. Multivariate outliers are marked.

Usage

map.plot(coord, data, quan=1/2, alpha=0.025, symb=FALSE, plotmap=TRUE, 
    map="kola.background",which.map=c(1,2,3,4),map.col=c(5,1,3,4),
    map.lwd=c(2,1,2,1), ... )

Arguments

coord

(x,y)-coordinates of the data

data

matrix or data.frame containing the data.

quan

amount of observations which are used for mcd estimations. has to be between 0.5 and 1, default ist 0.5

alpha

amount of observations used for calculating the adjusted quantile (see function arw).

symb

logical for plotting special symbols (see details).

plotmap

logical for plotting the background map.

map

see plot.kola.background()

which.map

see plot.kola.background()

map.col

see plot.kola.background()

map.lwd

see plot.kola.background()

...

additional graphical parameters

Value

outliers

boolean vector of outliers

md

robust mahalanobis distances of the data

euclidean

(only if symb=TRUE) euclidean distances of the observations according to the minimum of the data.

Details

The function map.plot shows mutlivariate outliers in a map. If symb=FALSE (default), only two colors and no special symbols are used to mark multivariate outliers (the outliers are marked red). If symb=TRUE different symbols and colors are used. The symbols (cross means big value, circle means little value) are selected according to the robust mahalanobis distance based on the adjusted mcd estimator (see function symbol.plot) Different colors (red means big value, blue means little value) according to the euclidean distances of the observations (see function color.plot) are used. For details see Filzmoser et al. (2005).

References

P. Filzmoser, R.G. Garrett, and C. Reimann. Multivariate outlier detection in exploration geochemistry. Computers & Geosciences, 31:579-587, 2005.

See Also

symbol.plot, color.plot, arw

Examples

Run this code
# NOT RUN {
data(humus) # Load humus data
xy <- humus[,c("XCOO","YCOO")] # X and Y Coordinates
myhumus <- log(humus[, c("As", "Cd", "Co", "Cu", "Mg", "Pb", "Zn")])
map.plot(xy, myhumus, symb=TRUE)
# }

Run the code above in your browser using DataLab