Skip to contents

Estimate distribution function from values.

Usage

estimate_distribution(
  x,
  distr_options = c("beta", "gamma", "gaussian"),
  eval_metric = "aic"
)

Arguments

x

A numeric vector that will be evaluated.

distr_options

A vector of distribution names to evaluate the values.
Possible options: ("beta", "gamma", "gaussian")
Default: c("beta", "gamma", "gaussian")

eval_metric

The distribution evaluation metric names.
Possible options: ("aic", "bic", "loglik")
Default: "aic"

Value

The estimated family or extended.family function.

Examples

x <- rnorm(1000)
estimate_distribution(x)
#> 
#> Family: gaussian 
#> Link function: identity 
#> 

x <- rgamma(1000, shape = 12)
estimate_distribution(x)
#> 
#> Family: Gamma 
#> Link function: logit 
#>