ivDiag – User Manual

Welcome

The ivDiag package provides tools for estimation, inference, sensitivity analysis, and visualization with instrumental variable (IV) designs. It implements the guidelines proposed in Lal et al. (2024) in R, enabling researchers to obtain reliable and robust estimates of their IV models.

The package computes several types of standard errors (SEs), F-statistics, and weak-IV robust confidence intervals (CIs). Together they show how uncertain an IV estimate is, including when the instruments are weak.

The package also provides the Anderson-Rubin (AR) test and adjusted t-ratio inference from Lee et al. (2022) to enhance the validity and reliability of statistical inference.

ivDiag also offers the Local-to-Zero (LTZ) estimator (Conley et al. 2012). This estimator adjusts the 2SLS estimate and its confidence interval for a plausible violation of the exclusion restriction specified by the researcher. Functions for plotting coefficients from two-stage least squares (2SLS) and ordinary least squares (OLS) regressions allow researchers to compare the two estimators and various inferential methods.

The omnibus function ivDiag returns a list. Parts of this list can be appended as additional rows in tables produced by modelsummary, fixest::etable, and stargazer, among other tools. This makes it easy for researchers to integrate ivDiag estimates into their existing workflows.

ivDiag applies only to the one-treatment case, although there can be multiple instruments.

Organization

Contributors

Report bugs

Please report bugs to yiqingxu [at] stanford.edu or open an issue on GitHub.

Lifecycle: stable License: MIT downloads: CRAN