Calculates the most likely parameters for a given distribution.
Arguments
- x
Vector of distributed values from which the parameter should be determined.
- distrib
Character string specifying the distribution of x. The function
distributionwill accept the following character strings fordistribution:`normal``chi-squared``exponential``logistic``gamma``weibull``cauchy``beta``f``t``geometric``poisson``negative binomial``log-normal`
By default,
distributionis set to`weibull`.- ...
Additional arguments to be passed to the fitting function.
Examples
data1 <- rnorm(100, mean = 5, sd = 2)
distribution(data1, distrib = "normal")
#>
#>
#> fitted distribution is normal :
#> mean sd
#> 4.686477 1.998741
#>