colWins: Winsorise per column

Description Usage Arguments Value Author(s) Examples

View source: R/wins.R

Description

Winsorise per column to either a percentage or number of observations.

Usage

1
colWins(x, p=0.05)

Arguments

x

Array/matrix to be winsorised.

p

Percentage or number of observations to be winsorised. If value is <1 then it is used as a percentages. Otheriwse it is the number of observations to winsorise. If the resulting p > floor((length(x)-1)/2) then it is set equal to floor((length(x)-1)/2).

Value

x.out

Winsorised array/matrix.

Author(s)

Nikolaos Kourentzes

Examples

1
2
x <- matrix(rnorm(10*20,mean=0,sd=1),10,20) 
x.out <- colWins(x)

trnnick/TStools documentation built on Aug. 12, 2018, 4:31 a.m.