Package: estimatr 2.0.1

Alexander Coppock

estimatr: Fast Estimators for Design-Based Inference

Fast procedures for a small set of commonly-used, design-appropriate estimators with robust standard errors and confidence intervals. Includes estimators for linear regression, instrumental variables regression, difference-in-means, Horvitz-Thompson estimation, and regression improving precision of experimental estimates by interacting treatment with centered pre-treatment covariates introduced by Lin (2013) <doi:10.1214/12-AOAS583>. Fixed effects are absorbed by alternating projections rather than by dummy expansion, and Horvitz-Thompson variance is computed from the randomization declaration.

Authors:Alexander Coppock [aut, cre], Graeme Blair [aut], Jasper Cooper [aut], Luke Sonnet [aut], Macartan Humphreys [ctb], Neal Fultz [ctb], Lily Medina [ctb], Russell Lenth [ctb], Molly Offer-Westort [ctb]

estimatr_2.0.1.tar.gz
estimatr_2.0.1.zip(r-4.7-x86_64)estimatr_2.0.1.zip(r-4.7-arm64)estimatr_2.0.1.zip(r-4.6-x86_64)estimatr_2.0.1.zip(r-4.6-arm64)estimatr_2.0.1.zip(r-4.5-x86_64)
estimatr_2.0.1.tgz(r-4.6-x86_64)estimatr_2.0.1.tgz(r-4.6-arm64)estimatr_2.0.1.tgz(r-4.5-x86_64)estimatr_2.0.1.tgz(r-4.5-arm64)
estimatr_2.0.1.tar.gz(r-4.7-arm64)estimatr_2.0.1.tar.gz(r-4.7-x86_64)estimatr_2.0.1.tar.gz(r-4.6-arm64)estimatr_2.0.1.tar.gz(r-4.6-x86_64)
estimatr_2.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
estimatr/json (API)

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

Bug tracker:https://github.com/declaredesign/estimatr/issues

Pkgdown/docs site:https://declaredesign.org

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

14.17 score 135 stars 20 packages 3.7k scripts 16k downloads 3 mentions 14 exports 14 dependencies

Last updated from:4773b53253. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK206
linux-devel-x86_64OK217
source / vignettesOK257
linux-release-arm64OK201
linux-release-x86_64OK226
macos-release-arm64OK195
macos-release-x86_64OK335
macos-oldrel-arm64OK129
macos-oldrel-x86_64OK330
windows-devel-arm64OK413
windows-devel-x86_64OK254
windows-release-arm64OK441
windows-release-x86_64OK219
windows-oldrel-x86_64OK220
wasm-releaseOK119

Exports:augmentcommarobustdifference_in_meansextract.iv_robustextract.lm_robustglancehorvitz_thompsoniv_robustlh_robustlm_linlm_robustlm_robust_fitstarpreptidy

Dependencies:cliFormulagenericsgluelifecyclemagrittrpillarpkgconfigRcppRcppEigenrlangtibbleutf8vctrs

estimatr 2.0: what changes, what does not, and why
The short version | What does not change | What changes, and why | 1. horvitz_thompson() takes one probability argument | 2. Clustered fixed effects get a different default standard error | 3. Functions that are gone | Porting an existing script | What is new | Blocked designs whose blocks are not all the same shape | Speed | How this was checked | The estimatr issue list | Current status | References

Last update: 2026-10-10
Started: 2026-09-15

Mathematical notes and guarantees for estimatr
Written with AI, and checked accordingly | How the checking works | Notation | The data used throughout | lm_robust | Coefficients | Weights | Heteroskedasticity-robust variance | Leverage at and above one | Cluster-robust variance | Absorbed fixed effects | Rank | Weights and the hat matrix: where Stata differs | Confidence intervals and testing | lm_lin | iv_robust | Variance | Which leverage | Correspondence with Stata | lh_robust | difference_in_means | Estimates | Variance for unblocked and clustered designs | Variance for blocked designs | What is refused | horvitz_thompson | What the declaration buys | Every promise in one table | What this does not cover | References

Last update: 2026-10-10
Started: 2018-02-10

Getting started with estimatr
The example data | lm_robust() | Clustered standard errors | Choosing a different variance estimator | Fixed effects | Weights | lm_lin() | iv_robust() | difference_in_means() | horvitz_thompson() | lh_robust() | Working with the output | In a simulation | Where to go next | References

Last update: 2026-09-15
Started: 2018-01-19