collapse = TRUE,
  comment = "#>",
  fig.path = "README-"

The poweRlaw package

Build Status Downloads CRAN

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data using the methods described in Clauset et al, 2009. It also provides function to fit log-normal and Poisson distributions. Additionally, a goodness-of-fit based approach is used to estimate the lower cut-off for the scaling region.

The code developed in this package was influenced from the python and R code found at Aaron Clauset's website. In particular, the R code of Laurent Dubroca and Cosma Shalizi.

To cite this package in academic work, please use:

Gillespie, C. S. "Fitting heavy tailed distributions: the poweRlaw package." Journal of Statistical Software, 64(2) 2015. (pdf).


This package is hosted on CRAN and can be installed in the usual way:


Alternatively, the development version can be install from from github using the devtools package:


Note Windows users have to first install Rtools.

Getting Started

To get started, load the package


then work the through the four vignettes (links to the current CRAN version):

Alternatively, you can access the vignettes from within the package:


The plots below show the line of best fit to the Moby Dick and blackout data sets (from Clauset et al, 2009).

Cumulative CDF of the Moby Dick and blackout data sets with line of best fit.

Other information

Development of this package was supported by Jumping Rivers

csgillespie/poweRlaw documentation built on April 8, 2018, 5:38 p.m.