Overview
This project provides implementations of the plfit and plpva functions, which are essential tools for fitting power-law distributions to empirical data. Power-law distributions are significant in various fields, including physics, biology, economics, and social sciences, due to their ability to describe a wide range of natural and man-made phenomena. Understanding and accurately fitting these distributions allows researchers to better model complex systems and predict future events based on observed data.
The plfit function is designed to fit a power-law distribution to a given data set using maximum likelihood estimation (MLE). This method is known for providing robust parameter estimates, particularly in the presence of large fluctuations in the tail of the distribution, which are characteristic of power-law behaviors. The function determines the scaling parameter alpha and the lower bound xmin, above which the power-law behavior holds. This is crucial for accurately characterizing the distribution and ensuring the reliability of the model.
The plpva function complements plfit by performing a statistical test to assess the goodness-of-fit of the power-law model. Using a p-value derived from the Kolmogorov–Smirnov (KS) statistic and likelihood ratios, plpva quantifies how well the power-law distribution matches the empirical data compared to synthetic datasets generated from the fitted model. This allows researchers to determine the plausibility of the power-law hypothesis and rule out alternative distributions.