Learn R Programming

asbio (version 1.9-7)

win: Winsorize data

Description

Winsorizes the proportion of ordered data given by lambda from each tail.

Usage

win(x, lambda = 0.2)

Value

Returns Winsorized data.

Arguments

x

A vector of data.

lambda

A proportion from 0-1 giving the amount of data to be Winsorized in each tail of an ordered dataset.

Author

Ken Aho

Details

In Winsorization we we replace responses that are not in the central \(1 - 2\lambda\) part of an ordered sample with the minimum and maximum responses of the central part of the sample.

References

Wilcox, R. R. (2005) Introduction to Robust Estimation and Hypothesis Testing, Second Edition. Elsevier, Burlington, MA.

Examples

Run this code
x<-c(2,1,4,5,6,2.4,7,2.2,.002,15,17,.001)
win(x)

Run the code above in your browser using DataLab