Description Usage Arguments Details Value Examples
View source: R/moezipfR.loglikelihood.R
Computes the value of the log-likelihood function for a given data set and parameter values.
1 | moezipfR.loglikelihood(data, alpha, beta)
|
data |
Matrix of count data. |
alpha |
Value of the α parameter (α > 1). |
beta |
Value of the β parameter (β > 0). |
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.
The log-likelihood value.
1 2 3 | data <- rmoezipf(100, 2.5, 1.3)
data <- moezipfR.utils.getDataMatrix(data)
moezipfR.loglikelihood(data, 2.5, 1.3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.