Learn R Programming

crandep (version 0.3.1)

Supp: Survival function of discrete power law

Description

Supp returns the survival function at x for the discrete power law with exponent (1.0 / xi1 + 1.0), for values greater than or equal to u.

Usage

Supp(x, u, xi1, log = FALSE)

Value

A numeric vector of the same length as x

Arguments

x

Vector of positive integers

u

Scalar, non-negative integer threshold

xi1

Scalar, a positive real number representing the shape parameter

log

Boolean (default 'FALSE'), whether the survival function should be returned on the log scale.

Details

The survival function used is S(x) = Pr(X >= x), where X is a random variable following the discrete power law. The inclusion of x in the sum means S(x) may not necessarily equal to Pr(X > x) as the distribution is discrete. In the case of discrete power law, it can be shown that S(x) = hzeta(alpha, x)/hzeta(alpha, u), where hzeta is the Hurwitz zeta function i.e. hzeta(y, z) = z^(-y) + (z+1)^(-y) + (z+2)^(-y) + ... and alpha = 1.0 / xi1 + 1.0. That xi1 is used instead of alpha is for alignment with the parametrisation in dmix, Smix and mcmc_mix.

See Also

dupp for the corresponding probability mass function, Smix for the survival function of the discrete extreme value mixture distribution.

Examples

Run this code
Supp(c(10,20,30,40,50), 12, 2.0)

Run the code above in your browser using DataLab