Friday, January 4, 2013

Bayesian estimation in a new web app!

A wonderful new web app is now available for doing Bayesian estimation of two groups. Just enter the data for each group, click the "go" button, and watch the MCMC sample emerge, revealing the posterior distribution for the means, standard deviations, and normality, along with the difference of means, difference of standard deviations, and effect size. This web app was created by Rasmus Bååth and is available at http://www.sumsar.net/best_online/. Give it a try!
 
The web app is fabulous for quickly and easily seeing the main results of a Bayesian estimation of parameters for two groups. There is no need to install R and JAGS and then invoke R and run commands. Instead, just paste in your data and click a button!

Here (below) is a screen shot from January 03, 2013, using the data from the main example of BEST. More comments about the app continue after the screen shot.


The original implementation of BEST, available from http://www.indiana.edu/~kruschke/BEST/, provides some more functionality than in the app (at the time of this post), but only by taking the effort to install (free) software and to interact with the R programming language. The original BEST software implements ROPEs for the decision rule and shows a posterior predictive check in the form of a smattering of credible model distributions superimposed on data histograms. It also shows correlations of parameters in the posterior. The original BEST software also does power computations. Another benefit of dealing with the BEST software is that it is a gateway to the full spectrum of Bayesian data-analysis programs written in R and JAGS/BUGS. But for quickly and easily showing the primary results from a Bayesian analysis of two groups, this web app is brilliant!

Big thanks to Rasmus Bååth for creating this awesome web app! If you like it, let him know -- his e-mail is linked in the lower right "About" section on the web app. The URL again is http://www.sumsar.net/best_online/

8 comments:

  1. Thanks for this webapp, I was looking for exactly this.

    1 suggestion : could you add a parameter to change the "95% credibility" treshold (for example I you want to test at 98% credibility), it should be pretty simple ?

    I don't understand the "nbr of burn in samples and nbr of samples" parameter ?

    JS

    ReplyDelete
  2. JB: In the BEST software, the probability mass of the HDI can be specified as an argument in the function. See the BEST article and software. For the web app, created by Rasmus, that would require a change in the app interface to allow user specification, and Rasmus would have to do that if it seems like there's high enough demand. I would say that if there is a control for the HDI mass, there should also be a control for the limits of a ROPE. The decision rule for assessing a null value should include a ROPE, at least tacitly. See Ch. 12 of DBDA2E.

    ReplyDelete
  3. Hi JB,

    The web app is more of a demo. If you need to do real data analysis I strongly reccomend you to download R and the BEST package. With some luck it should take less than half an hour to get up and running and then you can change everything... :)

    ReplyDelete
  4. Ok I'll try that thanks.

    Also a last question : you say "This measure is labeled "Normality" below where a normality estimate < 1.5 indicates that the data isn't normally distributed".

    I'm trying this on my data and I get a measure of 0.38 on "Density - Normality". If the data isn't normally distributed, does this mean that this test won't give valuable results ?

    JS

    ReplyDelete
  5. JB: I think you'll have to read the article linked here to understand the normality parameter. There is also a video there. Low normality does not invalidate the model, instead it describes the data. The model is designed to accommodate outliers, i.e., non-normal distributions. In the BEST software, see the posterior predictive plot --- the graph of data with superimposed model curves --- to get a sense of whether the model seems to be a reasonable description of the data.

    ReplyDelete
  6. Howdy,
    the web app handles uneven sample size but I had trouble with this in the R package. Also using NA. Any ideas?
    Thanks

    ReplyDelete
  7. Unequal sample sizes are no problem in the R code. For example, the main example(s) in the journal article use unequal sample sizes.

    Not sure about NAs. But in such a simple data set it's easy to exclude the NAs before submitting the data.

    ReplyDelete
  8. You are correct. I repeated the analysis again in BEST with no problems. ?
    Thanks again

    ReplyDelete