subboafit | R Documentation |
subboafit
returns the parameters, standard errors. negative
log-likelihood and covariance matrix of the asymmetric power exponential for
a sample. The process can execute two steps, dependending on the level of
accuracy required. See details below.
subboafit(
data,
verb = 0L,
method = 6L,
interv_step = 10L,
provided_m_ = NULL,
par = as.numeric(c(2, 2, 1, 1, 0)),
g_opt_par = as.numeric(c(0.1, 0.01, 100, 0.001, 1e-05, 2)),
itv_opt_par = as.numeric(c(0.01, 0.001, 200, 0.001, 1e-05, 5))
)
data |
(NumericVector) - the sample used to fit the distribution. |
verb |
(int) - the level of verbosity. Select one of:
|
method |
int - the steps that should be used to estimate the parameters.
|
interv_step |
int - the number of intervals to be explored after the last minimum was found in the interval optimization. Default is 10. |
provided_m_ |
NumericVector - if NULL, the m parameter is estimated by the routine. If numeric, the estimation fixes m to the given value. |
par |
NumericVector - vector containing the initial guess for parameters bl, br, al, ar and m, respectively. Default values of are c(2, 2, 1, 1, 0). |
g_opt_par |
NumericVector - vector containing the global optimization parameters. The optimization parameters are:
Details for each algorithm are available on the 'GSL' Manual. Default values are c(.1, 1e-2, 100, 1e-3, 1e-5, 2). |
itv_opt_par |
NumericVector - interval optimization parameters. Fields are the same as the ones for the global optimization. Default values are c(.01, 1e-3, 200, 1e-3, 1e-5, 5). |
The AEP is a exponential power distribution controlled by five parameters, with formula:
f(x;a_l,a_r,b_l,b_r,m) =
\frac{1}{A} e^{- \frac{1}{b_l} |\frac{x-m}{a_l}|^{b_l} }, x < m
f(x;a_l,a_r,b_l,b_r,m) =
\frac{1}{A} e^{- \frac{1}{b_r} |\frac{x-m}{a_r}|^{b_r} }, x > m
with:
A = a_lb_l^{1/b_l}\Gamma(1+1/b_l) + a_rb_r^{1/b_r}\Gamma(1+1/b_r)
where l
and r
represent left and right tails, a*
are
scale parameters, b*
control the tails (lower values represent
fatter tails), and m
is a location parameter. Due to its lack of
simmetry, and differently from the Subbotin, there is no simple equations
available to use the method of moments, so we start directly by minimizing
the negative log-likelihood. This global optimization is executed without
restricting any parameters. If required (default), after the global
optimization is finished, the method proceeds to iterate over the intervals
between several two observations, iterating the same algorithm of the
global optimization. The last method happens because of the lack of
smoothness on the m
parameter, and intervals must be used since the
likelihood function doesn't have a derivative whenever m
equals a
sample observation. Due to the cost, these iterations are capped at most
interv_step (default 10) from the last minimum observed.
Details on the method are available on the package vignette.
a list containing the following items:
"dt" - dataset containing parameters estimations and standard deviations.
"log-likelihood" - negative log-likelihood value.
"matrix" - the covariance matrix for the parameters.
sample_subbo <- rpower(1000, 1, 2)
subboafit(sample_subbo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.