psych (version 1.0-42)

winsor: Find the Winsorized mean for a vector, matrix, or data.frame

Description

Among the robust estimates of central tendency are trimmed means and Winsorized means. This function finds the Winsorized mean. The top and bottom trim values are given values of the trimmed and 1- trimmed quantiles. Then means are found.

Usage

winsor(x, trim = 0.2, na.rm = TRUE)

Arguments

x
A data vector, matrix or data frame
trim
Percentage of data to move from the top and bottom of the distributions
na.rm
Missing data are removed

Value

  • A scalar or vector winsorized means

Details

Among the many robust estimates of central tendency, some recommend the Winsorized mean. Rather than just dropping the top and bottom trim percent, these extreme values are replaced with values at the trim and 1- trim quantiles.

References

Wilcox, Rand R. (2005) Introduction to robust estimation and hypothesis testing. Elsevier/Academic Press. Amsterdam ; Boston.

See Also

interp.median

Examples

Run this code
data(sat.act)
winsor(sat.act)

Run the code above in your browser using DataLab