Chris Beaumont's IDL Library

Download source code

single page | use frames     summary     class     fields     routine details     file attributes

distributions/

pl_like.pro

toppl_like

Statistics

result = pl_like( [params] [, derivs] [, data=data] [, alpha=alpha] [, xmin=xmin])

This function calculates the log-likelihood of the data, under a powerlaw model. The powerlaw distribution is given by f(x) = (alpha - 1) (xmin)^(alpha - 1) x^(-alpha)

To maximize speed, the function does not check for values of data < xmin. However, the output is useless when any data are < xmin.

Return value

Ln(Product( f(data_i) ) )

Parameters

params in optional

A two element vector specifying [alpha, xmin].

derivs in optional

A named variable to hold the partial derivative of the log-likelihood with respect to alpha and xmin.

Keywords

data in optional

A vector of data values, assumed to be >= xmin

alpha in optional

Another way to specify alpha. This takes precedence over any variable stored in params[0].

xmin in optional

Another way to specify xmin. This takes precedence over any variable stored in params[1].

File attributes

Modifcation date: Mon Mar 22 16:17:13 2010
Lines: 68