identify.bic.optimal.data.distribution: Identify optimal distribution of data

View source: R/identify.bic.optimal.data.distribution.R

identify.bic.optimal.data.distributionR Documentation

Identify optimal distribution of data

Description

Identify which of four distributions—normal, log-normal, exponential, or gamma—best fits the given data according to BIC.

Usage

## S3 method for class 'bic.optimal.data.distribution'
identify(x)

Arguments

x

A numeric vector.

Value

A numeric code representing which distribution optimally fits x. Possible values are

  • 1 = normal,

  • 2 = log-normal,

  • 3 = exponential, and

  • 4 = gamma.

Examples

# Generate fake data.
set.seed(1234);
x <- rgamma(
    n = 20,
    shape = 2,
    scale = 2
    );
identify.bic.optimal.data.distribution(
    x = x
    );

OutSeekR documentation built on April 11, 2025, 5:39 p.m.