invert_initial_transform: Invert an initial transformation of time series data.

View source: R/transform.R

invert_initial_transformR Documentation

Invert an initial transformation of time series data.

Description

Invert an initial transformation of time series data.

Usage

invert_initial_transform(
  y,
  transformation = c("none", "log", "sqrt", "box-cox"),
  transform_offset = 0.5,
  bc_lambda
)

Arguments

y

a univariate time series or numeric vector.

transformation

character specifying transformation type: "box-cox", "sqrt", "log", or "none".

transform_offset

numeric offset used before the Box-Cox, sqrt, and log transformations; the offset is added to all observations before transforming. Default value of 0.5 allows us to use the Box-Cox and log transforms (which require positive inputs) in case of observations of 0, and also ensures that the reverse transformed values will always be at least -0.5, so that they round up to non-negative values.

bc_lambda

(required if transformation is "box-cox"). Parameter for the Box-Cox transformation. bc_lambda should be the result of a call to car::powerTransform(y + transform_offset, family = "bcPower")

Value

a transformed object of the same class as y


reichlab/simplets documentation built on Sept. 16, 2024, 10:24 p.m.