squareXform: Square-root Transformation

View source: R/normalizations.R

squareXformR Documentation

Square-root Transformation

Description

This function left anchors the minimum value to 0 per the recommendations of Osborne (2002) and subsequently transforms the data by taking the square-root of each value.

Usage

squareXform(sample)

Arguments

sample

Nonempty finite numeric vector, matrix, array, or data frame without missing values.

Details

Computes sqrt(sample - min(sample)), including for positive input. Equivalent scaled arithmetic avoids overflow in the difference when the square root remains representable.

Input must be nonempty and finite, with no NA or NaN. Numeric vectors, matrices, arrays and data frames are accepted; dimensions and names are retained. The minimum is taken over the whole input. Constants return zero.

Value

The square-root-transformed data, retaining input dimensions and names

References

Osborne, J. W. (2002). Notes on the use of data transformations. Practical Assessment, Research and Evaluation, 9(1), 42-50.

Osborne, J. W. (2002). The Effects of Minimum Values on Data Transformations. Retrieved from https://files.eric.ed.gov/fulltext/ED463313.pdf

Examples

values <- rnorm(100)
x <- squareXform(values)

Rita documentation built on Nov. 14, 2026, 1:07 a.m.

Related to squareXform in Rita...