assess_transformation: Assess normality of transformed data

View source: R/GoodnessOfFit.R

assess_transformationR Documentation

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, kappa = 0.8, verbose = TRUE, ...)

Arguments

x

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

transformer

A transformer object created using find_transformation_parameters.

kappa

Central portion of the distribution.

verbose

Sets verbosity of the fubction.

...

Unused arguments.

Details

This function is a wrapper around ecn_test.

Value

p-value for empirical goodness of fit test.

Examples

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

assess_transformation(
  x = x,
  transformer = transformer
)

power.transform documentation built on Nov. 6, 2025, 1:10 a.m.