A helper function for fit_distributions
Arguments
- x
numeric vector, representing data to be fit
- interval_start
starting coordinates for the bins
- interval_end
ending coordinates for the bins
- interval_midpoint
bin midpoints
- metric
a subset of
mle
,jaccard
,intersection
,ks
,mse
,chisq
indicating metrics to use for fit optimization- truncated
logical, whether to fit truncated distributions
- distributions
character vector indicating distributions, subset of
norm
,gamma
,gamma_flip
andunif
.
Value
a nested list where each sublist represents a model with the following data
- par
a character string denoting the region_id of the Histogram
- dist
the distribution name
- metric
the metric used to fit the distribution
- value
the fitted value of the metric function
- dens
a function that returns the density of the fitted distribution