sepfit | R Documentation |
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))
)
data |
(NumericVector) - the sample used to fit the distribution. |
verb |
(int) - the level of verbosity. Select one of:
|
par |
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. |
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). |
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.
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)
sepfit(sample_subbo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.