Announcement

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

  • stset+sttocc matching - nested case-control study

    Hi all,

    I am designing a nested case-control study using cohort data and would like some help with matching using the stset + sttocc command.

    My failure event is the development of a disease (brain cancer).
    I have worked out how to match for "sex" and "birth year" using stset and sttocc.

    gen xitdate=mdy(xitmo, xitdy, xityr)

    stset xitdate, failure(cns==1) id(id) scale(365.25)
    set seed 9123456
    sttocc, match (sex byr) n(5) nodots
    list _set id _case _time sex byr, sepby(_set)


    However, I would like my controls to be matched not only for sex and birth year but additionally for date of diagnosis (i.e. each control has the same date as their matched case over the same date of diagnosis).
    Is there a way to do this?

    Many thanks,

    Ye Jin Bang.

  • #2
    However, I would like my controls to be matched not only for sex and birth year but additionally for date of diagnosis (i.e. each control has the same date as their matched case over the same date of diagnosis).
    It's not clear what you are trying to achieve. What do you mean by "date of diagnosis"? Since you haven't mentioned any other condition then I can only assume you mean "date of CNS diagnosis" (i.e., the outcome) in which case what you are trying to do makes no sense. If your cohort is selected based on diagnosis of some other condition (e.g., a virus or psychiatric condition), and you are following them up for CNS tumours then your question makes sense but you need to provide more information.

    I won't speculate more on hypotheticals. As stated in the FAQ, it is always easier to provide answers when you provide a data example (using -dataex-). I understand you can't provide sensitive personal data, but you can construct a toy example with the same structure as your data.

    After your stset, I suggest you do this.
    Code:
    format _t0 _t xitdate %d
    list _t0 _t xitdate _d in 1/10
    _t0 is the time at start of follow-up and _t is the time at end of follow-up. You are using calendar time as the time scale so, "time" means "date". You should find that _t is the same as xitdate and _t0 is 1 january 1960. This may not be a problem, but I'm guessing your patients didn't all become at risk on 1 january 1960. You might need to add the enter() option to stset and that date may be the date of diagnosis to which you refer.

    Comment

    Working...
    X