clean_leads function

clean_leads Function to check the lead windows in treated and control units for missing outcome data. If data is missing, remove those units from matched sets.

clean_leads Function to check the lead windows in treated and control units for missing outcome data. If data is missing, remove those units from matched sets.

clean_leads(matched_sets, ordered.data, max.lead, t.var, id.var, outcome.var)

Arguments

  • matched_sets: matched.set object contained pre-filtered matched sets
  • ordered.data: data.frame object to be checked for missing data. This should have been passed through data preparation functions already.
  • max.lead: Integer specifying the biggest value of the lead window.
  • t.var: string specifying the time id variable
  • id.var: string specifying the unit id variable
  • outcome.var: string specifying the outcome variable.

Returns

a cleaned/filtered matched.set object

  • Maintainer: In Song Kim
  • License: GPL (>= 3)
  • Last published: 2025-03-03

Useful links