clauset.xmax: Pareto scale determination à la Clauset

Description Usage Arguments Value References Examples

View source: R/invpareto.R

Description

This method determines the optimal scale parameter of the Inverse Pareto distribution using the iterative method \insertCiteclauset2009powerdistributionsrd that minimizes the Kolmogorov-Smirnov distance.

Usage

1
clauset.xmax(x, q = 1)

Arguments

x

data vector

q

Percentage of data to search over (starting from the smallest values)

Value

Returns a named list containing a

coefficients

Named vector of coefficients

KS

Minimum Kolmogorov-Smirnov distance

n

Number of observations in the Inverse Pareto tail

coeff.evo

Evolution of the Inverse Pareto shape parameter over the iterations

References

\insertAllCited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Determine cuttof from compostie InvPareto-Lognormal distribution using Clauset's method
dist <- c("invpareto", "lnorm")
coeff <- c(coeff1.k = 1.5, coeff2.meanlog = 1, coeff2.sdlog = 0.5)
x <- rcomposite(1e3, dist = dist, coeff = coeff)
out <- clauset.xmax(x = x)
out$coefficients
coeffcomposite(dist = dist, coeff = coeff, startc = c(1, 1))$coeff1

## Speed up method by considering values above certain quantile only
dist <- c("invpareto", "lnorm")
coeff <- c(coeff1.k = 1.5, coeff2.meanlog = 1, coeff2.sdlog = 0.5)
x <- rcomposite(1e3, dist = dist, coeff = coeff)
out <- clauset.xmax(x = x, q = 0.5)
out$coefficients
coeffcomposite(dist = dist, coeff = coeff, startc = c(1, 1))$coeff1

distributionsrd documentation built on July 1, 2020, 10:21 p.m.