Public Member Functions

nGammaPrior Class Reference

negative gamma prior More...

#include <prior.h>

Inheritance diagram for nGammaPrior:
GammaPrior PsiPrior

List of all members.

Public Member Functions

 nGammaPrior (double shape, double scale)
 nGammaPrior (const nGammaPrior &original)
 copy constructor
double pdf (double x) const
 return pdf at position x
double dpdf (double x)
 return derivative of pdf
double rand (void)
 draw a random number
PsiPriorclone (void) const
 clone by value
double mean (void) const
 return the mean
void shrink (double xmin, double xmax)
 shrink the prior if it is broader than the range between xmin and xmax
int get_code (void) const
 return the typcode of this prior
double cdf (double x) const
 return the typcode of this prior
double ppf (double p, double start=NULL) const

Detailed Description

negative gamma prior

This defines a gamma prior that is defined for the negative axis. Thus, the pdf is defined by

\[ f(x) = (-x)^{k-1} \frac{\exp(x/\theta)}{\theta^k\Gamma(k)}, \]

for negative numbers and is zero otherwise.


The documentation for this class was generated from the following files: