Learn R Programming

power.transform (version 1.0.0)

get_residuals: Compute residuals of transformation to normality

Description

Compute residuals of transformation to normality

Usage

get_residuals(x, transformer, ...)

Value

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

Arguments

x

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

transformer

A transformer object created using find_transformation_parameters.

...

Unused arguments.

Examples

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

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

Run the code above in your browser using DataLab