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.