Description How to cite this package Author(s) References Examples

The `R`

package bmixture provides statistical tools for Bayesian estimation in finite mixture of distributions.
The package implemented the improvements in the Bayesian literature, including Mohammadi and Salehi-Rad (2012) and Mohammadi et al. (2013).
Besides, the package contains several functions for simulation and visualization, as well as a real dataset taken from the literature.

Whenever using this package, please cite as
Mohammadi R. (2019). bmixture: Bayesian Estimation for Finite Mixture of
Distributions, `R`

package version 1.3, https://CRAN.R-project.org/package=bmixture

Reza Mohammadi <[email protected]>

Mohammadi, A., Salehi-Rad, M. R., and Wit, E. C. (2013) Using mixture of Gamma distributions for Bayesian analysis in an M/G/1 queue with optional second service. *Computational Statistics*, 28(2):683-700

Mohammadi, A, and Salehi-Rad, M. R. (2012) Bayesian inference and prediction in an M/G/1 with optional second service. *Communications in Statistics-Simulation and Computation*, 41(3):419-435

Stephens, M. (2000) Bayesian analysis of mixture models with an unknown number of components-an alternative to reversible jump methods. *Annals of statistics*, 28(1):40-74

Richardson, S. and Green, P. J. (1997) On Bayesian analysis of mixtures with an unknown number of components. *Journal of the Royal Statistical Society: series B*, 59(4):731-792

Green, P. J. (1995) Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. *Biometrika*, 82(4):711-732

Cappe, O., Christian P. R., and Tobias, R. (2003) Reversible jump, birth and death and more general continuous time Markov chain Monte Carlo samplers. *Journal of the Royal Statistical Society: Series B*, 65(3):679-700

Wade, S. and Ghahramani, Z. (2018) Bayesian Cluster Analysis: Point Estimation and Credible Balls (with Discussion). *Bayesian Analysis*, 13(2):559-626

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ```
## Not run:
library( bmixture )
data( galaxy )
# Runing bdmcmc algorithm for the galaxy dataset
mcmc_sample = bmixnorm( data = galaxy )
summary( mcmc_sample )
plot( mcmc_sample )
print( mcmc_sample)
# simulating data from mixture of Normal with 3 components
n = 500
mean = c( 0 , 10 , 3 )
sd = c( 1 , 1 , 1 )
weight = c( 0.3, 0.5, 0.2 )
data = rmixnorm( n = n, weight = weight, mean = mean, sd = sd )
# plot for simulation data
hist( data, prob = TRUE, nclass = 30, col = "gray" )
x = seq( -20, 20, 0.05 )
densmixnorm = dmixnorm( x, weight, mean, sd )
lines( x, densmixnorm, lwd = 2 )
# Runing bdmcmc algorithm for the above simulation data set
bmixnorm.obj = bmixnorm( data, k = 3, iter = 1000 )
summary( bmixnorm.obj )
## End(Not run)
``` |

bmixture documentation built on Sept. 11, 2019, 9:07 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.