Optimization for a generalized logistic distribution with skewness
genlog_mle_sk.Rd
Maximum likehood estimation of parameters for a generalized logistic distribution with skewness.
Arguments
- parameters
Initial values for the parameters to be optimized over in the following order
c(a, b, p, mu, skew)
.- data
This is the the data to be utilized for the estimation.
- hessian
logical value that returns hessian, also returns the parameters estimation's confidence interval.
- alpha
Type I error given to calculate confidence intervals, used when
hessian = T
.
Value
Return a list of components as constrOptim
\(for more information, check this function\)
with some extras:
par
The best set of parameters found.
value
The value of the loglikelihood function corresponding to par
.
counts
A two-element integer vector giving the number of calls to the likelihood
function and L-BFGS-B
respectively. This excludes those calls needed to
compute the Hessian, and any calls to likelihood function to compute a
finite-difference approximation to the gradient.
convergence
An integer code. 0 indicates successful completion, 1 indicates that
the iteration limit maxit
had been reached. For more errors help(constrOptim)
.
message
A character string giving any additional information returned by the optimizer,
or NULL.
outer.iterations
gives the number of outer iterations (calls to optim
).
barrier.value
giving the value of the barrier function at the optimum.
For hessian = T
add:
hessian
A symmetric matrix giving an estimate of the (negative) Hessian at the solution found.
Note that this is the Hessian of the unconstrained problem even if the box
constraints are active.
bounds
Return the best parameters found and the upper and lower bounds for the estimation.
Details
Maximum likehood estimation of parameters for the distribution proposed in this package.
This function is an application of constrOptim
as a particular case needed for this
distribution using the method "BFGS
".
For more information of the output check help(constrOptim)
.
The used distribution for this package is given by: $$f(x) = 2*((a + b*(1+p)*(abs(x-mu)^p))*exp(-(x-mu)*(a+b*(abs(x-mu)^p))))/ ((exp(-(x-mu)*(a + b* (abs(x-mu)^p)))+1)^2) * ((exp(-(skew*(x-mu))*(a+b*(abs(skew*(x-mu))^p)))+1)^(-1)) $$
help(dgenlog_sk)
for parameters restrictions.
References
Rathie, P. N. and Swamee, P. K. (2006) On a new invertible generalized logistic distribution approximation to normal distribution, Technical Research Report in Statistics, 07/2006, Dept. of Statistics, Univ. of Brasilia, Brasilia, Brazil.
Azzalini, A. (1985) A class of distributions which includes the normal ones. Scandinavian Journal of Statistics.
Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995) A limited memory algorithm for bound constrained optimization. SIAM J. Scientific Computing, 16, 1190-1208.
Examples
## Using generic parameter starting values
datas <- rgenlog_sk(10000, 0.3,0.9,1.5, 0, 0.9)
genlog_mle_sk(c(0.3,0.9,1.5, 0, 0.9),datas)
#> $par
#> [1] 0.2861096317 0.9198169240 1.4600657569 -0.0009516813 0.8872795153
#>
#> $value
#> [1] 10976.99
#>
#> $counts
#> function gradient
#> 46 8
#>
#> $convergence
#> [1] 0
#>
#> $message
#> NULL
#>
#> $outer.iterations
#> [1] 2
#>
#> $barrier.value
#> [1] 0.0001595667
#>
## Select parameters starting values with genlog_slider
# \donttest{
datas <- rgenlog(10000, 1.5,2,2, 0)
if (manipulate::isAvailable()) {
genlog_slider(datas, return_var = 'parameters', skew = T) ## choose parameters
} else {
parameters <- c( 1, 1.5, 1.3, 0.5, -.4)
}
genlog_mle_sk(parameters, datas)
#> $par
#> [1] 1.40662369 2.11706514 1.84112662 -0.00252231 0.02691451
#>
#> $value
#> [1] 8184.467
#>
#> $counts
#> function gradient
#> 74 15
#>
#> $convergence
#> [1] 0
#>
#> $message
#> NULL
#>
#> $outer.iterations
#> [1] 2
#>
#> $barrier.value
#> [1] 0.0002172506
#>
# }