简体   繁体   中英

Min max optimizations for power law parameters in R

Assuming a data set is drawn from a power law distribution when the value is greater than $x_{min}$. I want to estimate the $\\alpha$ and $x_{min}$ for the power law distribution in R.

According to http://arxiv.org/abs/0706.1062 :

$\\hat\\alpha=1+n[\\sum\\limits_{i=1}^n\\ln\\frac{x_i}{x_{min}}]^{-1}$ (Eq. 16)

And $\\hat x_{min}$ is the value of $x_{min}$ minimizing

$D=\\max\\limits_{x\\geq x_{min}}|S(x) - P(x)|$ (Eq. 24)

in which $P(x) = (\\frac{x}{x_{min}})^{-\\alpha+1}$, and $S(x)$ is the ccdf of the data, which can be obtain in R using 1-ecdf(data)(x)

How do I do such optimization and get $\\alpha$ and $x_{min}$ in R?

感谢Glen_b指出, poweRlaw提供了我想要的实现。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM