This is a tutorial that shows an in-depth example of using the R package CMBBHT. The package name is an (excessive) acronym that expands to Cell Means Based Bayesian Hypothesis Tests. You can download the main package manual as a PDF.
In teaching sampling distributions, I find it helpful to have as many tangible examples as possible, so I like to use demonstrations. I wrote a Shiny app that I use for this purpose, which you can download from here. To run the app, you will need R and the Shiny package. Shiny is integrated into Rstudio, so I would recommend that as well.
The Watanabe-Akaike Information Criterion (WAIC) is a way of measuring the fit of Bayesian models. It is conceptually similar to AIC and BIC. Like AIC and BIC, lower values of WAIC indicate a better model fit. I will describe how to calculate WAIC for the case in which unknown parameters are estimated with a Gibbs sampler, which produces samples from the posterior distribution of the parameters. WAIC can be calculated with these posterior chains and some other fairly accessible information. Like my DIC tutorial, my knowledge about WAIC comes from Bayesian Data Analysis, Third Edition by Gelman, Carlin, Stern, Dunson, Vehtari, and Rubin. What I have done is to show you how to calculate WAIC for an example model and data set, R code included, to make it all concrete.
The Deviance Information Criterion (DIC) is a way of measuring model fit for Bayesian models. It is conceptually similar to AIC and BIC. Like AIC and BIC, lower values of DIC indicate a better model fit. I will describe how to calculate DIC in the case in which unknown parameters are estimated with a Gibbs sampler, which produces samples from the posterior distribution of the parameters. DIC can be calculated with these posterior chains and some other fairly accessible information.
There has been some discussion by Bernie Sanders supporters about the delegate allocation process in the Democratic primary. One complaint is that states that generally vote for Republican presidents seem to be allocated an unfair number of delegates. This hurts Bernie Sanders and the Democratic party as a whole, because the southern states, which have gone strongly to Hillary in the primary, are not in contention in the general election. To allow those states to select the Democratic candidate is unreasonable, because they don’t matter for the general election. Sanders is thought to win states that are more relevant to the general election. Thus, if states that mattered more in the general election were given more weight, Sanders might be doing better in the primary.
Eighteen is a card-shedding game that gets its name from the fact that each player is dealt a hand of 18 cards. Cards are played by making melds, like pairs and straights, that beat the other players’ melds. The winner is the first player to empty their hand.