Skip to contents

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

Usage

util_zero_truncated_poisson_aic(.x)

Arguments

.x

A numeric vector containing the data to be fitted to a zero-truncated poisson distribution.

Value

The AIC value calculated based on the fitted zero-truncated poisson distribution to the provided data.

Details

This function calculates the Akaike Information Criterion (AIC) for a zero-truncated poisson distribution fitted to the provided data.

Author

Steven P. Sanderson II, MPH

Examples

library(actuar)

# Example 1: Calculate AIC for a sample dataset
set.seed(123)
x <- rztpois(30, lambda = 3)
util_zero_truncated_poisson_aic(x)
#> [1] 123.8552