22. Bayesian Statistics

  1. Michael J. Crawley

Published Online: 6 NOV 2012

DOI: 10.1002/9781118448908.ch22

The R Book, Second Edition

The R Book, Second Edition

How to Cite

Crawley, M. J. (2012) Bayesian Statistics, in The R Book, Second Edition, John Wiley & Sons, Ltd, Chichester, UK. doi: 10.1002/9781118448908.ch22

Author Information

  1. Imperial College London at Silwood Park, UK

Publication History

  1. Published Online: 6 NOV 2012
  2. Published Print: 7 DEC 2012

ISBN Information

Print ISBN: 9780470973929

Online ISBN: 9781118448908



  • Bayesian statistics;
  • continuous response variable;
  • normal prior and normal likelihood;
  • conjugate priors;
  • Bayesian statistics, for realistically complicated models;
  • writing BUGS models;
  • packages in R, for Bayesian analysis;
  • installing JAGS on computer;
  • MCMC for a simple linear regression;
  • MCMC for a model, with temporal pseudoreplication


This chapter contains sections titled:

  • Background

  • A continuous response variable

  • Normal prior and normal likelihood

  • Priors

  • Bayesian statistics for realistically complicated models

  • Practical considerations

  • Writing BUGS models

  • Packages in R for carrying out Bayesian analysis

  • Installing JAGS on your computer

  • Running JAGS in R

  • MCMC for a simple linear regression

  • MCMC for a model with temporal pseudoreplication

  • MCMC for a model with binomial errors