View source: R/distributions.R
make.multimodal.dist | R Documentation |
Create a distribution object for a random mixture of Gaussians
make.multimodal.dist(nmodes, ndim, cube.size)
nmodes |
The number of components in the mixture model. |
ndim |
The dimension of the model. |
cube.size |
The edge length of the hypercube in which the modes are distributed. |
Defines a distribution object for a mixture of random Gaussians.
The means of the the nmodes
Gaussians are randomly distributed
over an ndim
-dimensional hypercube with one corner at the
origin and the opposite cube.size
away in each positive
direction. The same random seed is temporarily set when drawing
modes, so every time this function is called with the same parameters,
the resulting distribution is the same.
This is included as a test case for comparing how MCMC methods perform on multimodal distributions.
A scdist
object. For convenience, the modes
element
is a matrix containing the modes as rows.
make.dist
,
compare.samplers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.