50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

distributionsrd (version 0.0.6)

clauset.xmin: Pareto scale determination <U+00E0> la Clauset

Description

This method determines the optimal scale parameter of the Pareto distribution using the iterative method clauset2009powerdistributionsrdthat minimizes the Kolmogorov-Smirnov distance.

Usage

clauset.xmin(x, q = 0)

Arguments

x

data vector

q

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

Value

Returns a named list containing a

coefficients

Named vector of coefficients

KS

Minimum Kolmogorov-Smirnov distance

n

Number of observations in the Pareto tail

coeff.evo

Evolution of the Pareto shape parameter over the iterations

References

Examples

Run this code
# NOT RUN {
## Determine cuttof from compostie lognormal-Pareto distribution using Clauset's method
dist <- c("lnorm", "pareto")
coeff <- c(coeff1.meanlog = -0.5, coeff1.sdlog = 0.5, coeff2.k = 1.5)
x <- rcomposite(1e3, dist = dist, coeff = coeff)
out <- clauset.xmin(x = x)
out$coefficients
coeffcomposite(dist = dist, coeff = coeff, startc = c(1, 1))$coeff2

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

Run the code above in your browser using DataLab