Learn R Programming

modi (version 0.1.2)

EA.dist: Utility function for EAdet and EAimp

Description

Calculation of distances for EPIDEMIC Algorithm for multivariate outlier detection and imputation

Usage

EA.dist(
  data,
  n,
  p,
  weights,
  reach,
  transmission.function,
  power,
  distance.type,
  maxl
)

Arguments

data

a data frame or matrix with data.

n

number of rows.

p

number of columns.

weights

a vector of positive sampling weights.

reach

if reach = "max" the maximal nearest neighbor distance is used as the basis for the transmission function, otherwise the weighted

transmission.function

form of the transmission function of distance d: "step" is a heaviside function which jumps to 1 at d0, "linear" is linear between 0 and d0, "power" is (beta*d+1)^(-p) for p = ncol(data) as default, "root" is the function 1-(1-d/d0)^(1/maxl).

power

sets p = power.

distance.type

distance type in function dist().

maxl

maximum number of steps without infection.

Author

Beat Hulliger