get_input function

Back-transform Y to X

Back-transform Y to X

get_input back-transforms the observed data y\boldsymbol y to the (approximate) input data xτ\boldsymbol x_{\tau} using the transformation vector c("tau=(mux(boldsymbolbeta),\n\\tau = (\\mu_x(\\boldsymbol \\beta),\n", "sigmax(boldsymbolbeta),gamma,alpha,delta) \\sigma_x(\\boldsymbol \\beta), \\gamma, \\alpha, \\delta)").

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(...)

Arguments

  • y: a numeric vector of data values or an object of class LambertW_fit.
  • tau: named vector τ\tau which defines the variable transformation. Must have at least 'mu_x' and 'sigma_x' element; see complete_tau for details.
  • return.u: should the normalized input be returned; default: FALSE.
  • ...: arguments passed to get_input.

Returns

The (approximated) input data vector c("\\widehat{\\boldsymbol\n", "x}_{\\tau}").

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 δ0,α0\delta \geq 0, \alpha \geq 0).

If return.u = TRUE, then it returns a list with 2 vectors - u: centered and normalized input u^θ\widehat{\boldsymbol u}_{\theta},

  • x: input data x^θ\widehat{\boldsymbol x}_{\theta}.

Examples

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

See Also

get_output

  • Maintainer: Georg M. Goerg
  • License: GPL (>= 2)
  • Last published: 2023-11-30