Description Usage Arguments Details Value References See Also Examples
View source: R/moezipfR.utils.getInitialValues.R
The initial value of the parameters are computed using the empirical absolute frequencies of values one and two. The selection of robust initial values allows to reduce the number of iterations which in turn, reduces the computation time. In the case where one of the two first positive integer values does not appear in the data set, the default values are set equal to α = 1.0001 and β = 0.0001.
1 |
data |
Matrix of count data. |
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.
To obtain the initial value for α and β, one will assume that the data come from a Zipf(α) distribution. Thus, the initial value for β is set equal to one, and the inital value for α, denoted by α_0, is obtained equating the ratio of the theoretical probabilities at one and two to the corresponding emprirical ratio. Thus,
α_0 = log_2 \big (\frac{f_1}{f_2} \big)
where f_1 and f_2 are the absolute frequencies of one and two in the sample.
Returns the initial value for parameters α and β.
G<c3><bc>ney, Y., Tua<c3><a7>, Y., & Arslan, O. (2016). Marshall<e2><80><93>Olkin distribution: parameter estimation and application to cancer data. Journal of Applied Statistics, 1-13.
1 2 3 | data <- rmoezipf(100, 2.5, 1.3)
data <- moezipfR.utils.getDataMatrix(data)
initials <- moezipfR.utils.getInitialValues(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.