| beta-utils {LambertW} | R Documentation |
The parameter \boldsymbol β specifies the input distribution X \sim F_X(x \mid \boldsymbol β).
beta2tau converts \boldsymbol β to the transformation vector
τ = (μ_x, σ_x, γ = 0, α = 1, δ = 0), which
defines the Lambert W\times F random variable mapping from X
to Y (see tau-utils). Parameters μ_x and
σ_x of X in general depend on \boldsymbol β
(and may not even exist for use.mean.variance = TRUE; in this case
beta2tau will throw an error).
check_beta checks if \boldsymbol β defines a
valid distribution, e.g., for normal distribution 'sigma' must be
positive.
estimate_beta estimates \boldsymbol β for a given
F_X using MLE or methods of moments. Closed form solutions
are used if they exist; otherwise the MLE is obtained numerically using
fitdistr.
get_beta_names returns (typical) names for each component of
\boldsymbol β.
Depending on the distribution
\boldsymbol β has different length and names: e.g.,
for a "normal" distribution beta is of length
2 ("mu", "sigma"); for an "exp"onential
distribution beta is a scalar (rate "lambda").
beta2tau(beta, distname, use.mean.variance = TRUE) check_beta(beta, distname) estimate_beta(x, distname) get_beta_names(distname)
beta |
numeric; vector \boldsymbol β of the input
distribution; specifications as they are for the R implementation of this
distribution. For example, if |
distname |
character; name of input distribution; see
|
use.mean.variance |
logical; if |
x |
a numeric vector of real values (the input data). |
estimate_beta does not do any data transformation as part of the
Lambert W\times F input/output framework. For an initial estimate
of θ for Lambert W\times F distributions see
get_initial_theta and get_initial_tau.
A quick initial estimate of θ is obtained by first finding the
(approximate) input \widehat{\boldsymbol x}_{\widehat{θ}} by
IGMM, and then getting the MLE of \boldsymbol β
for this input data \widehat{\boldsymbol x}_{\widehat{θ}} \sim
F_X(x \mid \boldsymbol β) (usually using
fitdistr).
beta2tau returns a numeric vector, which is τ =
τ(\boldsymbol β) implied by beta and distname.
check_beta throws an error if \boldsymbol β is not
appropriate for the given distribution; e.g., if it has too many values
or if they are not within proper bounds (e.g., beta['sigma'] of a
"normal" distribution must be positive).
estimate_beta returns a named vector with estimates for
\boldsymbol β given x.
get_beta_names returns a vector of characters.
# By default: delta = gamma = 0 and alpha = 1 beta2tau(c(1, 1), distname = "normal") ## Not run: beta2tau(c(1, 4, 1), distname = "t") ## End(Not run) beta2tau(c(1, 4, 1), distname = "t", use.mean.variance = FALSE) beta2tau(c(1, 4, 3), distname = "t") # no problem ## Not run: check_beta(beta = c(1, 1, -1), distname = "normal") ## End(Not run) set.seed(124) xx <- rnorm(100)^2 estimate_beta(xx, "exp") estimate_beta(xx, "chisq")