This function will perform a binarizing transformation, which
could be used as a last resort if the data cannot be adequately normalized.
This may be useful when accidentally attempting normalization of a binary
vector (which could occur if implementing bestNormalize in an automated
fashion).
Note that the transformation is not one-to-one, in contrast to the other
functions in this package.
which location measure should be used? can either be
"median", "mean", "mode", a number, or a function.
object
an object of class 'binarize'
newdata
a vector of data to be (reverse) transformed
inverse
if TRUE, performs reverse transformation
...
additional arguments
Value
A list of class binarize with elements
x.t
transformed original data
x
original data
method
location_measure used for original fitting
location
estimated location_measure
n
number of nonmissing observations
norm_stat
Pearson's P / degrees of freedom
The predict function with inverse = FALSE returns the numeric
value (0 or 1) of the transformation on newdata (which defaults to
the original data).
If inverse = TRUE, since the transform is not 1-1, it will create
and return a factor that indicates where the original data was cut.