power.law.fit {igraph}R Documentation

Fitting a power-law distribution function to discrete data

Description

power.law.fit fits a power-law distribution to a data set.

Usage

power.law.fit(x, xmin = NULL, start = 2, ...)

Arguments

x The data to fit, a numeric vector containing integer values.
xmin The lower bound for fitting the power-law. If NULL, the smallest value in x will be used. This argument makes it possible to fit only the tail of the distribution.
start The initial value of the exponent for the minimizing function. Ususally it is safe to leave this untouched.
... Additional arguments, passed to the maximum likelyhood optimizing function, mle.

Details

A power-law distribution is fitted with maximum likelyhood methods as recommended by Newman and (by default) the BFGS optimization (see mle) algorithm is applied.

The additional arguments are passed to the mle function, so it is possible to change the optimization method and/or its parameters.

Value

An object with class ‘mle’. It can be used to calculate confidence intervals and log-likelihood. See mle-class for details.

Author(s)

Gabor Csardi csardi@rmki.kfki.hu

References

Power laws, Pareto distributions and Zipf's law, M. E. J. Newman, Contemporary Physics, in press.

See Also

mle

Examples

# This should approximately yield the correct exponent 3
g <- barabasi.game(1000)    # increase this number to have a better estimation
d <- degree(g, mode="in")
power.law.fit(d+1, 20)

[Package igraph version 0.5.2 Index]