rDPM_visual {nonparametric.bayes} | R Documentation |
Sequentially generate draws from a Dirichlet process mixture model, by showing step by step the iterations taken. The plot is centered at 0, with x and y from -5 to 5. The mixture draws the centres for clusters from a Normal distribution with mean mu and standard deviation sigma_0
Description
Hit enter to keep drawing until max n, type x to exit.
Usage
rDPM_visual(n, alpha, mu, sigma_0, sigma)
Arguments
n |
Number of observations. |
alpha |
Alpha corresponding to GEM(alpha) used to draw the rho vector. |
mu |
Mean of the Normal distribution used to draw the clusters. |
sigma_0 |
Standard deviation of the Normal distribution used to draw the points around the cluster centre. |
sigma |
Standard deviation for the cluster centre. |
Value
Returns the n observations sampled from the DPMM distribution.
Examples
rDPM_visual(n=30, alpha=3, mu=0, sigma_0=1.5, sigma=0.7)
[Package nonparametric.bayes version 0.0.1 Index]