# moezipfR.fit: MOEZipf parameters estimation. In moezipfR: Marshall-Olkin Extended Zipf

## Description

For a given count data set, usually of the type of ranking data or frequencies of frequencies data, estimates the parameters of the MOEZipf distribution by means of the maximum likelihood method.

## Usage

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 moezipfR.fit(data, init_alpha, init_beta, level = 0.95, ...) ## S3 method for class 'moezipfR' residuals(object, ...) ## S3 method for class 'moezipfR' fitted(object, ...) ## S3 method for class 'moezipfR' coef(object, ...) ## S3 method for class 'moezipfR' plot(x, ...) ## S3 method for class 'moezipfR' print(x, ...) ## S3 method for class 'moezipfR' summary(object, ...) ## S3 method for class 'moezipfR' logLik(object, ...) ## S3 method for class 'moezipfR' AIC(object, ...) ## S3 method for class 'moezipfR' BIC(object, ...) 

## Arguments

 data Matrix of count data. init_alpha Initial value of α parameter (α > 1). init_beta Initial value of β parameter (β > 0). level Confidence level used to calculate the intervals (default 0.95). ... Further arguments to the generic functions. In case of the function moezipfR.fit the extra arguments are passing to the optim function. object An object from class "moezipfR" (output of moezipfR.fit function). x An object from class "moezipfR" (output of moezipfR.fit function).

## Details

The argument data is a matrix where, for each row, the first column contains a count, and the second column contains its corresponding frequency.

The log-likelihood function is computed by means of the following equation:

l(α, β; x) = -α ∑_{i = 1} ^m f_{a}(x_{i}) log(x_{i}) + N (log(β) + \log(ζ(α)))

- ∑_{i = 1} ^m f_a(x_i) log[(ζ(α) - \bar{β}ζ(α, x_i)(ζ(α) - \bar{β}ζ(α, x_i + 1)))],

where N is the sample size N = ∑_{i = 1} ^m x_i f_a(x_i), m is the number of different values x_{i} in the sample, and f_{a}(x_i) is the absolute frequency of x_i.

The function optim is used to estimate the parameters.

## Value

Returns a moezipfR object composed by the maximum likelihood parameter estimations, their standard deviation, their confidence intervals and the log-likelihood value.

moezipfR.utils.getDataMatrix, moezipfR.utils.getInitialValues.
 1 2 3 data <- rmoezipf(100, 2.5, 1.3) data <- moezipfR.utils.getDataMatrix(data) obj <- moezipfR.fit(data, 1.001, 0.001)