Shosei Sakaguchi, "Estimation of Average Treatment Effects Using Panel Data when Treatment Effect Heterogeneity Depends on Unobserved Fixed Effects", Journal of Applied Econometrics, Vol. 35, No. 3, 2020, pp. 315-327. Program files, written in Stata, and a CVS data file used for empirical application are stored in "empirical_application.zip". Program files, written in R, used for Monte Carlo simulations are stored in "monte_carlo_simulation.zip". All files are ASCII files in DOS format. Unix/Linux users should use "unzip -a". 1. Empirical Application "empirical_application.zip" contains the following files: a. "mother_smoking.do": Stata program file to replicate the results in Tables 2 and 3 b. "birpanel2006.csv": data file The dataset is taken from J. Abrevaya, "Estimating the Effect of Smoking on Birth Outcomes Using a Matched Panel Data Approach," Journal of Applied Econometrics, Vol. 21, No. 4, 2006, pp. 489-519. It is also available, in a slightly different form, at http://qed.econ.queensu.ca/jae/2006-v21.4/abrevaya/ The results presented in the paper are computed using Stata SE 15 with Windows 10. To obtain the results in Tables 2 and 3, put the code and the data file in a folder, change "C:\Users\Shosei Sakaguchi\OneDrive\Project panel_ate\Empirical Application" in line 18 of "mother_smoking.do" to the name of the folder that contains these two files, and run "mother_smoking.do". 2. Monte Carlo Simulation "monte_carlo_simulation.zip" contains the following R files: a. "monte_carlo_simulation_Table1.R": R program file for Table 1 b. "monte_carlo_simulation_TablesB.1-B.2.R": R program file for Tables B.1 and B.2 in the online appendix c. "monte_carlo_simulation_TableB.3-B.4.R": R program file for Tables B.3 and B.4 in the online appendix d. "monte_carlo_simulation_TablesB.5-B.6.R": R program file for Tables B.5 and B.6 in the online appendix These codes require the following four packages: "MASS", "plm", "AER", and "systemfit". The results presented in the paper are computed using RStudio Version 1.1.463 with Windows 10. Shosei Sakaguchi Department of Economics University College London s.sakaguchi [AT] ucl.ac.uk