When I estimate the aggregated ATE using employment rate data and change the control group to notyettreated, the code gives an error:
import pandas as pd
from csdid.att_gt import ATTgt
data = pd.read_csv("https://raw.githubusercontent.com/d2cml-ai/csdid/function-aggte/data/mpdta.csv")
out = ATTgt(yname = "lemp",
gname = "first.treat",
idname = "countyreal",
tname = "year",
xformla = f"lemp~1",
control_group = "notyettreated",
data = data,
).fit(est_method = 'dr')
out.aggte(typec='simple')
Error:
compute_att_gt.py", line 83, in compute_att_gt
n3 = np.where(data[gname] != glist[g], True, False)
IndexError: index 2004 is out of bounds for axis 0 with size 3`
When I estimate the aggregated ATE using employment rate data and change the control group to notyettreated, the code gives an error:
Error: