Learn R Programming

power.transform (version 1.0.0)

assess_transformation: Assess normality of transformed data

Description

Not all data allows for a reasonable transformation to normality using power transformation. For example, uniformly distributed data or multi-modal data cannot be transformed to normality. This function computes a p-value for an empirical goodness of fit test for central normality. A distribution is centrally normal if the central 80% of the data are approximately normally distributed. The null-hypothesis is that the transformed distribution is centrally normal.

Usage

assess_transformation(x, transformer, verbose = TRUE, ...)

Value

p-value for empirical goodness of fit test.

Arguments

x

A vector with numeric values that should be transformed to normality.

transformer

A transformer object created using find_transformation_parameters.

verbose

Sets verbosity of the fubction.

...

Unused arguments.

Examples

Run this code
x <- exp(stats::rnorm(1000))
transformer <- find_transformation_parameters(
  x = x,
  method = "box_cox")

assess_transformation(
  x = x,
  transformer = transformer)

Run the code above in your browser using DataLab