Description Usage Arguments Details Value Author(s) Source References See Also Examples
Fit of the BMT distribution to non-censored data by maximum likelihood (mle), moment matching (mme), quantile matching (qme), maximum goodness-of-fit (mge), also known as minimum distance, maximum product of spacing (mpse), also called maximum spacing, and minimum quantile distance (mqde), which can also be called maximum quantile goodness-of-fit.
1 2 3 4 5 |
data |
A numeric vector with the observed values for non-censored data. |
method |
A character string coding for the fitting method: |
start |
A named list giving the initial values of parameters of the BMT
distribution or a function of data computing initial values and returning a
named list. (see the 'details' section of
|
fix.arg |
An optional named list giving the values of fixed parameters
of the BMT distribution or a function of data computing (fixed) parameter
values and returning a named list. Parameters with fixed value are thus NOT
estimated. (see the 'details' section of
|
type.p.3.4 |
Type of parametrization asociated to p3 and p4. "t w" means tails weights parametrization (default) and "a-s" means asymmetry-steepness parametrization. |
type.p.1.2 |
Type of parametrization asociated to p1 and p2. "c-d" means domain parametrization (default) and "l-s" means location-scale parametrization. |
optim.method |
|
custom.optim |
A function carrying the optimization (see the 'details'
section of |
keepdata |
A logical. If |
keepdata.nb |
When |
... |
Further arguments to be passed to generic functions, or to one
of the functions |
This function is based on the function fitdist
from
the package fitdistrplus
but it focuses on the parameter
estimation for the BMT distribution (see BMT
for details). It
has six possible fitting methods: maximum likelihood (mle), moment matching
(mme), quantile matching (qme), maximum goodness-of-fit (mge), also known
as minimum distance, maximum product of spacing (mpse), also called maximum
spacing, and minimum quantile distance (mqde), which can also be called
maximum quantile goodness-of-fit. These fitting methods are carried out in
BMTfit.mle
, BMTfit.mme
,
BMTfit.qme
, BMTfit.mge
,
BMTfit.mpse
, and BMTfit.mqde
, respectively (see
each function for details). BMTfit
returns an object of class
"fitdist"
(see fitdist
for details). Therefore, it
benefits of all the developed functions and methods for that class (see
fitdistrplus
for details).
Generic methods of a fitdist
object are print
,
plot
, summary
, quantile
, logLik
, vcov
and coef
.
fitdist
returns an object of class "fitdist"
with the
following components:
estimate |
the parameter estimates. |
method |
the character string coding for the fitting method :
|
sd |
the estimated standard errors, |
cor |
the estimated correlation matrix, |
vcov |
the estimated variance-covariance matrix, |
loglik |
the log-likelihood. |
aic |
the Akaike information criterion. |
bic |
the the so-called BIC or SBC (Schwarz Bayesian criterion). |
n |
the length of the data set. |
data |
the data set. |
distname |
the name of the distribution (BMT). |
fix.arg |
the named list giving the values of parameters of the named
distribution that must be kept fixed rather than estimated or |
fix.arg.fun |
the function used to set the value of |
discrete |
the input argument or the automatic definition by the
function to be passed to functions |
dots |
the list of further arguments passed in ... to be used in
|
weights |
the vector of weigths used in the estimation process or
|
Camilo Jose Torres-Jimenez [aut,cre] cjtorresj@unal.edu.co
Based on the function fitdist
of the R package:
fitdistrplus
Delignette-Muller ML and Dutang C (2015), fitdistrplus: An R Package for Fitting Distributions. Journal of Statistical Software, 64(4), 1-34.
Torres-Jimenez, C. J. (2017, September), Comparison of estimation methods for the BMT distribution. ArXiv e-prints.
Torres-Jimenez, C. J. (2018), The BMT Item Response Theory model: A new skewed distribution family with bounded domain and an IRT model based on it, PhD thesis, Doctorado en ciencias - Estadistica, Universidad Nacional de Colombia, Sede Bogota.
See BMT
for the BMT density, distribution, quantile
function and random deviates. See BMTfit.mle
,
BMTfit.mme
, BMTfit.qme
,
BMTfit.mge
, BMTfit.mpse
and
BMTfit.mqde
for details on parameter estimation. See
fitdist
for details on the object fitdist and its methods
print
, plot
, summary
, quantile
, logLik
,
vcov
and coef
, and fitdistrplus
for an overview
of the package to which that object belongs to.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | # (1) fit of the BMT distribution by maximum likelihood estimation
data(groundbeef)
serving <- groundbeef$serving
fit.mle <- BMTfit(serving)
summary(fit.mle)
plot(fit.mle)
plot(fit.mle, demp = TRUE)
plot(fit.mle, histo = FALSE, demp = TRUE)
cdfcomp(fit.mle, addlegend=FALSE)
denscomp(fit.mle, addlegend=FALSE)
ppcomp(fit.mle, addlegend=FALSE)
qqcomp(fit.mle, addlegend=FALSE)
# (2) Comparison of various estimation methods
fit.mme <- BMTfit(serving, method="mme")
fit.mpse <- BMTfit(serving, method="mpse")
fit.mqde <- BMTfit(serving, method="mqde")
summary(fit.mme)
summary(fit.mpse)
summary(fit.mqde)
cdfcomp(list(fit.mle, fit.mme, fit.mpse, fit.mqde),
legendtext=c("mle", "mme", "mpse", "mqde"))
denscomp(list(fit.mle, fit.mme, fit.mpse, fit.mqde),
legendtext=c("mle", "mme", "mpse", "mqde"))
qqcomp(list(fit.mle, fit.mme, fit.mpse, fit.mqde),
legendtext=c("mle", "mme", "mpse", "mqde"))
ppcomp(list(fit.mle, fit.mme, fit.mpse, fit.mqde),
legendtext=c("mle", "mme", "mpse", "mqde"))
gofstat(list(fit.mle, fit.mme, fit.mpse, fit.mqde),
fitnames=c("mle", "mme", "mpse", "mqde"))
# (3) how to change the optimisation method?
BMTfit(serving, optim.method="Nelder-Mead")
BMTfit(serving, optim.method="L-BFGS-B")
BMTfit(serving, custom.optim="nlminb")
# (4) estimation of the tails weights parameters of the BMT distribution
# with domain fixed at [9,201] using Kolmogorov-Smirnov
fit.KS <- BMTfit(serving, method="mge", gof="KS",
start=list(p3=0.5, p4=0.5), fix.arg=list(p1=9, p2=201))
summary(fit.KS)
plot(fit.KS)
# (5) estimation of the asymmetry-steepness parameters of the BMT
# distribution with domain fixed at [9,201] using minimum quantile distance
# with a closed formula (optim.method="CD")
fit.mqde.CD <- BMTfit(serving, method="mqde", optim.method="CD",
start=list(p3=0.5, p4=0.5), type.p.3.4 = "a-s",
fix.arg=list(p1=9, p2=201))
summary(fit.mqde.CD)
plot(fit.mqde.CD)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.