#include <MCMC.h>
Inheritance diagram for ParameterT< T >:


Public Member Functions | |
| ParameterT (std::string label) | |
| virtual | ~ParameterT (void) |
| virtual double | llike (const T x) const |
| virtual double | lPrior (const T x) const |
| virtual T | propose (const T current) const |
| virtual double | lQ (const T x, const T y) const |
| void | Assign (const T &x) |
| virtual const T | Function (const bool doCalc=true) const |
| virtual const T | Value (void) const |
ParameterT is one of the three workhorses in the simulation framework. Each parameter in the statistical model must be derived separately from ParameterT. It is not necessary to declare and define separate classes for parameters that share the same probabilistic structure, e.g., allele counts in different populations or measurements of yields in different experimental blocks, but each parameter must be pushed separately onto the step_ stack in Model.
It is often useful for the derived class to store a pointer to the model of which it is part. This allows the Model class to define access functions to the values of other parameters, facilitating calculation of the full conditionals.
lPrior() and llike(), the log prior and log likelihood for a particular parameter respectively, are used only as a sum. Thus, if it is more convenient to write the full conditional in a single function, either may be used. I typically find it easiest to write lPrior() as expressing the "probability" of the parameter, given hyperparameters on which it depends and llike() as expressing the "probability" of parameters (or data that depend on this one. But your mileage may vary.
Definition at line 125 of file MCMC.h.
| ParameterT< T >::ParameterT | ( | std::string | label | ) | [inline] |
| virtual ParameterT< T >::~ParameterT | ( | void | ) | [inline, virtual] |
| virtual double ParameterT< T >::llike | ( | const T | x | ) | const [inline, virtual] |
| virtual double ParameterT< T >::lPrior | ( | const T | x | ) | const [inline, virtual] |
| virtual T ParameterT< T >::propose | ( | const T | current | ) | const [inline, virtual] |
| virtual double ParameterT< T >::lQ | ( | const T | x, | |
| const T | y | |||
| ) | const [inline, virtual] |
| void ParameterT< T >::Assign | ( | const T & | x | ) | [inline] |
Assign value
| x | Value to assign to this parameter |
Definition at line 180 of file MCMC.h.
Referenced by SliceStep::DoStep().
| virtual const T ParameterT< T >::Function | ( | const bool | doCalc = true |
) | const [inline, virtual] |
| virtual const T ParameterT< T >::Value | ( | void | ) | const [inline, virtual] |
Value of the parameter
Reimplemented from ParameterBase.
Definition at line 192 of file MCMC.h.
Referenced by SliceStep::DoStep(), StepBase::dVecValue(), StepBase::iValue(), StepBase::iVecValue(), and StepBase::Value().
1.5.1