Skip to contents

This function estimates the parameters of a t distribution from the provided data using maximum likelihood estimation, and then calculates the AIC value based on the fitted distribution.

Usage

util_t_aic(.x)

Arguments

.x

A numeric vector containing the data to be fitted to a t distribution.

Value

The AIC value calculated based on the fitted t distribution to the provided data.

Details

This function calculates the Akaike Information Criterion (AIC) for a t distribution fitted to the provided data.

This function fits a t distribution to the input data using maximum likelihood estimation and then computes the Akaike Information Criterion (AIC) based on the fitted distribution.

Author

Steven P. Sanderson II, MPH

Examples

# Generate t-distributed data
set.seed(123)
x <- rt(100, df = 5, ncp = 0.5)

# Calculate AIC for the generated data
util_t_aic(x)
#> [1] 305.77