It returns (up to normalizing constant) the mass assigned to each positive integer or a vector of integers by Rissanen's universal prior for positive integers

1 | ```
rissanen(n)
``` |

`n` |
a vector of positive integers |

Rissanen's universal prior on positive integers is one of the default options for eliciting a noninformative prior distribution on the unknown population size *N*. It is a proper prior with tails of the order between *1/N* and *1/N^2*

The mass assigned to each positive integer in the input vector of integers `n`

by Rissanen's universal prior for positive integers

*Q(n)=2^{-\log^*(n)} \qquad n>0*

where
*\log^*(x)= \log(x)+\log( \log (x)) + \log( \log (\log (x)))....* where the sum involves only the non-negative terms. Notice that masses are not normalized hence they do not add to one but to a finite positive real constant

*c = ∑_{n=1}^∞ Q(n)*

Danilo Alunni Fegatelli and Luca Tardella

Rissanen, J. (1983) A universal prior for integers and estimation by minimum description length. Ann. Statist. 11, no. 2, 416-431

1 2 3 4 | ```
# Notice that masses are not normalized hence they do not add to one but to a finite
# positive real constant c
rissanen(1:5)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.