Skip to main content
QUICK REVIEW

[Paper Review] Fitting heavy tailed distributions: the poweRlaw package

Colin S. Gillespie|arXiv (Cornell University)|Jul 13, 2014
Diffusion and Search DynamicsBiochemistry, Genetics and Molecular Biology14 references105 citations
TL;DR

The paper introduces the poweRlaw R package, a principled, statistical framework for fitting and comparing heavy-tailed distributions—particularly power laws and log-normal distributions—using maximum likelihood estimation and rigorous hypothesis testing. It enables researchers to reliably estimate scaling parameters, select optimal lower bounds ($x_{\min}$), and compare models via Vuong's test, addressing widespread misuse of log-log plotting for power law fitting.

ABSTRACT

Over the last few years, the power law distribution has been used as the data generating mechanism in many disparate fields. However, at times the techniques used to fit the power law distribution have been inappropriate. This paper describes the poweRlaw R package, which makes fitting power laws and other heavy-tailed distributions straightforward. This package contains R functions for fitting, comparing and visualising heavy tailed distributions. Overall, it provides a principled approach to power law fitting.

Motivation & Objective

  • To address the widespread misuse of log-log plotting for fitting power laws, which leads to biased and unreliable parameter estimates.
  • To provide a principled, statistical approach to fitting heavy-tailed distributions, especially power laws, in empirical data.
  • To develop an accessible, consistent R package that supports fitting, comparing, and visualizing heavy-tailed distributions.
  • To enable researchers to test whether a power law or alternative heavy-tailed distribution better fits their data using formal statistical criteria.

Proposed method

  • Uses maximum likelihood estimation (MLE) for both continuous and discrete power law distributions, with a corrected MLE approximation for discrete data using $x_{\min} - 0.5$.
  • Employs a Kolmogorov-Smirnov (KS) statistic to estimate the optimal $x_{\min}$ by minimizing the distance between empirical and fitted cumulative distribution functions.
  • Implements Vuong's test to statistically compare non-nested models (e.g., power law vs. log-normal), assessing which model is closer to the true data-generating process.
  • Provides S4 reference classes for distribution objects that encapsulate data, $x_{\min}$, parameters, and internal caching for efficient computation.
  • Supports model comparison via log-likelihood ratios and bootstrap procedures to assess model fit and parameter uncertainty.
  • Offers standardized methods for plotting PDFs, CDFs, random variate generation, and data CDFs through a consistent object-oriented interface.

Experimental results

Research questions

  • RQ1Is the power law distribution a statistically valid fit for empirical data, or is the observed pattern an artifact of poor fitting techniques like log-log plotting?
  • RQ2What is the optimal value of $x_{\min}$ that minimizes the discrepancy between the empirical and theoretical cumulative distribution functions?
  • RQ3Does a power law distribution provide a better fit than alternative heavy-tailed distributions such as the log-normal for a given dataset?
  • RQ4Can statistical hypothesis tests like Vuong's test reliably distinguish between competing heavy-tailed models when fitting real-world data?
  • RQ5How can researchers systematically compare and validate heavy-tailed distributions in a way that avoids subjective or ad hoc fitting procedures?

Key findings

  • The package enables reliable fitting of power laws and other heavy-tailed distributions using maximum likelihood estimation, avoiding the pitfalls of log-log plotting.
  • The optimal $x_{\min}$ is estimated via a Kolmogorov-Smirnov statistic, reducing subjectivity and improving model accuracy.
  • Vuong's test provides a formal statistical comparison between non-nested models, with a p-value of 0.682 indicating no significant preference for either power law or log-normal fit in the Moby Dick word frequency example.
  • The object-oriented design of the package allows consistent, modular fitting of multiple distributions with shared syntax and efficient internal caching.
  • The package supports uncertainty quantification through bootstrap procedures, enabling robust estimation of parameter and $x_{\min}$ confidence intervals.
  • The framework facilitates principled model comparison, helping researchers avoid overclaiming power law behavior in empirical data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.