Description Usage Arguments Value See Also Examples
nStarts chains are run. b burnin iterations are run and then discarded. Next, s iterations are run in each crain. The user can also specify an alternative number of components. The mode of the MCMC simulation is also calculated.
1 2 3 4 5 6 7 | posteriorSimulation(object, k)
## S4 method for signature 'MixtureModel'
posteriorSimulation(object)
## S4 method for signature 'TrioBatchModel'
posteriorSimulation(object)
|
object |
see showMethods(posteriorSimulation) |
k |
The number of a priori components. This is optional and if not specified, the stored k model components are used. This parameters is useful for running multiple models of varying components. |
An object of class 'MarginalModel' or 'BatchModel'
See ggMixture
for plotting the model-based densities.
1 2 3 4 5 6 7 8 9 10 11 | # Fit model with pre-specified number of components (k=3)
set.seed(123)
## specify small number of iterations so that the example runs quickly
mp <- McmcParams(iter=2, burnin=0, nStarts=3)
sb <- SingleBatchModelExample
mcmcParams(sb) <- mp
posteriorSimulation(sb)
# Run additional iterations, but set nStart = 0 so that the last value of the chain is the first value of the next chain
mcmcParams(sb) <- McmcParams(iter=5, nStarts=0, burnin=0)
posteriorSimulation(sb)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.