get.dist: Determine best-fit distribution Identify the best-fit...

View source: R/get.dist.R

get.distR Documentation

Determine best-fit distribution Identify the best-fit distribution for a univariate numeric vector

Description

Determine best-fit distribution Identify the best-fit distribution for a univariate numeric vector

Usage

get.dist(data, my_env)

Arguments

data

Input dataset.

my_env

Environment object.

Value

...

Fits several candidate distributions via MLE and selects the model with the lowest (finite) AIC. For strictly positive data, tail-sensitive families are also tried. If a triangular fit narrowly wins (Delta AIC <= 10 over a tail model, prefer the tail model (helps avoid spurious triangular wins on mildly skewed data).

Returns a list with: - distr: best model name (e.g., "gamma", "weibull", "triangle", ...) - params: named parameter vector for the best model - aic: named numeric vector of AICs for all attempted models (NA if failed) - fits_ok: named logical vector (TRUE where fit succeeded) - messages:named list of diagnostic messages per model (errors/warnings)


stratifyR documentation built on Sept. 10, 2026, 5:07 p.m.