Description Usage Arguments Value Author(s) References See Also Examples
These functions either sample the number of subsets for supported partition distributions or computes probabilities, means, and variances of these distributions.
1 2 3 4 5 6 7 | nsubsets.random(x, n.samples)
nsubsets.probability(x, n.subsets)
nsubsets.average(x)
nsubsets.variance(x)
|
x |
An object of class |
n.samples |
An integer containing the number of samples. |
n.subsets |
An integer containing the number of subsets. |
The nsubsets.random
function returns a vector of
random samples of the number of subsets in the distribution x.
The nsubsets.probability
function returns the probability that
the number of subsets is n.subsets in the distribution x.
Depending on the number of items and the value of n.subsets, this
function can be computationally intensive.
The nsubsets.average
and nsubsets.variance
functions return the mean and variances, respectively, of the number of
subsets in the distribution x.
David B. Dahl dahl@stat.byu.edu
1 2 3 4 5 6 7 8 9 10 11 | pd <- ewens.pitman.attraction(
mass(1),
discount(0.05),
attraction(permutation(n.items=50,fixed=FALSE),
decay.exponential(temperature(1.0),dist(scale(USArrests)))))
mean(nsubsets.random(pd,1000))
nsubsets.average(pd)
pde <- ewens(mass(1),50)
nsubsets.variance(pde)
nsubsets.probability(pde,4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.