sepfit
returns the parameters, standard errors. negative
log-likelihood and covariance matrix of the skewed power exponential
for a sample. The process performs a global minimization over the negative
log-likelihood function. See details below.
sepfit(
data,
verb = 0L,
par = as.numeric(c(0, 1, 2, 0)),
g_opt_par = as.numeric(c(0.1, 0.01, 100, 0.001, 1e-05, 2))
)
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.
(NumericVector) - the sample used to fit the distribution.
(int) - the level of verbosity. Select one of:
0 just the final result
1 headings and summary table
2 intermediate steps results
3 intermediate steps internals
4+ details of optim. routine
NumericVector - vector containing the initial guess for parameters m (location), a (scale), b (shape), lambda (skewness), respectively. Default values of are c(0, 1, 2, 0), i.e. a normal distribution.
NumericVector - vector containing the global optimization parameters. The optimization parameters are:
step - (num) initial step size of the searching algorithm.
tol - (num) line search tolerance.
iter - (int) maximum number of iterations.
eps - (num) gradient tolerance. The stopping criteria is \(||\text{gradient}||<\text{eps}\).
msize - (num) simplex max size. stopping criteria given by \(||\text{max edge}||<\text{msize}\)
algo - (int) algorithm. the optimization method used:
0 Fletcher-Reeves
1 Polak-Ribiere
2 Broyden-Fletcher-Goldfarb-Shanno
3 Steepest descent
4 Nelder-Mead simplex
5 Broyden-Fletcher-Goldfarb-Shanno ver.2
Details for each algorithm are available on the 'GSL' Manual. Default values are c(.1, 1e-2, 100, 1e-3, 1e-5, 2).
The SEP is a exponential power distribution controlled by four parameters, with formula: $$ f(x; m, b, a, \lambda) = 2 \Phi(w) e^{-|z|^b/b}/(c)$$ where: $$z = (x-m)/a$$ $$w = sign(z) |z|^{(b/2)} \lambda \sqrt{2/b}$$ $$c = 2 ab^{(1/b)-1} \Gamma(1/b)$$ with \(\Phi\) the cumulative normal distribution with mean zero and variance one. Details on the method are available on the package vignette.
sample_subbo <- rpower(1000, 1, 2)
sepfit(sample_subbo)
Run the code above in your browser using DataLab