polya.sample {FVDDPpkg}R Documentation

Sampling via Polya Urn scheme

Description

Sampling via Polya Urn scheme

Usage

polya.sample(n, theta, v = c(), sampling.f)

Arguments

n

The amount of samples to be drawn.

theta

The intensity, in the sense of Bayesian Statistics

v

A vector of values, considered to be already drawn from the Polya scheme.

sampling.f

A function to sample new values. Its unique argument must express the number of values to draw.

Value

A vector containing n values extracted.

Examples

polya.sample(10, 2, c(0,1), function(x) rbeta(x,1,1))


[Package FVDDPpkg version 0.1.2 Index]