Learn R Programming

hawkesbow (version 1.0.3)

dpowerlaw: The power law distribution

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

dpowerlaw(x, shape = 1, scale = 1)

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

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

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

Value

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

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) = \theta a^\theta (a+t)^{-\theta-1}$$ where \(\theta\) is the shape parameter, and \(a\) the scale parameter.