pejSim {ordinalClust} | R Documentation |
This function computes the probabiltiy for a level ej to be sampled from a BOS distribution of parameters (mu,pi), with a number of levels equals to m. Can be used to generate data wth BOS distribution.
pejSim(ej,m,mu,p)
ej |
levels to be sampled |
m |
Number of levels. |
mu |
mu parameter for BOS distribution. |
p |
pi parameter for BOS distribution. |
Return the probabiltiy of ej to be sampled from a BOS distribution of parameters (mu,pi), with a number of levels equals to m.
Margot Selosse, Julien Jacques, Christophe Biernacki.
library(ordinalClust) data("dataqol") set.seed(5) m=7 nr=10000 mu=5 pi=0.5 probaBOS=rep(0,m) for (im in 1:m) probaBOS[im]=pejSim(im,m,mu,pi) M <- sample(1:m,nr,prob = probaBOS, replace=TRUE)