Learn R Programming

shallot (version 0.4.1)

sample.partitions: Sample Partitions from Partition Distributions

Description

This function samples partitions from the Ewens, Ewens-Pitman, Ewens attraction, Ewens-Pitman attraction, and ddCRP distributions.

Usage

sample.partitions(x, n.draws, parallel = TRUE)
# S3 method for shallot.samples.raw
print(x, ...)

Arguments

x

An object of class shallot.distribution obtained, for example, from the ewens.pitman.attraction function.

n.draws

An integer representing the desired number of samples. Due to parallelization, slightly more samples may be returned.

parallel

Should sampling be done in parallel by simultaneously using all CPU cores?

...

Currently ignored.

Value

An object of class shallot.samples.raw which can be subsequently be used in process.samples, pairwise.probabilities, estimate.partition,

See Also

partition.distribution, process.samples, pairwise.probabilities, estimate.partition sample.partitions.posterior

Examples

Run this code
# NOT RUN {
example(shallot)
# }

Run the code above in your browser using DataLab