  Algorithms produce a growing portion of decisions and recommendations both in
policy and business. Such algorithmic decisions are natural experiments
(conditionally quasi-randomly assigned instruments) since the algorithms make
decisions based only on observable input variables. We use this observation to
develop a treatment-effect estimator for a class of stochastic and
deterministic algorithms. Our estimator is shown to be consistent and
asymptotically normal for well-defined causal effects. A key special case of
our estimator is a high-dimensional regression discontinuity design. The proofs
use tools from differential geometry and geometric measure theory, which may be
of independent interest.
  The practical performance of our method is first demonstrated in a
high-dimensional simulation resembling decision-making by machine learning
algorithms. Our estimator has smaller mean squared errors compared to
alternative estimators. We finally apply our estimator to evaluate the effect
of Coronavirus Aid, Relief, and Economic Security (CARES) Act, where more than
\$10 billion worth of relief funding is allocated to hospitals via an
algorithmic rule. The estimates suggest that the relief funding has little
effects on COVID-19-related hospital activity levels. Naive OLS and IV
estimates exhibit substantial selection bias.
