moezipfR.loglikelihood: Log-likelihood.

Description Usage Arguments Details Value Examples

View source: R/moezipfR.loglikelihood.R

Description

Computes the value of the log-likelihood function for a given data set and parameter values.

Usage

1

Arguments

data

Matrix of count data.

alpha

Value of the α parameter (α > 1).

beta

Value of the β parameter (β > 0).

Details

The argument data is a matrix where, for each row, the first column corresponds to 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.

Value

The log-likelihood value.

Examples

1
2
3

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
[1] 74.7765

moezipfR documentation built on May 2, 2019, 3:25 a.m.