insongkim / PanelMatch

118 stars 36 forks source link

Extract data from matched set object #122

Closed ilango2486 closed 1 year ago

ilango2486 commented 1 year ago

Hi @adamrauh, is there a way to extract the matched control units for each treated unit from the matched set object? Currently, I can view the object as a list of control units and weights for each treated unit by calling something like matched.set$att[[1]]. However, I am not able to filter the control units for the treated unit. Is there a work around for getting the list?

adamrauh commented 1 year ago

Is this helpful? If I understand correctly, you are quite close to having what you want. If you index into the matched.set object with the id + time of treatment of the treated unit, it should return to you a vector of control unit ids (and the weights, if you want them).

ilango2486 commented 1 year ago

Thank you. This is very helpful!