| get_input {LambertW} | R Documentation |
get_input back-transforms the observed data \boldsymbol y to the
(approximate) input data \boldsymbol x_{τ} using the
transformation vector τ = (μ_x(\boldsymbol β),
σ_x(\boldsymbol β), γ, α, δ).
Note that get.input should be deprecated; however, since it was
explicitly referenced in Goerg (2011) I keep it here for future
reference. New code should use get_input exclusively.
get_input(y, tau, return.u = FALSE) get.input(...)
y |
a numeric vector of data values or an object of class
|
tau |
named vector τ which defines the variable transformation.
Must have at least |
return.u |
should the normalized input be returned; default:
|
... |
arguments passed to |
The (approximated) input data vector \widehat{\boldsymbol x}_{τ}.
For gamma != 0 it uses the principal branch solution
W_gamma(z, branch = 0) to get a unique input.
For gamma = 0 the back-transformation is bijective
(for any δ ≥q 0, α ≥q 0).
If return.u = TRUE, then it returns a list with 2 vectors
u |
centered and normalized input \widehat{\boldsymbol u}_{θ}, |
x |
input data \widehat{\boldsymbol x}_{θ}. |
set.seed(12)
# unskew very skewed data
y <- rLambertW(n = 1000, theta = list(beta = c(0, 1), gamma = 0.3),
distname = "normal")
test_normality(y)
fit.gmm <- IGMM(y, type="s")
x <- get_input(y, fit.gmm$tau)
# the same as
x <- get_input(fit.gmm)
test_normality(x) # symmetric Gaussian