*! version 1.0 23 Dec 2025

Title

sjive -- Shrunken jackknife instrumental variables estimator (SJIVE)

Syntax

sjive
depvar
[varlist]
(var
=
varlist_iv)
[if]
[in]
[,
options]

varlist is the list of exogenous variables.

var is the endogenous variable.

varlist_iv is the list of instrumental variables.

Optional
gen(string) creates a new variable containing the shrunken instrument

w(varlist) specifies shrinkage targets

chunk(#) specifies the number of observations processed per iteration

noshrink suppresses shrinkage

force drops singleton observations that cause estimation failure

Description

sjive implements the Shrunken Jackknife Instrumental Variables
Estimator (SJIVE) developed by Frandsen, Lefgren, Leslie, and McIntyre (2025).
SJIVE improves upon standard JIVE estimation by applying empirical Bayes
shrinkage to first-stage fitted values, consequently improving the second-stage
precision of treatment effect estimates. This is particularly beneficial in
many-instrument designs like judge fixed effects.

Options

Main

gen(string) creates a new variable containing the shrunken instrument
(phattilde) used in the second stage

w(varlist) specifies low-dimensional covariates used as shrinkage targets.
These should be predictive of treatment propensities. When specified,
instruments are shrunk toward conditional means given these targets; otherwise shrinkage is toward
the grand mean

chunk(#) specifies the number of observations processed per iteration
when computing large matrices in standard error and shrinkage parameter
calculation. Default is 1000. Larger values use more memory but may be faster

noshrink suppresses shrinkage, reducing SJIVE to the unbiased jackknife
instrumental variables estimator (UJIVE)

force drops observations that are perfectly identified by the instruments or
controls (singletons). These observations have leverage equal to one, causing 
the leave-one-out estimator to fail. The option recursively removes these 
observations until the sample is stable

Examples

Fit the SJIVE model with offense type dummies as controls and judge dummies
as shrinkage targets with judge-offense type interactions as instruments

. use sjiveexample.dta, clear
. sjive conviction offensetype* (pretrial_detention = judge_offensetype_int*), w(judge*) chunk(2000)

Stored results

Scalars

e(N) number of observations used in estimation

e(weak) indicator equal to 1 if weak instruments are detected

e(N_excluded) number of excluded instruments

e(N_dropped) number of observations dropped by --force-- option

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

References

Frandsen, Brigham R., Lars J. Lefgren, Emily C. Leslie, and Samuel P. McIntyre (2025). The Incredible Shrinking Instruments: Using Empirical Bayes to Increase Efficiency in IV Designs with Many Instruments. Working Paper.

Angrist, Joshua D., Guido W. Imbens, and Alan B. Krueger (1999). Jackknife Instrumental Variables Estimation. Journal of Applied Econometrics, 14(1), 57-67.

Kolesar, Michal (2013). Estimation in an Instrumental Variables Model with Treatment Effect Heterogeneity. Unpublished working paper.

See Also

Related commands:
ivregress