dPPS: The Pareto Positive Stable (PPS) distribution

Description Usage Arguments Details Value References Examples

View source: R/managing.R

Description

Density, distribution function, hazard function, quantile function and random generation for the Pareto Positive Stable (PPS) distribution with parameters lam, sc and v.

Usage

1
2
3
4
5
6
7
8
9
dPPS(x, lam, sc, v, log = FALSE)

hPPS(x, lam, sc, v)

pPPS(x, lam, sc, v, lower.tail = TRUE, log.p = FALSE)

qPPS(p, lam, sc, v, lower.tail = TRUE, log.p = FALSE)

rPPS(n, lam, sc, v)

Arguments

x

vector of quantiles.

lam

vector of (non-negative) first shape parameters.

sc

vector of (non-negative) scale parameters.

v

vector of (non-negative) second shape parameters.

log

logical; if TRUE, probabilities/densities p are returned as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X ≤ x], otherwise, P[X > x].

log.p

logical; if TRUE, probabilities/densities p are returned as log(p).

p

vector of probabilities.

n

number of random values to return.

Details

The PPS distribution has density

f(x) = λ ν [log(x / σ)] ^ (ν-1) exp(- λ [log(x / σ)] ^ ν) / x,

cumulative distribution function

F(x) = 1 - exp(- λ [log(x / σ) ^ ν]),

quantile function

Q(p) = σ exp([- (1 / λ) log(1 - p)] ^ (1 / ν))

and hazard function

λ ν (log(x / σ)) ^ (ν - 1) x ^ (-1).

See Sarabia and Prieto (2009) for the details about the numbers random generation.

Value

dPPS gives the (log) density, pPPS gives the (log) distribution function, qPPS gives the quantile function, and rpois generates random samples. Invalid parameters will result in return value NaN, with a warning. The length of the result is determined by n for rPPS, and is the common length of the numerical arguments for the other functions.

References

Sarabia, J.M and Prieto, F. (2009). The Pareto-positive stable distribution: A new descriptive model for city size data, Physica A: Statistical Mechanics and its Applications, 388(19), 4179-4191.

Examples

1
2
3
4
5
print(x <- sort(rPPS(10, 1.2, 100, 2.3)))
dPPS(x, 1.2, 100, 2.3)
pPPS(x, 1.2, 100, 2.3)
qPPS(pPPS(x, 1.2, 100, 2.3), 1.2, 100, 2.3)
hPPS(x, 1.2, 100, 2.3)

ParetoPosStable documentation built on May 30, 2017, 8:26 a.m.