Skip to contents

Fit a uniform distribution to a histogram

Usage

fit_uniform(
  x,
  metric = c("mle", "jaccard", "intersection", "ks", "mse", "chisq")
)

# S3 method for numeric
fit_uniform(
  x,
  metric = c("mle", "jaccard", "intersection", "ks", "mse", "chisq")
)

# S3 method for table
fit_uniform(
  x,
  metric = c("mle", "jaccard", "intersection", "ks", "mse", "chisq")
)

# S3 method for Histogram
fit_uniform(
  x,
  metric = c("mle", "jaccard", "intersection", "ks", "mse", "chisq")
)

# S3 method for GenomicHistogram
fit_uniform(
  x,
  metric = c("mle", "jaccard", "intersection", "ks", "mse", "chisq")
)

Arguments

x

numeric vector representing the density of a histogram

metric

one of mle, jaccard, intersection, ks, mse, chisq

Value

a list 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