diff --git a/DESCRIPTION b/DESCRIPTION index 2bea6c5..2d14c51 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: pivmet Type: Package Title: Pivotal Methods for Bayesian Relabelling and k-Means Clustering -Version: 0.1.0 -Date: 2018-11-08 +Version: 0.1.1 +Date: 2019-02-26 Author: Leonardo Egidi[aut, cre], Roberta Pappadà[aut], Francesco Pauli[aut], @@ -11,20 +11,23 @@ Maintainer: Leonardo Egidi License: GPL-2 Description: Collection of pivotal algorithms for: relabelling the MCMC chains in order to undo the label - switching problem in Bayesian mixture models; + switching problem in Bayesian mixture models, + as proposed in Egidi, Pappadà, Pauli and Torelli (2018a); initializing the centers of the classical k-means algorithm - in order to obtain a better clustering solution. + in order to obtain a better clustering solution. For further details see + Egidi, Pappadà, Pauli and Torelli (2018b). URL: https://github.com/leoegidi/pivmet Encoding: UTF-8 LazyData: true LazyLoad: yes +SystemRequirements: pandoc (>= 1.12.3), pandoc-citeproc Depends: bayesmix, rjags, runjags, mvtnorm, RcmdrMisc Imports: cluster, mclust, MASS -Suggests: knitr +Suggests: knitr, rmarkdown VignetteBuilder: knitr RoxygenNote: 6.1.0 BuildManual: yes NeedsCompilation: no -Packaged: 2018-11-12 11:20:17 UTC; leoeg +Packaged: 2019-02-26 21:03:11 UTC; leoeg Repository: CRAN -Date/Publication: 2018-11-19 18:50:06 UTC +Date/Publication: 2019-02-26 21:20:17 UTC diff --git a/MD5 b/MD5 index 43949be..535deea 100644 --- a/MD5 +++ b/MD5 @@ -1,20 +1,21 @@ -2c91d0fb9fe8f9a535ee6046ed7aa0a9 *DESCRIPTION +e3460cc3f00cca35b2f91e55b5a92265 *DESCRIPTION 2ba3e5413467ea7dda94c752dab896cb *NAMESPACE +05f9200123d96779efe4be97be8f0d2a *NEWS.md e2cfa8aaca079247d19a52c0059b74a9 *R/bayes_mcmc.R a5b574520f3f1ff12d8cac35b353109b *R/mus.R 1a4644cd0d648ad63199f43c28dcafbb *R/musk.R 0b62e6ed58f60ed5a90572b329db8b0b *R/pivotal.R 4916fa5f41c07ec54d839124f09ea613 *R/plot.R -3c0bb6fb218e33ce7b38ece0ade9b3c1 *R/relab.R +08a9933013c9d227fead6c812e9a7627 *R/relab.R db18079ce149fc084091bcd7339daf5a *R/sim.R 406852041931cb6ebfd8d7522a846f2b *README.md -3282e848327228fdcca8ed825666974d *build/vignette.rds +510662c227cf4dd72a8bcf3ae43469f2 *build/vignette.rds fbf92eacd515f45b1ccab06ba282871e *inst/doc/K-means_clustering_using_the_MUS_algorithm.R -bac98506ad04cd09ecc219d8aa580323 *inst/doc/K-means_clustering_using_the_MUS_algorithm.Rmd -c0259bb61c6826099394ec97e55cbd54 *inst/doc/K-means_clustering_using_the_MUS_algorithm.html +8cb889dcf75ebac54b2579eb36324c03 *inst/doc/K-means_clustering_using_the_MUS_algorithm.Rmd +9346371c5a57fe66d30369f12aa5316d *inst/doc/K-means_clustering_using_the_MUS_algorithm.html 70af9646e377b07ed3eefeb492cb2e85 *inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.R -30715c7f483868f8efe496832a8716fc *inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd -63cd653ae02af413d2f12c61fde657c1 *inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.html +2a78ea777ce43c0ca31a918e82ac7799 *inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd +6596a8db75a6d8f69a90bcdf71a054b4 *inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.html cfdf608ee093ff41f61b6ba919ad2598 *man/MUS.Rd 83b55b9e457e02bcfb781b0781f06bf2 *man/figures/README-kmeans_plots-1.png 387d2506d151432d2ab11212700884fa *man/figures/README-musk-1.png @@ -30,6 +31,6 @@ d565fe1d140bd6770f832d28a6606458 *tests/testthat/test-bayesMCMC.R 1cd9a2b29c1aa0cc8934f47a77800059 *tests/testthat/test-bayesMCMCbiv.R c410e73d8c2d40bdb9c3fe39c6c184fe *tests/testthat/test-mus.R e2d84ff6c6e19838a8101d236bcd74bb *tests/testthat/testthat.R -bac98506ad04cd09ecc219d8aa580323 *vignettes/K-means_clustering_using_the_MUS_algorithm.Rmd -30715c7f483868f8efe496832a8716fc *vignettes/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd +8cb889dcf75ebac54b2579eb36324c03 *vignettes/K-means_clustering_using_the_MUS_algorithm.Rmd +2a78ea777ce43c0ca31a918e82ac7799 *vignettes/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd c40ea5486f5ac2d0c57b4159691465cc *vignettes/ref.bib diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..6089359 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,10 @@ +# pivmet 0.1.1 + +* Fix duplicate entries of the vignette source +* Include references in the description field. + +# pivmet 0.1.0 + +* First submission to CRAN. + + diff --git a/R/relab.R b/R/relab.R index 080997a..a102520 100644 --- a/R/relab.R +++ b/R/relab.R @@ -136,6 +136,7 @@ piv_rel<-function(mcmc, nMC ){ N <- dim(mcmc$z)[1] + k <- dim(mcmc$z)[2] mu_switch <- mcmc$mu_switch group <- mcmc$groupPost pivots <- mcmc$pivots diff --git a/build/vignette.rds b/build/vignette.rds index eafd115..805bfd2 100644 Binary files a/build/vignette.rds and b/build/vignette.rds differ diff --git a/inst/doc/K-means_clustering_using_the_MUS_algorithm.Rmd b/inst/doc/K-means_clustering_using_the_MUS_algorithm.Rmd index 942fd23..d187923 100644 --- a/inst/doc/K-means_clustering_using_the_MUS_algorithm.Rmd +++ b/inst/doc/K-means_clustering_using_the_MUS_algorithm.Rmd @@ -5,7 +5,7 @@ date: "`r Sys.Date()`" output: rmarkdown::html_vignette bibliography: ref.bib vignette: > - %\VignetteIndexEntry{Vignette Title} + %\VignetteIndexEntry{K-means clustering using MUS and other pivotal algorithms} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- diff --git a/inst/doc/K-means_clustering_using_the_MUS_algorithm.html b/inst/doc/K-means_clustering_using_the_MUS_algorithm.html index 6d093ec..f8386ba 100644 --- a/inst/doc/K-means_clustering_using_the_MUS_algorithm.html +++ b/inst/doc/K-means_clustering_using_the_MUS_algorithm.html @@ -12,7 +12,7 @@ - + K-means clustering using MUS and other pivotal algorithms @@ -278,7 +278,7 @@

K-means clustering using MUS and other pivotal algorithms

Leonardo Egidi

-

2018-11-12

+

2019-02-26

diff --git a/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd b/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd index 21da683..4855499 100644 --- a/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd +++ b/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd @@ -5,7 +5,7 @@ date: "`r Sys.Date()`" output: rmarkdown::html_vignette bibliography: ref.bib vignette: > - %\VignetteIndexEntry{Vignette Title} + %\VignetteIndexEntry{Dealing with label switching: relabelling in Bayesian mixture models by pivotal units} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- diff --git a/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.html b/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.html index 0fc35a9..9aa0e8f 100644 --- a/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.html +++ b/inst/doc/Relabelling_in_Bayesian_mixtures_by_pivotal_units.html @@ -12,7 +12,7 @@ - + Dealing with label switching: relabelling in Bayesian mixture models by pivotal units @@ -278,7 +278,7 @@

Dealing with label switching: relabelling in Bayesian mixture models by pivotal units

Leonardo Egidi

-

2018-11-12

+

2019-02-26

@@ -352,7 +352,7 @@

Example: bivariate data

piv_plot(y = y, mcmc = res, rel_est = rel, type = "chains") piv_plot(y = y, mcmc = res, rel_est = rel, type = "estimates") piv_plot(y = sim$y, mcmc = res, rel_est = rel, type = "hist") -

+

References

diff --git a/vignettes/K-means_clustering_using_the_MUS_algorithm.Rmd b/vignettes/K-means_clustering_using_the_MUS_algorithm.Rmd index 942fd23..d187923 100644 --- a/vignettes/K-means_clustering_using_the_MUS_algorithm.Rmd +++ b/vignettes/K-means_clustering_using_the_MUS_algorithm.Rmd @@ -5,7 +5,7 @@ date: "`r Sys.Date()`" output: rmarkdown::html_vignette bibliography: ref.bib vignette: > - %\VignetteIndexEntry{Vignette Title} + %\VignetteIndexEntry{K-means clustering using MUS and other pivotal algorithms} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- diff --git a/vignettes/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd b/vignettes/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd index 21da683..4855499 100644 --- a/vignettes/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd +++ b/vignettes/Relabelling_in_Bayesian_mixtures_by_pivotal_units.Rmd @@ -5,7 +5,7 @@ date: "`r Sys.Date()`" output: rmarkdown::html_vignette bibliography: ref.bib vignette: > - %\VignetteIndexEntry{Vignette Title} + %\VignetteIndexEntry{Dealing with label switching: relabelling in Bayesian mixture models by pivotal units} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} ---