power.law.fit: 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.
Value
An object with class mle. It can be used to
calculate confidence intervals and log-likelihood. See
mle-class for details.
concept
Power-law
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.
References
Power laws, Pareto distributions and Zipf's law,
M. E. J. Newman, Contemporary Physics, in press.
# This should approximately yield the correct exponent 3g <- barabasi.game(1000) # increase this number to have a better estimationd <- degree(g, mode="in")
power.law.fit(d+1, 20)