color.plot: Color Plot

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function color.plot plots the (two-dimensional) data using different symbols according to the robust mahalanobis distance based on the mcd estimator with adjustment and using different colors according to the euclidean distances of the observations.

Usage

1
color.plot(x, quan=1/2, alpha=0.025, ...)

Arguments

x

two dimensional 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).

...

additional graphical parameters

Details

The function color.plot plots the (two-dimensional) data using different symbols (see function symbol.plot) according to the robust mahalanobis distance based on the mcd estimator with adjustment and using different colors according to the euclidean distances of the observations. Blue is typical for a little distance, whereas red is the opposite. In addition four ellipsoids are drawn, on which mahalanobis distances are constant. These constant values correspond to the 25%, 50%, 75% and adjusted quantiles (see function arw) of the chi-square distribution (see Filzmoser et al., 2005).

Value

outliers

boolean vector of outliers

md

robust mahalanobis distances of the data

euclidean

euclidean distances of the observations according to the minimum of the data.

Author(s)

Moritz Gschwandtner <e0125439@student.tuwien.ac.at>
Peter Filzmoser <P.Filzmoser@tuwien.ac.at> http://cstat.tuwien.ac.at/filz/

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, dd.plot, arw

Examples

1
2
3
4
5
6
# create data:
x <- cbind(rnorm(100), rnorm(100))
y <- cbind(rnorm(10, 5, 1), rnorm(10, 5, 1))
z <- rbind(x,y)
# execute:
color.plot(z, quan=0.75)

Example output

Loading required package: sgeostat
sROC 0.1-2 loaded
$outliers
  [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [97] FALSE FALSE FALSE FALSE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE
[109]  TRUE  TRUE

$md
  [1] 1.91873957 0.57596939 1.62531836 0.76694755 1.80149670 1.24459150
  [7] 1.54259843 1.00339543 0.62514329 1.03295351 1.56377543 2.17077598
 [13] 1.14603735 0.66484170 1.46324480 1.24407619 0.45159941 0.51831402
 [19] 1.63393996 1.55978146 0.49891801 0.58705821 0.41035979 0.49151387
 [25] 0.33854603 1.35274767 0.38546145 1.45877492 2.05082069 1.97278671
 [31] 1.85457662 0.67810548 0.96494833 0.35722380 0.31428823 0.79355974
 [37] 1.34094771 0.49891561 0.81671142 1.09370701 0.36085454 0.64188020
 [43] 0.94083270 0.63380424 0.53563174 1.32264196 0.54728357 1.47262090
 [49] 0.87308191 2.30186752 1.22250535 1.41841580 2.45557619 1.27480752
 [55] 0.16927435 1.48226916 1.32309722 1.55423117 0.52344866 0.84308619
 [61] 1.24308038 1.03917945 2.12682460 1.31028618 0.87429087 0.68353419
 [67] 1.26450588 1.16991974 2.11842858 1.47462885 0.92697547 0.70193177
 [73] 1.10211266 1.85254535 0.90263153 1.16489244 0.34379964 0.81737914
 [79] 1.06576228 0.68259800 2.02435413 1.38200666 1.27444310 0.53436274
 [85] 1.35867406 0.77861262 0.79259504 1.09505798 0.56272548 1.02310863
 [91] 1.19204176 2.02686761 1.47607703 1.56532392 1.11159842 1.03664987
 [97] 0.09365574 0.56969897 1.40674450 1.25991540 5.66759731 7.03209868
[103] 6.61526232 5.14094843 5.87967349 5.05090876 6.94956850 6.75209239
[109] 5.60654755 5.99405475

$euclidean
  [1] 3.194185 2.787644 3.425492 1.978677 3.022456 1.645083 1.654202 2.820918
  [9] 2.635312 2.180300 1.707522 1.330502 2.165234 2.595509 2.049667 2.074192
 [17] 2.703732 2.592127 3.199642 1.780088 2.790450 2.848098 2.713789 2.397258
 [25] 2.352365 1.988821 2.706927 3.314987 2.691422 1.156501 2.977402 2.903495
 [33] 2.822269 2.674732 2.665667 2.898171 3.165935 2.428274 2.227455 1.738708
 [41] 2.670284 2.050160 2.994670 2.040579 2.353424 3.298934 2.715567 3.136273
 [49] 2.016607 3.318635 3.196215 2.523432 1.903399 3.304773 2.457533 2.002147
 [57] 1.588644 2.664879 2.115761 1.990920 3.246643 2.910377 3.854083 2.005089
 [65] 2.683075 2.039445 3.088418 1.819921 1.710863 3.338681 2.911611 2.402642
 [73] 2.971262 3.661870 3.043374 2.638083 2.687601 3.002518 2.373324 2.324057
 [81] 1.691867 3.292082 2.366762 2.718876 1.574234 2.037760 2.533727 1.780389
 [89] 2.225080 2.473430 3.154911 2.082139 2.623138 2.325608 3.191300 2.506679
 [97] 2.493554 2.243492 3.317394 3.085025 6.132753 7.119457 6.856274 5.881185
[105] 6.180919 5.813513 7.083912 6.847865 6.170767 6.277270

mvoutlier documentation built on July 30, 2021, 9:09 a.m.