Learn R Programming

⚠️There's a newer version (4.0-6) of this package.Take me there.

eco (version 3.0-1)

R Package for Ecological Inference in 2x2 Tables

Description

eco is a publicly available R package that implements the Bayesian and likelihood methods proposed in Imai, Lu, and Strauss (2006) for ecological inference in 2x2 tables as well as the method of bounds introduced by Duncan and Davis (1953). The package fits both parametric and nonparametric models using either the Expectation-Maximization algorithms (for likelihood models) or the Markov chain Monte Carlo algorithms (for Bayesian models). For all models, the individual-level data can be incorporated into their estimation whenever such data are available. The package also provides a functionality which allows one to quantify the effect of data aggregation on parameter estimation and hypothesis testing under the parametric model.

Copy Link

Version

Install

install.packages('eco')

Monthly Downloads

180

Version

3.0-1

License

GPL (version 2 or later)

Maintainer

Kosuke Imai

Last Published

December 8th, 2025

Functions in eco (3.0-1)

ecoBD

Calculating the Bounds for Ecological Inference in RxC Tables
predict.eco

Out-of-Sample Posterior Prediction under the Nonparametric Bayesian Model for Ecological Inference in 2x2 Tables
summary.ecoNP

Summarizing the Results for the Bayesian Nonparametric Model for Ecological Inference in 2x2 Tables
eco

Fitting the Parametric Bayesian Model of Ecological Inference in 2x2 Tables
housep88

Electoral Results for the House and Presidential Races in 1988
forgnlit30

Foreign-born literacy in 1930
wallace

Black voting rates for Wallace for President, 1968
summary.ecoML

Summarizing the Results for the Maximum Likelihood Parametric Model for Ecological Inference in 2x2 Tables
reg

Voter Registration in US Southern States
census

Black Illiteracy Rates in 1910 US Census
ecoML

Fitting Parametric Models and Quantifying Missing Information for Ecological Inference in 2x2 Tables
ecoNP

Fitting the Nonparametric Bayesian Models of Ecological Inference in 2x2 Tables
forgnlit30c

Foreign-born literacy in 1930, County Level
summary.eco

Summarizing the Results for the Bayesian Parametric Model for Ecological Inference in 2x2 Tables