Maximum-likelihood fitting of the Extended Biparametric Waring (EBW) distribution with parameters \(\alpha\), \(\rho\) and \(\gamma\). Generic
methods are print
, summary
, coef
, logLik
, AIC
, BIC
and plot
. The method to be used in fitting the
model is "L-BFGS-B" which allows constraints for each variable (see details in optim
funtion).
fitebw(x, alphastart = NULL, rhostart = NULL, gammastart = NULL,
method = "L-BFGS-B", control = list(),...)
An object of class 'fitEBW'
is a list containing the following components:
n
, the number of observations,
initialValues
, a vector with the starting values used,
coefficients
, the parameter ML estimates of the CTP distribution,
se
, a vector of the standard error estimates,
hessian
, a symmetric matrix giving an estimate of the Hessian at the solution found in the optimization of the log-likelihood function,
cov
, an estimate of the covariance matrix of the model coefficients,
corr
, an estimate of the correlation matrix of the model estimates,
loglik
, the maximized log-likelihood,
aic
, Akaike Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters,
bic
, Bayesian Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters,
code
, a code that indicates successful convergence of the fitter function used (see nlm and optim helps),
converged
, logical value that indicates if the optimization algorithms succesfull.
method
, the name of the fitter function used.
Generic functions:
print
: The print of a 'fitEBW'
object shows the ML parameter estimates and their standard errors in parenthesis.
summary
: The summary provides the ML parameter estimates, their standard errors and the statistic and p-value of the Wald test to check if the parameters are significant.
This summary also shows the loglikelihood, AIC and BIC values, as well as the results for the chi-squared goodness-of-fit test and the Kolmogorov-Smirnov test for discrete variables. Finally, the correlation matrix between parameter estimates appears.
coef
: It extracts the fitted coefficients from a 'fitEBW'
object.
logLik
: It extracts the estimated log-likelihood from a 'fitEBW'
object.
AIC
: It extracts the value of the Akaike Information Criterion from a 'fitEBW'
object.
BIC
: It extracts the value of the Bayesian Information Criterion from a 'fitEBW'
object.
plot
: It shows the plot of a 'fitEBW'
object. Observed and theoretical probabilities, empirical and theoretical cumulative distribution functions or empirical cumulative probabilities against theoretical cumulative probabilities are the three plot types.
A numeric vector of length at least one containing only finite values.
A starting value for the parameter \(\alpha\); by default NULL
.
A starting value for the parameter \(\rho>0\); by default NULL
.
A starting value for the parameter \(\gamma>max(0,2\alpha)\); by default NULL
.
The method to be used in fitting the model. The default method is "L-BFGS-B" (optim).
A list of parameters for controlling the fitting process.
Additional parameters.
If the starting value for \(\alpha\) is positive, the parameterization \((\alpha,\rho)\) is used; otherwise, the parameterization \((\alpha,\gamma)\) is used.
If the starting values of the parameters \(\alpha\), \(\gamma\) or \(\rho\) are omitted (default option), they are computing by the method of moments (if possible; otherwise they must be entered).
The default method is "L-BFGS-B"
(see details in optim
function),
but non-linear minimization (nlm
) or those included in the optim
function
("Nelder-Mead"
, "BFGS"
, "CG"
and "SANN"
) may be used.
Standard error (SE) estimates for \(\alpha\), \(\gamma\) or \(\rho\) are provided by the default method; otherwise, SE for \(\alpha_0\) and \(\gamma_0\) where \(\alpha=-exp(\alpha_0)\) and \(\gamma=exp(\gamma_0)\) (or for \(\alpha_0\) and \(\rho_0\) where \(\alpha=exp(\alpha_0)\) and \(\rho=exp(\rho_0)\)) are computed.
COR2021cpd
Plot of observed and theoretical frequencies for a EBW fit: plot.fitEBW
Maximum-likelihood fitting for the CTP distribution: fitctp
.
Maximum-likelihood fitting for the CBP distribution: fitcbp
.
set.seed(123)
x <- rebw(500, 2, rho = 5)
fitebw(x)
summary(fitebw(x, alphastart = 1, rhostart = 5))
Run the code above in your browser using DataLab