estimateBetaDist | R Documentation |
This function perform a nonlinear estimation of the shape parameters of beta distribution
estimateBetaDist(
q,
init.pars = NULL,
via.optim = TRUE,
loss.fun = c("linear", "huber", "smooth", "cauchy", "arctg"),
maxiter = 1024,
maxfev = 1e+05,
ftol = 1e-12,
ptol = 1e-12
)
q |
prior probabilities |
init.pars |
initial parameter values. Defaults is NULL and an initial guess is estimated using the method of moments, which probably is the best approach to estimate the initial parameter values of beta distribution. |
via.optim |
Logical. Whether to estimate beta distribution parameters
via |
loss.fun |
Loss function(s) used in the regression (see
(Loss function)). This
fitting uses the approach followed in in the R package
usefr. After
|
maxiter, ftol, ptol, maxfev |
Optional parameters for
|
To obtain the estimates for shape parameters from the best fitted
beta distribution model, a nonlinear regression Levenberg-Marquardt algorithm
implemented in function nls.lm
is applied. Several
(loss functions)) are
available to accomplish the model fitting to the data. If
nls.lm
function fails, then a new try will be
accomplish with nlsLM
function. If the previous
algorithms fail, then the parameters will be estimated using BFGS" algorithm
implemented in optim
function.
the estimated values of the shape parameters of the selected beta distribution.
## ------ A simple example -----
set.seed(4)
br <- rbeta(1e3, shape1 = 1, shape2 = 2)
pars <- estimateBetaDist(br)
pars
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.