Estimate the parameters of a distribution family from a sample and return
the fitted distribution() object. Mirrors the C#
Estimate(data, ParameterEstimationMethod) API of the Numerics library.
Usage
dist_fit(family, data, method = c("mle", "lmom", "mom"))Arguments
- family
the distribution family name; see
distribution_names().- data
numeric vector of observations.
- method
estimation method:
"mle"(maximum likelihood, the default),"lmom"(L-moments), or"mom"(product moments). Not every family supports every method; unsupported combinations error.
Examples
d <- distribution("Gumbel", c(100, 10))
x <- dist_random(d, 200, seed = 42)
dist_fit("Gumbel", x, method = "mle")
#> <corehydro_dist> Gumbel(ξ = 98.9905, α = 10.161)