Skip to contents

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

Usage

util_normal_aic(.x)

Arguments

.x

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

Value

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

Details

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

Author

Steven P. Sanderson II, MPH

Examples

# Example 1: Calculate AIC for a sample dataset
set.seed(123)
data <- rnorm(30)
util_normal_aic(data)
#> [1] 86.97017