Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.MCMC

Various Plots Pertaining to Mixture Model Output Using MCMC Methods


Description

Takes an object of class mixMCMC and returns various graphical output for select mixture models.

Usage

## S3 method for class 'mixMCMC'
plot(x, trace.plots = TRUE, 
     summary.plots = FALSE, burnin = 2000, ...)

Arguments

x

An object of class mixMCMC.

trace.plots

If TRUE, trace plots of the various parameters estimated by the MCMC methods is given.

summary.plots

Graphics pertaining to certain mixture models. The details are given below.

burnin

The values 1 to burnin are dropped when producing the plots in summary.plots.

...

Graphical parameters passed to regcr function.

Value

plot.mixMCMC returns trace plots of the various parameters estimated by the MCMC methods for all objects of class mixMCMC. In addition, other plots may be produced for the following k-component mixture model functions:

regmixMH

Credible bands for the regression lines in a mixture of linear regressions. See regcr for more details.

See Also

Examples

## M-H algorithm for NOdata with acceptance rate about 40%.

data(NOdata)
attach(NOdata)
set.seed(100)
beta <- matrix(c(1.3, -0.1, 0.6, 0.1), 2, 2)
sigma <- c(.02, .05)
MH.out <- regmixMH(Equivalence, NO, beta = beta, s = sigma, 
                   sampsize = 2500, omega = .0013)
plot(MH.out, summary.plots = TRUE, burnin = 2450, 
     alpha = 0.01)

mixtools

Tools for Analyzing Finite Mixture Models

v1.2.0
GPL (>= 2)
Authors
Derek Young [aut, cre] (<https://orcid.org/0000-0002-3048-3803>), Tatiana Benaglia [aut], Didier Chauveau [aut], David Hunter [aut], Ryan Elmore [ctb], Thomas Hettmansperger [ctb], Hoben Thomas [ctb], Fengjuan Xuan [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.