Package: seine 0.1.2

Cory McCartan

seine: Semiparametric Ecological Inference

Efficient and user-friendly routines for modern ecological inference. Implements the methods described in McCartan & Kuriwaki (2025+) <doi:10.48550/arXiv.2509.20194>, which generalize ecological regression as introduced by Goodman (1953) <doi:10.2307/2088121>. Includes routines for preprocessing, synthetic data generation, double/debiased machine learning (DML) estimation, partial identification bounds, and sensitivity analysis.

Authors:Cory McCartan [aut, cre, cph], Shiro Kuriwaki [aut, cph]

seine_0.1.2.tar.gz
seine_0.1.2.tar.gz(r-4.7-arm64)seine_0.1.2.tar.gz(r-4.7-x86_64)seine_0.1.2.tar.gz(r-4.6-arm64)seine_0.1.2.tar.gz(r-4.6-x86_64)
seine_0.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
seine/json (API)
NEWS

# Install 'seine' in R:
install.packages('seine', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/corymccartan/seine/issues

Pkgdown/docs site:https://corymccartan.com

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • elec_1968 - 1968 U.S. presidential election data

On CRAN:

Conda:

openblascppopenmp

3.40 score 9 scripts 19 exports 35 dependencies

Last updated from:4c87fb47ad. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK212
linux-devel-x86_64OK153
source / vignettesOK287
linux-release-arm64OK169
linux-release-x86_64OK163
wasm-releaseOK155

Exports:ei_benchei_boundsei_estei_est_localei_local_covei_proportionsei_ridgeei_ridge_implei_rieszei_riesz_implei_sensei_sens_rvei_specei_syntheticei_test_carei_wgt_propei_wgt_sqrtei_wgt_unifei_wrap_model

Dependencies:briocallrclicpp11cpp11armadillocrayondescdiffobjevaluatefsgluehardhatjsonlitelifecyclemagrittrotelpillarpkgbuildpkgconfigpkgloadpraiseprocessxpsquadprogR6rlangrprojrootsparsevctrstestthattibbletidyselectutf8vctrswaldowithr

Analyzing aggregate data

Rendered fromseine.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2026-06-08

Custom sensitivity contour plots

Rendered fromzzz_contour.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2026-06-08

Local estimates for ecological inference

Rendered fromlocal.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2026-06-08

Sensitivity analysis for ecological inference

Rendered fromsensitivity.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2026-06-08

Testing the CAR assumption

Rendered fromtest.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2026-06-08

Readme and manuals

Help Manual

Help pageTopics
Benchmark sensitivity parameters from observed covariatesei_bench
Compute partial identification bounds on local ecological quantitiesas.array.ei_bounds ei_bounds ei_bounds.data.frame ei_bounds.default ei_bounds.ei_spec ei_bounds.formula ei_bounds.matrix
Estimate ecological quantitiesas.matrix.ei_est ei_est nobs.ei_est vcov.ei_est
Produce local ecological estimatesas.array.ei_est_local ei_est_local
Estimate the residual covariance of the local estimandsei_local_cov
Convert counts to proportionsei_proportions
Fit an ecological inference regression modelei_ridge ei_ridge.data.frame ei_ridge.default ei_ridge.ei_spec ei_ridge.formula ei_ridge.matrix
Low-level implementations of 'ei_ridge()' and 'ei_riesz()'ei_ridge_impl ei_riesz_impl
Estimate Riesz representer for ecological inferenceei_riesz ei_riesz.data.frame ei_riesz.default ei_riesz.ei_spec ei_riesz.formula ei_riesz.matrix
Conduct a sensitivity analysis for estimated ecological quantitiesei_sens
Robustness values for ecological inferenceei_sens_rv
Specify an ecological inference problemei_spec weights.ei_spec
Generate synthetic ecological dataei_synthetic
Test the coarsening at random (CAR) assumptionei_test_car
Estimation weighting modelsei_wgt ei_wgt_prop ei_wgt_sqrt ei_wgt_unif
Wrap another predictive model for use in 'ei_est'ei_wrap_model
1968 U.S. presidential election dataelec_1968
Bias contour plot for ecological inference estimatesplot.ei_sens
Plot an EI specificationplot.ei_spec
Methods for 'ei_ridge' modelsfitted.ei_ridge predict.ei_ridge residuals.ei_ridge ridge-methods summary.ei_ridge vcov.ei_ridge weights.ei_ridge
Extract Riesz representer weightsweights.ei_riesz