Hi All,
I want to take a matrix (or data frame) and winsorize each variable.
So I can, for example, correlate the winsorized variables.
The code below will winsorize a single vector, but when applied to
several vectors, each ends up sorted independently in ascending order
so that a given
Might work better to determine top and bottom for each column with
quantile() using an appropriate quantile option, and then process
each variable in place with your ifelse logic.
I did find a somewhat different definition of winsorization with no
sorting in this code copied from a
-project.org
Subject: [R] Winsorizing Multiple Variables
Hi All,
I want to take a matrix (or data frame) and winsorize each variable.
So I can, for example, correlate the winsorized variables.
The code below will winsorize a single vector, but when applied to
several vectors, each ends up sorted
-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Karl Healey
Sent: Friday, January 16, 2009 2:51 PM
To: r-help@r-project.org
Subject: [R] Winsorizing Multiple Variables
Hi All,
I want to take a matrix (or data frame) and winsorize each variable.
So I can, for example, correlate
4 matches
Mail list logo