Tuesday, June 9, 2026

momentify R bundle at BAYSM14 – Statisfaction


I offered an arxived paper of my postdoc on the massive success Younger Bayesian Convention in Vienna. The massive image of the discuss is easy: there are conditions in Bayesian nonparametrics the place you don’t know easy methods to pattern from the posterior distribution, however you may solely compute posterior expectations (so-called marginal strategies). So e.g. you can’t present credible intervals. However generally all of the moments of the posterior distribution can be found as posterior expectations. So morally, it is best to be capable to say extra concerning the posterior distribution than simply reporting the posterior imply. To be extra particular, we think about a hazard (h) combination mannequin

the place k is a kernel, and the blending distribution mu is random and discrete (Bayesian nonparametric strategy).

We think about the survival operate S which is recovered from the hazard charge h by the rework

displaystyle S(t)=expBig(-int_0^t h(s)dsBig)

and a few presumably censored survival knowledge having survival S. Then it seems that each one the posterior moments of the survival curve S(t) evaluated at any time t may be computed.

The great trick of the paper is to make use of the illustration of a distribution in a [Jacobi polynomial] foundation the place the coefficients are linear combos of the moments. So one can pattern from [an approximation of] the posterior, and with a posterior pattern we are able to do all the things! Together with credible intervals.

I’ve wrapped up the few strains of code in an R bundle known as momentify (not on CRAN). With a sequence of moments of a random variable supported on [0,1] as an enter, the bundle does two issues:

  • evaluates the approximate density
  • samples from it

A bundle instance for a combination of beta and a couple of to 7 moments provides that outcome:

mixture

Related Articles

Latest Articles