enforce_lead_restrictions check treatment and control units for treatment reversion in the lead window. Treated units must stay treated and control units must stay in control (according to the specified qoi)
enforce_lead_restrictions(
matched_sets,
ordered.data,
max.lead,
t.var,
id.var,
treatment.var
)
matched.set object with the matched sets that meet the conditions
matched.set object
parsed data as data.frame object
The largest lead value (e.g. the biggest F)
string specifying the time variable
string specifying the unit id variable
string specifying the treatment variable.