rriskFitdist.cont {rriskDistributions} | R Documentation |
Fitting univariate distributions by maximum likelihood or by matching moments
Description
Fits a univariate distribution by maximum likelihood or by matching moments.
Usage
rriskFitdist.cont(data, distr, method = c("mle", "mme"), start,
chisqbreaks, meancount, ...)
Arguments
data |
A numerical vector, data to be fitted. |
distr |
A character string |
method |
A character string coding for the fitting method: "mle" for the maximum likelihood estimation and "mme" for the matching moment estimation. |
start |
A named list giving the initial values of parameters of the named
distribution. This argument will not be taken into account if |
chisqbreaks |
A numerical vector defining the breaks of the cell used to
compute the chi-square statistic. If omitted, these breaks are automatically
computed from the data in order to reach roughly the same number of observations
per cell, roughly equal to the argument |
meancount |
The mean number of observations per cell expected for the definition of the breaks of the cells used to compute the chi-squared statistic. |
... |
further arguments to be passed to generic function, or to the
function |
Details
This function is an alias of the function fitdist
from the package
fitdistrplus (Version 0.1-2). The original function was extended to
fitting additional distributions. The following continuous distributions can
be fitted by this function: normal, lognormal, logistic, exponential, F,
Student's t, Beta, Cauchy, Weibull, Gamma.
For more details see the assistance page of the function
fitdist
from the package fitdistrplus.
This function is not intended to be called directly but is internally
called in useFitdist
.
Value
rriskFitdist.cont
returns a list containing 19 items with following fitting results:
estimate |
numeric, a single value or a vector containing estimated parameters. |
method |
the character string representing the used fitting method ("mle" or "mme"). |
sd |
the estimated standard errors or |
cor |
the estimated correlation matrix or |
loglik |
the log-likelihood or |
aic |
the Akaike information criterion or |
bic |
the BIC or SBC (Schwarz Bayesian criterion) or |
n |
the length of the data set. |
data |
the data set. |
distname |
the name of the estimated distribution. |
chisq |
the Chi-squared statistic or |
chisqbreaks |
breaks used to define cells in the chi-square statistic. |
chisqpvalue |
p-value of the chi-square statistic or |
chisqdf |
degree of freedom of the chi-square distribution or |
chisqtable |
a table with observed and theoretical counts used for the Chi-squared calculations. |
ad |
the Anderson-Darling statistic or |
adtest |
the decision of the Anderson-Darling test or |
ks |
the Kolmogorov-Smirnov statistic or |
kstest |
the decision of the Kolmogorov-Smirnov test or |
Author(s)
Matthias Greiner matthias.greiner@bfr.bund.de (BfR),
Kristin Tolksdorf kristin.tolksdorf@bfr.bund.de (BfR),
Katharina Schueller schueller@stat-up.de (STAT-UP Statistical Consulting),
Natalia Belgorodski belgorodski@stat-up.de (STAT-UP Statistical Consulting)
Marie-Laure Delignette-Muller (coauthor of the package fitdistrplus)
Christophe Dutang (coauthor of the package fitdistrplus)
Examples
set.seed(1)
x <- stats::rnorm(5000, mean = 10, sd = 5)
rriskFitdist.cont(x, "norm")
rriskFitdist.cont(x, "t")