dPPS: The Pareto Positive Stable (PPS) distribution

Description Usage Arguments Details Value References Examples

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)

Example output

 [1] 139.2998 141.6430 147.1610 190.7899 206.5165 211.4630 223.2622 232.0449
 [9] 298.4270 430.8541
 [1] 0.0042894915 0.0044459875 0.0047612109 0.0052831232 0.0049619570
 [6] 0.0048353035 0.0045035082 0.0042404456 0.0023798746 0.0005954496
 [1] 0.09031813 0.10055543 0.12599153 0.35548590 0.43623823 0.46047283
 [7] 0.51560164 0.55400585 0.77086393 0.94319642
 [1] 139.2998 141.6430 147.1610 190.7899 206.5165 211.4630 223.2622 232.0449
 [9] 298.4270 430.8541
 [1] 0.004715375 0.004943037 0.005447557 0.008197064 0.008801514 0.008962113
 [7] 0.009297117 0.009507850 0.010386294 0.010482606

ParetoPosStable documentation built on May 2, 2019, 4:05 p.m.