outlier_dataset: Replace outliers in columns of a data set with 'NA'

View source: R/deepOutlier.r

outlier_datasetR Documentation

Replace outliers in columns of a data set with NA

Description

Replace outliers in columns of a data set with NA

Usage

outlier_dataset(
  dataset,
  columns = NULL,
  type = c("iqr", "mean", "median"),
  ...
)

Arguments

dataset

A data set, usually a data frame.

columns

The names or indices of the columns whose outlier values are to be replaced; if NULL (default), all corresponding columns are examined.

type

The type of outlier definition and detection. iqr refers to the method of Tukey (1977). mean denotes maximum likelihood estimation. median denotes scaled median absolute deviation.

...

Dependent on type. For iqr the constant k can be specified, otherwise it's value is 1.5. For mean the constant k can be specified, otherwise it's value is 3. For median the constant k can be specified, otherwise it's value is 3.

Value

The dataset with replaced outliers.

See Also

outlier.

Other Outlier: outlier(), winsorize()


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.