Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu Show menu

WINSORIZE matrix function


WINSORIZE(A,k) returns a matrix with column-wise winsorized values. If the matrix A is a vector or a row matrix (the matrix contains one single row), winsorization is row-wise.

Winsorizing is a process where a defined number of the smallest and largest values are replaced by less extreme values.

If k is equal to or larger than 1 then k will be taken as the number of cases to winsorize at each side (if k=1 then 2 cases will be winsorized in total).

If k is smaller than 1 then k will be taken as a proportion and n×k cases will be winsorized at each side.

For example, when k = 2 and the number of observations is 10, then winsorization sets all observations less than the 3rd (sorted) observation equal to the 3rd observation and all observations larger than the 8th observation equal to the 8th observation.



See also