mlzipf: Zipf distribution maximum likelihood estimation

mlzipfR Documentation

Zipf distribution maximum likelihood estimation

Description

For the density function of the Zipf distribution see Zipf.

Usage

mlzipf(x, na.rm = FALSE, ...)

Arguments

x

a (non-empty) numeric vector of data values.

na.rm

logical. Should missing values be removed?

...

Not currently in use.

Details

This function follows the same format as every other function in the package, but most applications of Zipf's law use rank-abundance data. See, e.g., sads::fitzipf for estimation of this sort of data.

Value

mlzipf returns an object of class univariateML. This is a named numeric vector with maximum likelihood estimates for N and s and the following attributes:

model

The name of the model.

density

The density associated with the estimates.

logLik

The loglikelihood at the maximum.

support

The support of the density.

n

The number of observations.

call

The call as captured my match.call

References

Johnson, N. L., Kemp, A. W., & Kotz, S. (2005). Univariate Discrete Distributions (3rd ed.). Wiley-Blackwell.

See Also

Zipf for the density.

Examples

AIC(mlzipf(corbet)) # 2729.536
AIC(mllgser(corbet)) # 2835.883

JonasMoss/univariateML documentation built on Nov. 3, 2024, 3:03 p.m.