| ctp.fit | R Documentation |
Fits the Complex Triparametric Pearson (CTP) distribution to count data using maximum likelihood estimation.
ctp.fit(
x,
a_start = NULL,
b_start = NULL,
gama_start = NULL,
method = "L-BFGS-B",
penalty = 1e+10
)
x |
Numeric vector of nonnegative counts. |
a_start |
Optional starting value for parameter a. |
b_start |
Optional starting value for parameter b. |
gama_start |
Optional starting value for parameter gamma. |
method |
Optimization method (default: "L-BFGS-B"). |
penalty |
numeric penalty added for numerical stability when b → 0 |
An object of class "ctpfit" containing:
estimates |
Named vector of MLEs |
se |
Standard errors |
vcov |
Variance-covariance matrix |
logLik |
Log-likelihood |
AIC |
Akaike Information Criterion |
BIC |
Bayesian Information Criterion |
pearson_chisq |
Pearson's chi-squared statistic |
wald_chisq |
Wald's chi-squared statistic |
fitted_freq |
Data frame of observed vs expected frequencies |
data |
Original data |
converged |
Convergence status |
set.seed(123)
x <- rctp(30, a = 1, b = 0.5, gama = 5)
fit <- ctp.fit(x)
print(fit)
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.