Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Consider matched pairs when dropping study subjects

    Hi Statalist,

    I have a large matched cohort data set where exposed have been matched 1:m with an unexposed group (siblings). One exposed can have multiple matched siblings (e.g. 1-10 siblings).

    My matching variable indicator is called set_id.

    The set_id variable has 9,859 unique values.
    - No. of exposed = 9,859
    - No. of unexposed/siblings = 17,220

    How do I keep this matching when I drop some study subjects that are not relevant for my specific study (e.g. exclude individuals with observations before a given year)?
    - If I drop any exposed individuals, all of their matched siblings should also be dropped.
    - Conversely, if I drop any siblings, cases should only be dropped if there is no other matched sibling for this matched pair.

    How do I write a Stata code that condition on this?

    Thanks a lot in advance.

  • #2
    Welcome to Stata list. You will increase the chances of a useful answer by following the FAQ on asking questions – provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    Depending on your specific analysis, one way to tackle this would be simply to create a variable indicating which siblings you want to drop, and then when you do all the other estimates include an if statement referring to that variable.

    Really specific coding for you would depend on precisely how your data is structured – without providing that kind of information or clear information on the estimation plan to run, we are limited in our ability to help you.

    Comment

    Working...
    X