tau-utils: Utilities for transformation vector tau

tau-utilsR Documentation

Utilities for transformation vector tau


All functions here are for the transformation parameter vector τ = (μ_x, σ_x, γ, δ, α).

check_tau checks if τ is correctly specified (correct names, non-negativity constraints, etc.)

complete_tau completes missing values so users don't have to specify every element of τ explicitly. 'mu_x' and 'sigma_x' must be specified, but alpha = 1, gamma = 0, and delta = 0 will be set automatically if missing.

get_initial_tau provides starting estimates for τ.

normalize_by_tau shifts and scales data given the tau vector as

(data - μ_x) / σ_x.

Parameters μ_x and σ_x are not necessarily mean and standard deviation in the τ vector; that depends on the family type and use.mean.variance (for location families they usually are mean and standard deviation if use.mean.variance = TRUE; for scale and non-location non-scale families they are just location/scale parameters for the transformation).

tau2theta converts τ to the parameter list θ (inverse of theta2tau).

tau2type guesses the type ('s', 'h', 'hh') from the names of tau vector; thus make sure tau is named correctly.



complete_tau(tau, type = tau2type(tau))

get_initial_tau(y, type = c("h", "hh", "s"), location.family = TRUE)

normalize_by_tau(data, tau, inverse = FALSE)

tau2theta(tau, beta)




named vector τ which defines the variable transformation. Must have at least 'mu_x' and 'sigma_x' element; see complete_tau for details.


type of Lambert W \times F distribution: skewed "s"; heavy-tail "h"; or skewed heavy-tail "hh".


a numeric vector of real values (the observed data).


logical; if FALSE it sets mu_x to 0 and only estimates sigma_x; if TRUE (default), it estimates mu_x as well.


numeric; a numeric object in R. Usually this is either y or x (or z and u if inverse = TRUE.)


logical; if TRUE it applies the inverse transformation data \cdot σ_x + μ_x


numeric vector (deprecated); parameter \boldsymbol β of the input distribution. See check_beta on how to specify beta for each distribution.


check_tau throws an error if τ does not define a proper transformation.

complete_tau returns a named numeric vector.

get_initial_tau returns a named numeric vector.

tau2theta returns a list with entries alpha, beta, gamma, and delta.

tau2type returns a string: either "s", "h", or "hh".

LambertW documentation built on Sept. 22, 2022, 5:07 p.m.