knitr::opts_chunk$set(echo = TRUE)
clusterCVR
provides an EM Algorithm for Mixture Models of Votes with Varying Choice Sets. It is a clustering algorithm particularly designed for analyzing mid to high dimensional datasets when voters vote on Republican or Democratic candidates on the long ballot.
library(clusterCVR)
See cat-mixture.pdf for the writeup of the model. Source is cat-mixture.tex
No varying choice set
data("simdata_full") out_cl <- clusterCVR(simdata_full, init = "kmeans") summary(out_cl)
We can also check the log likelihood monotonically increasing:
pars <- summ_params(out_cl) graph_trend(pars, simdata_full)
library(Rmixmod) data(birds) head(birds) # data where all variables are factor out_mm <- mixmodCluster(data = birds, nbCluster = 3) summary(out_mm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.