poweRlaw

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data. Additionally, a goodness-of-fit based approach is used to estimate the lower cutoff for the scaling region.

https://github.com/csgillespie/powerlaw

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.5%) to scientific vocabulary

Keywords

clauset cran powerlaw r
Last synced: 6 months ago · JSON representation

Repository

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data. Additionally, a goodness-of-fit based approach is used to estimate the lower cutoff for the scaling region.

Basic Info
Statistics
  • Stars: 113
  • Watchers: 17
  • Forks: 24
  • Open Issues: 1
  • Releases: 2
Topics
clauset cran powerlaw r
Created about 13 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# The poweRlaw package

[![codecov.io](https://codecov.io/github/csgillespie/poweRlaw/coverage.svg?branch=master)](https://app.codecov.io/github/csgillespie/poweRlaw?branch=master)
[![Downloads](https://cranlogs.r-pkg.org/badges/poweRlaw?color=brightgreen)](https://cran.r-project.org/package=poweRlaw)
[![CRAN](https://www.r-pkg.org/badges/version/poweRlaw)](https://cran.r-project.org/package=poweRlaw)

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](http://arxiv.org/abs/0706.1062). 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](https://doi.org/10.18637/jss.v064.i02)).

For a different way of handling powerlaw type distributions, see

Gillespie, C.S. "
*Estimating the number of casualties in the American Indian war: a Bayesian analysis using the power law distribution.*" Annals of Applied Statistics, 2017. ([pdf](https://doi.org/10.1214/17-AOAS1082))

Installation
------------

This package is hosted on [CRAN](https://cran.r-project.org/package=poweRlaw) and can be installed in the usual way:
```{r, eval =FALSE}
install.packages("poweRlaw")
```
Alternatively, the development version can be install from from github using the devtools package:
```{r, eval = FALSE}
install.packages("devtools")
devtools::install_github("csgillespie/poweRlaw")
```

Getting Started
---------------

To get started, load the package
```{r}
library("poweRlaw")
```
then work through the four vignettes (links to the current CRAN version):

 * [Getting started](https://cran.r-project.org/package=poweRlaw/vignettes/a_introduction.pdf)
 * [Worked examples](https://cran.r-project.org/package=poweRlaw/vignettes/b_powerlaw_examples.pdf)
 * [Comparing distributions](https://cran.r-project.org/package=poweRlaw/vignettes/c_comparing_distributions.pdf)
 * [JSS paper](https://cran.r-project.org/package=poweRlaw/vignettes/d_jss_paper.pdf)

Alternatively, you can access the vignettes from within the package:
```{r, eval =FALSE}
browseVignettes("poweRlaw")
```
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.](man/figures/figure1.png)

Other information
-----------------

 * Unfortunately, I can no longer commit time to adding new feature
 If you find bugs, please use the github [issue tracker](https://github.com/csgillespie/poweRlaw/issues)
 * Feel free to submit pull requests
 * Data was originally obtained from Arron Clausett's website. But this site is no longer 
 available.

---

Development of this package was supported by [Jumping Rivers](https://www.jumpingrivers.com)

Owner

  • Name: Colin Gillespie
  • Login: csgillespie
  • Kind: user
  • Location: Newcastle, UK
  • Company: Newcastle University

Author of Efficient R programming. R consultant with Jumping Rivers and Senior Statistics lecturer at Newcastle University.

GitHub Events

Total
  • Create event: 3
  • Release event: 1
  • Issues event: 11
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 7
  • Push event: 12
  • Pull request event: 5
Last Year
  • Create event: 3
  • Release event: 1
  • Issues event: 11
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 7
  • Push event: 12
  • Pull request event: 5

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 506
  • Total Committers: 6
  • Avg Commits per committer: 84.333
  • Development Distribution Score (DDS): 0.049
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Colin Gillespie c****e@g****m 481
csgillespie b****s@t****m 9
Luiz Max Carvalho l****o@u****r 7
mpadge m****m@e****m 5
Zhongpeng Lin (林中鹏) l****p@g****m 3
Max Joseph m****h@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 94
  • Total pull requests: 13
  • Average time to close issues: 11 months
  • Average time to close pull requests: 6 months
  • Total issue authors: 46
  • Total pull request authors: 6
  • Average comments per issue: 2.31
  • Average comments per pull request: 1.62
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 4
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 9 hours
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • csgillespie (30)
  • lsaravia (6)
  • linzhp (4)
  • anilaba (3)
  • haikolietz (3)
  • Lvulis (2)
  • dbmehta (2)
  • damienchallet (2)
  • jkeirstead (2)
  • jcredberry (2)
  • changshuaili (2)
  • LaurentFranckx (2)
  • xerroxcopy (1)
  • scais (1)
  • jpgoldberg (1)
Pull Request Authors
  • csgillespie (7)
  • mpadge (2)
  • mbjoseph (1)
  • maxbiostat (1)
  • linzhp (1)
  • khemeia (1)
Top Labels
Issue Labels
enhancement (14) bug (8) Documentation (7) Fix in progress (2) question (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 5,440 last-month
  • Total docker downloads: 45,529
  • Total dependent packages: 9
    (may contain duplicates)
  • Total dependent repositories: 17
    (may contain duplicates)
  • Total versions: 24
  • Total maintainers: 1
cran.r-project.org: poweRlaw

Analysis of Heavy Tailed Distributions

  • Versions: 19
  • Dependent Packages: 9
  • Dependent Repositories: 16
  • Downloads: 5,440 Last month
  • Docker Downloads: 45,529
Rankings
Forks count: 3.2%
Stargazers count: 3.7%
Dependent packages count: 6.1%
Downloads: 6.7%
Dependent repos count: 7.1%
Average: 7.8%
Docker downloads count: 19.8%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-powerlaw
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.4%
Stargazers count: 33.6%
Forks count: 34.2%
Average: 35.9%
Dependent packages count: 51.6%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.4.0 depends
  • methods * imports
  • parallel * imports
  • pracma * imports
  • stats * imports
  • utils * imports
  • covr * suggests
  • knitr * suggests
  • testthat * suggests