tau-utils | R Documentation |
All functions here are for the transformation parameter vector
\tau = (\mu_x, \sigma_x, \gamma, \delta, \alpha)
.
check_tau
checks if \tau
is correctly specified (correct names, non-negativity
constraints, etc.)
complete_tau
completes missing values so users don't have to specify
every element of \tau
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 \tau
.
normalize_by_tau
shifts and scales data given the tau
vector as
(data - \mu_x) / \sigma_x.
Parameters \mu_x
and \sigma_x
are not necessarily mean and
standard deviation in the \tau
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 \tau
to the parameter list \theta
(inverse of theta2tau
).
tau2type
guesses the type ('s'
, 'h'
, 'hh'
) from the names
of tau
vector; thus make sure tau
is named correctly.
check_tau(tau)
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)
tau2type(tau)
tau |
named vector |
type |
type of Lambert W |
y |
a numeric vector of real values (the observed data). |
location.family |
logical; if |
data |
numeric; a numeric object in R. Usually this is either
|
inverse |
logical; if |
beta |
numeric vector (deprecated); parameter |
check_tau
throws an error if \tau
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"
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.