Public Member Functions

invGammaPrior Class Reference

inverse gamma prior More...

#include <prior.h>

Inheritance diagram for invGammaPrior:
PsiPrior ninvGammaPrior

List of all members.

Public Member Functions

 invGammaPrior (double shape, double scale)
 Initialize inverse gamma prior.
 invGammaPrior (const invGammaPrior &original)
 copy constructor
virtual double pdf (double x)
virtual double dpdf (double x)
 evaluate the derivative of the pdf of the prior at position x (in this default form, the parameter is completely unconstrained)
virtual double rand (void)
 draw a random number
PsiPriorclone (void) const
 clone by value
virtual double mean (void) const
 return the mean
double std (void) const
 return the standard deviation
virtual void shrink (double xmin, double xmax)
 shrink the prior if it is broader than the range between xmin and xmax
virtual int get_code (void) const
 Doesn't shrink!!

Detailed Description

inverse gamma prior

This defines an inverse gamma prior that is conjugate to the variance of a normal distribution and can probably be assumed quasi conjugate to the width or parameters like that. Its pdf is defined by

\[ f(x) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{-\alpha-1} \exp ( -\beta/x ) \]


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