rmodd_summary: Summarise a Numerical Vector with Control on Outlier Removal

Description Usage Arguments Details Value Author(s) Examples

Description

Summarise a numerical vector with control on how the outliers has to be treated.

Usage

1
rmodd_summary(x, rm = "FALSE", strict = "FALSE", cutoff = 80, n = 3)

Arguments

x

numerical vector

rm

if rm = "TRUE" outliers are omitted. If rm = "FALSE" all elements in the vector are considered for summarising

strict

if strict = "FALSE" outliers are omitted based on IQR rule. If strict = "TRUE" more aggressive outlier omitting method is used to bring CV below a cutoff value

cutoff

cv cutoff value for the aggressive outlier removal

n

minimum number of samples needed

Details

In IQR rule (ie when strict = "FALSE") those values above 'Q3 + 1.5 IQR' and those below 'Q1 - 1.5 IQR' is considered as outlier. For the aggressive outlier removal (ie when strict = "TRUE") those values above 90th percentile and below 10th percentile are removed consecutively till the cv fall below the 'cutoff' or only the minimum number of samples is leftover (whichever happens first halt the loop).

Value

A numeric vector of length 5 with the elements representing

mean

the average of samples

median

the median of samples

n

number of samples

sd

standard deviation of samples

cv

percentage cv of samples

Author(s)

A.A Palakkan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## data set x
x <- c(1.01,0.98,0.6,0.54,0.6,0.6,0.4,3)

## summarising without removing outliers
rmodd_summary(x, rm = "FALSE", strict= "FALSE", cutoff=80, n=3)

## summarising after removing outliers (IQR methord)
rmodd_summary(x, rm = "TRUE", strict= "FALSE", cutoff=20, n=5)

## summarising after removing outliers (Stringent to reduce cv)
rmodd_summary(x, rm = "TRUE", strict= "TRUE", cutoff=20, n=5)

bioassays documentation built on Oct. 23, 2020, 6:48 p.m.