power_transformation: Power transformation

View source: R/transformations.R

power_transformationR Documentation

Power transformation

Description

Normalise data with a power transformation.

Usage

power_transformation(
  data,
  trait = "DATA",
  alpha = 0.05,
  transf_vals = c(2, exp(1), 3, 4, 5, 6, 7, 8, 9, 10),
  plots_prefix = "HIST",
  digits = 6,
  plot = TRUE,
  quiet = FALSE
)

Arguments

data

Original data.

trait

Trait name.

alpha

Significance level.

transf_vals

Transformation values.

plots_prefix

Prefix for plots with or without path.

digits

Significant digits to compare p-values of transformations.

plot

Boolean flag to indicate whether or not to plot a histogram comparing the original and transformed/normalised data.

quiet

Boolean flag to hide status messages.

Value

Data structure containing the normalised data, original data if no transformation was performed.

See Also

Other Transformation functions: log_transformation(), root_transformation()

Examples

set.seed(123)
data <- rnorm(100, 5)
transformed <- MetaPipe::power_transformation(sqrt(data), "ROOT_2")

# Clean up example outputs
MetaPipe:::tidy_up("HIST")


villegar/MetaPipe documentation built on Nov. 22, 2022, 10:44 p.m.