sample.partitions: Sample Partitions from Partition Distributions

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/shallot.R

Description

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

Usage

1

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?

Value

An object of class shallot.samples.raw which can be subsequently be used in process.samples.

Note

If this function is interrupted by the user, the computation engine will be broken and subsequent calls to package functions may fail until a new session is started.

Author(s)

David B. Dahl dahl@stat.byu.edu

See Also

partition.distribution, process.samples

Examples

1
2
3
4
## Not run: 
example(shallot)

## End(Not run)

shallot documentation built on Nov. 10, 2020, 5:09 p.m.