aout.laplace: Find alpha-outliers in Laplace / double exponential data

Description Usage Arguments Value Author(s) References Examples

View source: R/aout.laplace.R

Description

Given the parameters of a Laplace distribution, aout.laplace identifies α-outliers in a given data set.

Usage

1
aout.laplace(data, param, alpha = 0.1, hide.outliers = FALSE)

Arguments

data

a vector. The data set to be examined.

param

a vector. Contains the parameters of the Laplace distribution: μ, σ.

alpha

an atomic vector. Determines the maximum amount of probability mass the outlier region may contain. Defaults to 0.1.

hide.outliers

boolean. Returns the outlier-free data if set to TRUE. Defaults to FALSE.

Value

Data frame of the input data and an index named is.outlier that flags the outliers with TRUE. If hide.outliers is set to TRUE, a simple vector of the outlier-free data.

Author(s)

A. Rehage

References

Dumonceaux, R.; Antle, C. E. (1973) Discrimination between the log-normal and the Weibull distributions. Technometrics, 15 (4), 923-926.

Gather, U.; Kuhnt, S.; Pawlitschko, J. (2003) Concepts of outlyingness for various data structures. In J. C. Misra (Ed.): Industrial Mathematics and Statistics. New Delhi: Narosa Publishing House, 545-585.

Examples

1
2
3
4
# Using the flood data from Dumonceaux and Antle (1973):
temp <- c(0.265, 0.269, 0.297, 0.315, 0.3225, 0.338, 0.379, 0.380, 0.392, 0.402,
         0.412, 0.416, 0.418, 0.423, 0.449, 0.484, 0.494, 0.613, 0.654, 0.74)
aout.laplace(temp, c(median(temp), median(abs(temp - median(temp)))), 0.05)

Example output

Loading required package: Rsolnp
Loading required package: nleqslv
Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

     data is.outlier
1  0.2650      FALSE
2  0.2690      FALSE
3  0.2970      FALSE
4  0.3150      FALSE
5  0.3225      FALSE
6  0.3380      FALSE
7  0.3790      FALSE
8  0.3800      FALSE
9  0.3920      FALSE
10 0.4020      FALSE
11 0.4120      FALSE
12 0.4160      FALSE
13 0.4180      FALSE
14 0.4230      FALSE
15 0.4490      FALSE
16 0.4840      FALSE
17 0.4940      FALSE
18 0.6130      FALSE
19 0.6540       TRUE
20 0.7400       TRUE

alphaOutlier documentation built on May 2, 2019, 3:59 p.m.