Description Usage Arguments Details Value See Also Examples
The ggChains
method provides a convenient wrapper for plotting the chains of all parameters in the various mixture model implementations. In addition to the estimated number of independent MCMC draws (effective sample size) and Gelman-Rubin convergence diagnostics implemented in gibbs
, visualization of the chains is helpful for assessing convergence.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ggChains(model)
ggMixture(model, bins = 100)
## S4 method for signature 'MultiBatchCopyNumber'
ggMixture(model, bins = 100)
## S4 method for signature 'MultiBatchCopyNumberPooled'
ggMixture(model, bins = 100)
## S4 method for signature 'MultiBatchModel'
ggMixture(model, bins = 100)
## S4 method for signature 'MultiBatch'
ggMixture(model, bins = 100)
## S4 method for signature 'MultiBatchPooled'
ggMixture(model, bins = 100)
## S4 method for signature 'MultiBatchModel'
ggChains(model)
## S4 method for signature 'MultiBatchPooled'
ggChains(model)
|
model |
A SB, MB, SBP, or MBP model |
bins |
a length-one numeric vector indicating the number of bins – passed to |
The ggMixture
method overlays the density of the posterior predictive distribution of the Gaussian mixture on the empirical data. ggMixture
assumes that you have already run the Gibbs sampler either by the gibbs
function or by the posteriorSimulation
function.
A gg
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | sb <- SingleBatchModelExample
iter(sb) <- 1000
burnin(sb) <- 100
sb <- posteriorSimulation(sb)
fig.chains <- ggChains(sb)
## component-specific chains
fig.chains[["comp"]]
## single-parameter chains and log-likelihood
fig.chains[["single"]]
## plot the mixture
fig.mix <- ggMixture(sb)
data(MultiBatchModelExample)
fig <- ggMixture(MultiBatchModelExample)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.