Doing Bayesian Data Analysis A Tutorial with R JAGS & Stan Second Edition provides an accessible approach for conducting Bayesian data analysis as material is explained clearly with concrete examples Included are step-by-step instructions on how to carry out Bayesian data analyses in the popular & free software R & Win Bugs as well as new programs in JAGS & Stan The new programs are designed to be much easier to use than the scripts in the first edition In particular there are now compact high-level scripts that make it easy to run the programs on your own data sets The book is divided into three parts & begins with the basics models probability Bayes' rule & the R programming language The discussion then moves to the fundamentals applied to inferring a binomial probability before concluding with chapters on the generalized linear model Topics include metric-predicted variable on one or two groups; metric-predicted variable with one metric predictor; metric-predicted variable with multiple metric predictors; metric-predicted variable with one nominal predictor; & metric-predicted variable with multiple nominal predictors The exercises found in the text have explicit purposes & guidelines for accomplishment This book is intended for first-year graduate students or advanced undergraduates in statistics data analysis psychology cognitive science social sciences clinical sciences & consumer sciences in business