Public Member Functions

ninvGammaPrior Class Reference

negative inverse gamma prior More...

#include <prior.h>

Inheritance diagram for ninvGammaPrior:
invGammaPrior PsiPrior

List of all members.

Public Member Functions

 ninvGammaPrior (double shape, double scale)
 ninvGammaPrior (const ninvGammaPrior &original)
double pdf (double x)
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)
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
 Doesn't shrink!!

Detailed Description

negative inverse gamma prior

This defines a negative 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: