dpowerlaw: The power law distribution

Description Usage Arguments Details Value

View source: R/powerlaw.R

Description

Density, distribution function, quantile function and random generation for the power law distribution with shape equal to shape and scale equal to scale.

Usage

1
2
3
4
5
6
7
dpowerlaw(x, shape = 1, scale = 1)

ppowerlaw(q, shape = 1, scale = 1)

qpowerlaw(p, shape = 1, scale = 1)

rpowerlaw(n, shape = 1, scale = 1)

Arguments

x, q

vector of quantiles.

shape

parameter of shape.

scale

parameter of scale.

p

vector of probabilities.

n

number of observations.

Details

The density function of the power law distribution is

f(t) = θ a^θ (a+t)^{-θ-1}

where θ is the shape parameter, and a the scale parameter.

Value

dpowerlaw gives the density, ppowerlaw gives the distribution function, qpowerlaw gives the quantile function, and rpowerlaw generates random deviates.


hawkesbow documentation built on April 10, 2021, 1:07 a.m.