Description Usage Arguments Value See Also Examples
Returns the model
slot.
1 2 | ## S4 method for signature 'mcmcoutputfix'
getModel(object)
|
object |
An |
The model
slot of the object
.
mcmcoutput for the class definition
mixturemcmc()
for performing MCMC sampling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Define a Poisson mixture model with two components.
f_model <- model("poisson", par = list(lambda = c(0.3, 1.2)), K = 2)
# Simulate data from the mixture model.
f_data <- simulate(f_model)
# Define the hyper-parameters for MCMC sampling.
f_mcmc <- mcmc(storepost = FALSE)
# Complete object slots for consistency.
(f_data ~ f_model ~ f_mcmc) %=% mcmcstart(f_data, f_model, f_mcmc)
# Define the prior distribution by relying on the data.
f_prior <- priordefine(f_data, f_model)
# Start MCMC sampling.
f_output <- mixturemcmc(f_data, f_model, f_prior, f_mcmc)
# Get the slot.
getModel(f_output)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.