zipfpolylogMoments {zipfextR}R Documentation

Moments of the Zipf-Polylog Distribution.

Description

General function to compute the k-th moment of the ZipfPolylog distribution for any integer value k \geq 1, when it exists. #' For k = 1, this function returns the same value as the zipfpolylogMean function.

Usage

zipfpolylogMoments(k, alpha, beta, tolerance = 10^(-4), nSum = 1000)

Arguments

k

Order of the moment to compute.

alpha

Value of the \alpha parameter (\alpha > k + 1).

beta

Value of the \beta parameter (\beta \in (-\infty, +\infty)).

tolerance

Tolerance used in the calculations (default = 10^{-4}).

nSum

The number of terms used for computing the Polylogarithm function (default = 1000).

Details

The k-th moment of the Zipf-Polylog distribution is always finite, but, for \alpha >1 and \beta = 0 the k-th moment is only finite for all \alpha > k + 1. It is computed by calculating the partial sums of the serie, and stopping when two consecutive partial sums differ less than the tolerance value. The value of the last partial sum is returned.

Value

A positive real value corresponding to the k-th moment of the distribution.

Examples

zipfpolylogMoments(1, 0.2, 0.90)
zipfpolylogMoments(3, 4.5, 0.90,  1*10^(-3))

[Package zipfextR version 1.0.2 Index]