powered by
Sampling via Polya Urn scheme
polya.sample(n, theta, v = c(), sampling.f)
A vector containing n values extracted.
The amount of samples to be drawn.
The intensity, in the sense of Bayesian Statistics
A vector of values, considered to be already drawn from the Polya scheme.
A function to sample new values. Its unique argument must express the number of values to draw.
polya.sample(10, 2, c(0,1), function(x) rbeta(x,1,1))
Run the code above in your browser using DataLab