eiPack: Ecological Inference and Higher-Dimension Data Management
Olivia Lau, Ryan Moore, and Mike Kellermann
Version 0.1-6 (beta)

Ecological inference (EI) takes contingency tables as the unit of analysis. These tables are described by row and column totals (or proportions); the goal of inference is to determine the marginal intra-table relationship between the rows and columns. While some existing R packages (MCMCpack by Andrew Martin and Kevin Quinn and eco by Kosuke Imai and Ying Lu, for example) offer functions that analyze 2 x 2 models, we implement more general methods that can take more than two rows or columns. Our package includes:

  • Extreme case analysis, or the method of bounds, suggested by Duncan and Davis (1953)
  • Ecological regression described in Goodman (1953) using both frequentist point estimates and a Bayesian estimator that produces correct standard errors.
  • R x C model described in Rosen et al. (2001) using a Bayesian Markov-chain Monte Carlo algorithm

To install eiPack, start R and type:


If you use this package, please cite it as

    Lau, Olivia, Ryan T. Moore, and Michael Kellermann. "eiPack: Ecological Inference and Higher-Dimension Data Management," R News, vol.7, no. 2 (October 2007).