Maximum-likelihood fitting of the Complex Triparametric Pearson (CTP) distribution with parameters \(a\), \(b\) and \(\gamma\).
fitctp(x, astart = 0, bstart = 1, gammastart = 1.1, method = "L-BFGS-B",
moments = FALSE, hessian = TRUE, control = list(), ...)
A numeric vector of length at least one containing only finite values.
An starting value for the parameter \(a\); by default 0.
An starting value for the parameter \(b\); by default 1.
An starting value for the parameter \(\gamma\); by default 1.1.
The method to be used in fitting the model. The default method is "L-BFGS-B" (optim).
If TRUE
the estimates of \(a\), \(b\) and \(\gamma\) by the method of moments are used as starting values (if it is posible). By default this argument is FALSE
.
If TRUE
the hessian of the objective function at the minimum is returned.
A list of parameters for controlling the fitting process.
Additional parameters.
An object of class "fitctp" 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.
RCSO2004cpd
ROC2018cpd
Maximum-likelihood fitting for the CBP distribution: fitcbp
.
# NOT RUN {
set.seed(123)
x <- rctp(500, -0.5, 1, 2)
fitctp(x)
fitctp(x, astart = 1, bstart = 1.1, gammastart = 3)
fitctp(x, moments = TRUE)
# }
Run the code above in your browser using DataLab