170 likes | 348 Views
Bayesian Statistics, Modeling & Reasoning What is this course about?. Psychology 548 Bayesian Statistics, Modeling & Reasoning Instructor: John Miyamoto 1/6/2014: Lecture 01-1.
E N D
Bayesian Statistics, Modeling & ReasoningWhat is this course about? Psychology 548Bayesian Statistics, Modeling & Reasoning Instructor: John Miyamoto 1/6/2014: Lecture 01-1 Note: This Powerpoint presentation may contain macros that I wrote to help me create the slides. The macros aren’t needed to view the slides. You can disable or delete the macros without any change to the presentation.
Outline • What is Bayesian inference? • Why is Bayesian statistics, modeling & reasoning relevant to psychology? • What is Psych 548 about? • Familiarize students with the set up for using MGH 058 • Explain Psych 548 website • Intro to R • Intro to RStudio • Intro to the R to BUGS interface Lecture probably ends here Psych 548, Miyamoto, Win '14
Bayes Rule – What Is It? • Reverend Thomas Bayes, 1702 – 1761English Protestant minister & mathematician • Bayes Rule is fundamentally important to: • Bayesian statistics • Bayesian decision theory • Bayesian models in psychology Bayes Rule – Why Is It Important? Psych 548, Miyamoto, Win '14
Bayes Rule – Why Is It Important? • Bayes Rule is the optimal way to update the probability of hypotheses given data. • The concept of "Bayesian reasoning“: 3 related concepts • Concept 1: Bayesian inference is a model of optimal learning from experience. • Concept 2: Bayesian decision theory describes optimal strategies for taking actions in an uncertain environment. Optimal gambling. • Concept 3: Bayesian reasoning represents the uncertainty of events as probabilities in a mathematical calculus. • Concepts 1, 2 & 3 are all consistent with the use of the term, "Bayesian", in modern psychology. Bayesian Issues in Psychology Psych 548, Miyamoto, Win '14
Bayesian Issues in Psychological Research • Does human reasoning about uncertainty conform to Bayes Rule? Do humans reason about uncertainty as if they are manipulating probabilities? • These questions are posed with respect to infants & children,as well as adults. • Do neural information processing systems (NIPS) incorporate Bayes Rule? Do NIPS model uncertainties as if they are probabilities. Four Roles for Bayesian Reasoning in Psychology Research Psych 548, Miyamoto, Win '14
Four Roles for Bayesian Reasoning in Psychology 1. Bayesian statistics • Analyzing data: E.g., is the slope of the regression of grades on IQ the same for boys as for girls? 2. Bayesian decision theory – a theory of strategic action.How to gamble if you must. • Bayesian modeling of psychological processes • Bayesian reasoning – Do people reason as if they are Bayesian probability analysts? (At macro & neural levels) • Examples in adult cognition, some work in cognitive development. • Psych 548: Focus on Topics (1) and (3). Includes a little bit of (4). Graphical Representation of Psych 548 Focus on Stats/Modeling Psych 548, Miyamoto, Win '14
Graphical Representation of Psych 548 Psych 548 Bayesian Models in Child & Adult Psychology & Neuroscience Bayesian Statistics& Modeling: R, OpenBUGS, JAGS Graph & Text Showing the History of S, S-Plus & R Psych 548, Miyamoto, Win '14
Brief History of S, S-Plus, & R • S – open source statistics program created by Bell Labs (1976 – 1988 – 1999) • S-Plus – commercial statistics program, refinement of S (1988 – present) • R – free open source statistics program (1997 – present) • currently the standard computing framework for statisticians worldwideMany contributors to its development • Excellent general computation. Powerful & flexible. • Great graphics. • Multiplatform: Unix, Linux, Windows, Mac • User must like programming Ancestry of R S-Plus S R BUGS, WinBUGS, OpenBUGS, JAGS Psych 548, Miyamoto, Win '14
BUGS, WinBUGS, OpenBUGS & JAGS • Gibbs Sampling & Metropolis-Hastings AlgorithmTwo algorithms for sampling from a hard-to-evaluate probability distribution. • BUGS – Bayesian inference Under Gibbs Sampling (circa 1995) • WinBUGS - Open source (circa 1997) • Windows only • OpenBUGS – Open source (circa 2006) • Mainly Windows. • Runs within a virtual Windows machine on a Mac or Linux machine. • JAGS • Multiplatform: Windows, Mac, Linux Basic Structure of Bayesian Computation with R & OpenBUGS Psych 548, Miyamoto, Win '14
Basic Structure of Bayesian Computation R data preparationanalysis of results rjagsR2jags JAGSComputes approximation to the posterior distribution.Includes diagnostics. rjags functions rjags functions BRugsR2OpenBUGS OpenBUGS/WinBUGS BRugs functions R Brugs functions Outline of Remainder of the Lecture: Course Outline & General Information Psych 548, Miyamoto, Win '14
RStudio • Run RStudio • Run R from within RStudio Psych 548, Miyamoto, Win '14
Remainder of This Lecture • Take 5 minute break • Introduce selves • Psych 548: What will we study? • Briefly view the Psych 548 webpage. • Introduction to the computer facility in CSSCR. • Introduction to R, BUGS (OpenBUGS& JAGS), and RStudio 5 Minute Break Psych 548, Miyamoto, Win '14
5 Minute Break • Introduce selves upon return Course Goals Psych 548, Miyamoto, Win '14
Course Goals • Learn the theoretical framework of Bayesian inference. • Achieve competence with R, OpenBUGS and JAGS. • Learn basic Bayesian statistics • Learn how to think about statistical inference from a Bayesian standpoint. • Learn how to interpret the results of a Bayesian analysis. • Learn basic tools of Bayesian statistical inference - testing for convergence, making standard plots, examing samples from a posterior distribution. --------------------------------------------------------------- Secondary Goals • Bayesian modeling in psychology • Understand arguments about Bayesian reasoning in the psychology of reasoning. The pros and cons of the heuristics & biases movement. Kruschke Textbook Psych 548, Miyamoto, Win '14
Main Text: Kruschke, Doing Bayesian Data Analysis Kruschke, J. K. (2011). Doing Bayesian data analysis: A tutorial with R and BUGS. Amsterdam: Elsevier. • Excellent textbook – worth the price ($80 from Amazon) • Emphasis on classical statistical test problems from a Bayesian perspective. Not so much modeling per se. • Binomial inference problems, anova problems, linear regression problems. Computational Requirements • R & JAGS (or OpenBUGS) • A programming editor like Rstudio is useful. Chapter Outline of Kruschke Textbook Psych 548, Miyamoto, Win '14
Main Text: Kruschke, Doing Bayesian Data Analysis • Ch 1 – 4: Basic probability background (pretty easy) • Ch 5 – 8: Bayesian inference with simple binomial models • Conjugate priors, Gibbs sampling & Metropolis-Hastings algorithm • OpenBUGS or JAGS • Ch 9 – 12: Bayesian approach to hierarchical modeling, model comparison, & hypothesis testing. • Ch 13: Power & sample size (omit ) • Ch 14: Intro generalized linear model • Ch 15 – 17: Intro linear regression • Ch 18 – 19: Oneway & multifactor anova • Ch 20 – 22: Categorical data analysis, logistic regression, probit regression, poisson regression Lee & Wagenmakers, Bayesian Graphical Modeling Psych 548, Miyamoto, Win '14
Workbook on Bayesian Graphical Modeling Lee, M. D., & Wagenmakers, E. J. (in press). Bayesian cognitive modeling: A practical course. Lee, M. D., & Wagenmakers, E. J. (2010). A course in Bayesian graphical modeling for cognitive science. • Michael Lee: http://www.socsci.uci.edu/~mdlee/bgm.html • E. J. Wagenmaker: http://users.fmg.uva.nl/ewagenmakers/BayesCourse/BayesBook.html • Equivalent Matlab & R code for book are available at the Psych 548 website and at Lee or Wagenmaker'swebsite. • Emphasis is on Bayesian models of psychological processes rather than on theory. Lots of examples. Computer Setup in CSSCR Psych 548, Miyamoto, Win '14