Patterns in static

Apophenia

apop_gamma.c File Reference

Data Structures

Variables


Detailed Description

The gamma distribution.

The gamma distribution.

Copyright (c) 2005--2007 by Ben Klemens. Licensed under the modified GNU GPL v2; see COPYING and COPYING2.


Variable Documentation

The Gamma distribution gsl_matrix *data = d->matrix;

Location of data in the grid is not relevant; send it a 1 x N, N x 1, or N x M and it will all be the same.

apop_gamma.estimate() is an MLE, so feed it appropriate apop_mle_settings.

To specify that you have frequency or ranking data, use

apop_data *my_copy = apop_model_copy(apop_gamma);
Apop_model_add_group(my_copy, apop_rank);
apop_model *out = apop_estimate(my_rank_data, my_copy);

$G(x, a, b) = 1/(\Gamma(a) b^a) x^{a-1} e^{-x/b}$

$ln G(x, a, b)= -ln \Gamma(a) - a ln b + (a-1)ln(x) + -x/b$

$d ln G/ da = -\psi(a) - ln b + ln(x) $ (also, $d ln \gamma = \psi$)

$d ln G/ db = -a/b - x $

SourceForge.net Logo

Autogenerated by doxygen on 23 Nov 2009.