Last data update: 2014.03.03

R: Rissanen's universal prior for integers
rissanenR Documentation

Rissanen's universal prior for integers

Description

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

Usage

rissanen(n)

Arguments

n

a vector of positive integers

Details

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

Value

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)

Author(s)

Danilo Alunni Fegatelli and Luca Tardella

References

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

Examples


# Notice that masses are not normalized hence they do not add to one but to a finite 
# positive real constant c

rissanen(1:5)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(BBRecapture)
Loading required package: HI
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: lme4
Loading required package: Matrix
Loading required package: secr
This is secr 2.10.3. For overview type ?secr
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BBRecapture/rissanen.Rd_%03d_medium.png", width=480, height=480)
> ### Name: rissanen
> ### Title: Rissanen's universal prior for integers
> ### Aliases: rissanen
> 
> ### ** Examples
> 
> 
> # Notice that masses are not normalized hence they do not add to one but to a finite 
> # positive real constant c
> 
> rissanen(1:5)
[1] 1.0000000 0.5000000 0.2103099 0.1250000 0.0708744
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>