Sort by
Chapter 2 - Introduction to the Bayesian Analysis of a Statistical Model

Both probability theory and statistics are sciences that deal with uncertainty. Their subject is the description of stochastic systems, i.e., systems that are not fully predictable but include random processes that add a degree of chance—and therefore uncertainty—in their outcome. Stochastic systems are ubiquitous in nature; hence, probability and statistics are important not only in science but also to understand all facets of life. Both probability theory and statistics deal with the characteristics of a stochastic system and its outcomes, but these two fields represent different perspectives on stochastic systems. Probability theory specifies parameters and a model and then examines a variable outcome, whereas statistics takes the data, assumes a model, and then tries to infer the system properties, given the model. Parameters are key descriptors of the stochastic system. In statistics, there are two main views about how one should learn about the parameter values in a stochastic system: classical (also called conventional or frequentist) and Bayesian statistics. Both classical and Bayesian statistics view data as the observed realizations of stochastic systems that contain one or several random processes. However, in classical statistics, the quantities used to describe these random processes (parameters) are fixed and unknown constants, whereas in Bayesian statistics, parameters are themselves viewed as unobserved realizations of random processes. In Bayesian statistics, uncertainty is evaluated using the posterior distribution of a parameter, which is the conditional probability distribution of all unknown quantities, given the data, and the model.

Relevant
Chapter 3 - WinBUGS

The BUGS language and program was developed by epidemiologists in Cambridge, UK in the 1990s. The acronym stands for Bayesian analysis using Gibbs sampling. WinBUGS is a groundbreaking program; it has made really flexible and powerful Bayesian statistical modeling available to a large range of users, especially for users who lack the experience in statistics and computing to fit such fully custom models by maximizing their likelihood in a frequentist mode of inference. WinBUGS lets one specify almost arbitrarily complex statistical models using a fairly simple model definition language that describes the stochastic and deterministic “local” relationships among all observable and unobservable quantities in a fully specified statistical model. The chapter provides examples that are analyzed with WinBUGS run from within program R by use of the R2WinBUGS package. In addition, the steps before and after an analysis in WinBUGS are greatly facilitated in R, e.g., data preparation as well as computations on the Markov chain Monte Carlo (MCMC) output and the presentation of results in graphs and tables. Importantly, after conducting an analysis in WinBUGS, R2WinBUGS will import back into R the results of the Bayesian analysis, which essentially consist of the Markov chains for each monitored parameter. Fitting statistical models in WinBUGS opens up a new world of modeling freedom to many ecologists. Writing WinBUGS code, or understanding and tailoring to one's own needs WinBUGS code written by others, is much more within the reach of typical ecologists than writing or adapting a similar analysis in some software that explicitly maximizes a likelihood function for the same problem.

Relevant
Chapter 14 - Overdispersion, Zero-Inflation, and Offsets in the GLM

Two features specific to nonnormal generalized linear models (GLMs) are overdispersion and offsets. Zero-inflation can be called a specific form of overdispersion: there are more zeroes than expected. In both distributions commonly used to model counts (Poisson and binomial), the dispersion (the variability in the counts) is not a free parameter but instead is a function of the mean. The variance is equal to the mean (λ) for the Poisson and equal to the mean (N * p) times 1−p for the binomial distribution. This means that for a Poisson or binomial random variable, the models for the counts come with a “built-in” variability and the magnitude of that variability is known. In an analysis of deviance conducted in a classical statistical analysis of the model, the residual deviance of the model will be about the same magnitude as the residual degrees of freedom, i.e., the mean deviance ratio is about 1. The simplest way to correct for overdispersion in a classical analysis is by the quasi-likelihood and by using family=quasipoisson (or quasibinomial) in the Rfunction glm(). Using WinBUGS, there are several ways in which one can account for overdispersion. One is to specify a distribution that is overdispersed relative to the Poisson, such as the negative binomial. Overdispersion, zero-inflation, and offsets are important GLM topics. The specification of the associated models in WinBUGS is fairly easy and clarifies the actual meaning of these three topics. This is not usually the case when fitting these models in a canned routine in R or another software. Thus, this is another example of where the simple model speci- fication in the BUGS language enforces an understanding of the fitted model that is easily lost in other stats packages.

Relevant