## Software

### Small Area Estimation

- Files to implement spatial survey methods. Code was written by Cici Chen and Laina Mercer.

*Reference:* Chen, Wakefield and Lumley "The use of sample weights in Bayesian spatial hierarchical models for small area estimation" is here.
- Code to implement the simulation in Wakefield, Simpson and Godwin is here.

### Spatial Epidemiology

- Details of R package SpatialEpi to perform various methods in Spatial Epidemiology can be found here SpatialEpi

### Genetic Epidemiology

- Excel spreadsheet for calculating approximate Bayes factors for genetic epidemiology studies here
; R code is here and here (the latter for combining two studies also). Example is here

The paper "A Bayesian Measure of the Probability of False Discovery in Genetic Epidemiology Studies" is on the publications page.
- Details of R package to evaluate methods described in Biometrics paper (paper is here) can be found at HWEBAYES

WinBUGS code for examining Hardy-Weinberg Equilibrium here. R script to run the four allele example from the Biometrics paper here. Short user-manual for this example: here.

### Two Phase Sampling

- Bayes Analysis of Two-Phase Data: Random Sampling Code is here and example is here. Bayes Analysis of Two-Phase Data: Case-Control Sampling Code is here and example is here. Accompanying paper is to appear in Biometrics. Code was written by Michelle Ross.
- The R Code to carry out two-phase sampling in an ecological setting as descibed in "Overcoming ecological bias using the
two-phase study design" by Wakefield and Haneuse, American Journal of Epidemiology (see publications page for more details) is
here, and requires the R functions tps.q - the latter is an R version of th
e Splus code written by Norm Breslow and Nilanjan Chatterjee.
The code works with the North Carolina data
infantsAgg.dat.

### Longitudinal Data

- Bayesian population PK/PD modeling developed for BUGS by me, Dave Lunn, Nicky Best and Dave Spiegelhalter:
PKBUGS
- Bugs code for Zhou and Wakefield (2006, Biometrics) paper on curve clustering here