Skip to contents

Ecological inference

Estimate global and local quantities and perform sensitivity analyses

ei_est() as.matrix(<ei_est>) vcov(<ei_est>) nobs(<ei_est>)
Estimate ecological quantities
ei_est_local() as.array(<ei_est_local>)
Produce local ecological estimates
ei_sens()
Conduct a sensitivity analysis for estimated ecological quantities
ei_sens_rv()
Robustness values for ecological inference
ei_bench()
Benchmark sensitivity parameters from observed covariates
plot(<ei_sens>)
Bias contour plot for ecological inference estimates

Ecological modeling

Fit regression and weighting models to aggregate data to use in inference

ei_ridge()
Fit an ecological inference regression model
ei_riesz()
Estimate Riesz representer for ecological inference
ei_wgt_unif() ei_wgt_prop() ei_wgt_sqrt()
Estimation weighting models
predict(<ei_ridge>) fitted(<ei_ridge>) residuals(<ei_ridge>) vcov(<ei_ridge>) summary(<ei_ridge>) weights(<ei_ridge>)
Methods for ei_ridge models
weights(<ei_riesz>)
Extract Riesz representer weights
ei_ridge_impl() ei_riesz_impl()
Low-level implementations of ei_ridge() and ei_riesz()
ei_wrap_model()
Wrap another predictive model for use in ei_est

Preprocessing

Functions to set up EI problems and tidy data

ei_spec() weights(<ei_spec>)
Specify an ecological inference problem
plot(<ei_spec>)
Plot an EI specification
ei_proportions()
Convert counts to proportions

Data

elec_1968
1968 U.S. presidential election data
ei_synthetic()
Generate synthetic ecological data