Causal Inference in the Closed Loop for NeurIPS 2024 Submission We include code to reproduce results. It may require downloading R packages and changing working directories. Simulations Simulation code is in folder "sims" Application Application code is in folder "opto" Functions "functions" folder includes code that is used by other R files.