get_residuals {power.transform}R Documentation

Compute residuals of transformation to normality

Description

Compute residuals of transformation to normality

Usage

get_residuals(x, transformer, ...)

Arguments

x

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

transformer

A transformer object created using find_transformation_parameters.

...

Unused arguments.

Value

A data.table containing the expected (according to a normal distribution) and observed z-scores, and their difference as residuals.

Examples

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

residual_data <- get_residuals(
  x = x,
  transformer = transformer)

[Package power.transform version 1.0.0 Index]