Learn R Programming

PairedData (version 0.5)

winvar: Winsorized variance

Description

Compute the Winsorized variance for the data in the vector x. tr is the amount of Winsorization which defaults to .2. (from Wilcox, 2005)

Usage

winvar(x,tr=.2,na.rm=FALSE)

Arguments

x
Sample data
tr
Percentage of trimming
na.rm
Missing values

Value

  • The winsorized variance

References

Wilcox, R.R. (2005). Introduction to robust estimation and hypothesis testing. Academic Press.

See Also

var

Examples

Run this code
x<-rnorm(20)
winvar(x)
sqrt(winvar(x))/0.6421

Run the code above in your browser using DataLab