Learn R Programming

sourceR (version 1.0.1)

PoisGammaDPUpdate: PoisGammaDPUpdate

Description

This class implements a marginal Gibbs sampler for a Dirichlet process prior on the mean of a Poisson distributed random variable, with a Gamma-distributed base function.

Usage

PoisGammaDPUpdate

Arguments

Value

Object of PoisGammaDPUpdate

Format

Object of R6Class with methods for updating a DirichletProcessNode instance.

Methods

new(node)
constructor takes an instance of a DirichletProcessNode node
update()
when called, updates node

Details

The marginal Gibbs sampler is based on the description in Gelman et al. Bayesian Data Analysis, 3rd edition, Chapter 23.

Please note that no checks are performed as to the suitability of this algorithm for a particular StochasticNode. It is up to the user to use the correct update algorithm for the appropriate nodes.