Fit of a distribution to a data by two methods: maximum likelihood (mle) and moment matching (mme). Kolmogorov-Smirnov test is used to construct the best fitting.
A character string "name" naming a distribution for which the corresponding density function dname, the corresponding distribution function pname and the corresponding quantile function qname must be defined.
order
A numeric vector for the moment order(s). The length of this vector must be equal to the number of parameters to estimate. This argument may be omitted(default) for some distributions for which reasonable order are computed.
start
A named list giving the initial values of parameters of the named distribution. This argument may be omitted(default) for some distributions for which reasonable starting values are computed.
conf
Confidence level for the test.
Value
bestfit returns a list with following components,
fit
the parameter estimates.
p.value
the pvalue of the Kolmogorov-Smirnov Test.
Details
This function is not intended to be called directly but is internally called in predI and predP.
It is assumed that the two methods: "mle" and "mme" are applied then Kolmogorov-Smirnov test is used to construct the best fitting.
References
Delignette-Muller ML and Dutang C (2015), fitdistrplus: An R Package for Fitting Distributions.
Journal of Statistical Software, 64(4), 1-34.