#include <MCMC.h>
Inheritance diagram for SliceStep:


Public Member Functions | |
| SliceStep (ParameterT< double > *parameter) | |
| void | SetBounds (double low, double high) |
| void | SetW (double w) |
| void | SetM (int m) |
Protected Member Functions | |
| virtual void | DoStep (void) |
Note: only univariate slices are supported
ParameterT constructors must provide appropriate step width, parameter->W(), and number of tries, parameter->M(), if defaults (1 and MUnbounded, respectively) are to be avoided. lowBound_ and highBound_ defaults must be reset if parameter range is bounded, e.g., frequencies in [0,1].
Definition at line 496 of file MCMC.h.
| SliceStep::SliceStep | ( | ParameterT< double > * | parameter | ) | [explicit] |
Constructor
| parameter | Pointer to the parameter associated with this step |
Notice that the defaults will result in the slice sampler adapting the "step out" width as the simulation proceeds. Adapting the width is permissible only when the distribution is unimodal. If you're not sure that your distribution is unimodal, you should define W() and M() to return values that seem reasonable to you.
| void SliceStep::SetBounds | ( | double | low, | |
| double | high | |||
| ) | [virtual] |
Sets upper and lower limits on values allowed
| low | Lower bound on parameter | |
| high | Upper bound on parameter |
Implements StepBase.
Definition at line 573 of file MCMC.cpp.
References Util::dbl_max, StepBase::highBound_, StepBase::lowBound_, and StepBase::w_.
| void SliceStep::SetW | ( | double | w | ) | [virtual] |
Reset step width
| w | New step width |
Implements StepBase.
Definition at line 586 of file MCMC.cpp.
References StepBase::w_.
| void SliceStep::SetM | ( | int | m | ) | [virtual] |
Reset number of steps out allowed
| m | New number of steps out allowed |
Implements StepBase.
Definition at line 595 of file MCMC.cpp.
References StepBase::m_.
| void SliceStep::DoStep | ( | void | ) | [protected, virtual] |
Return a new value from the slice sampler
Implements StepBase.
Definition at line 611 of file MCMC.cpp.
References ParameterT< T >::Assign(), and ParameterT< T >::Value().
1.5.1