Dear all,
I am about to set up a matched case control data set using 1:4 matching with first hospital admission as the outcome variable and using risk set sampling.
The code I've used previously for a different outcome (mortality) is:
stset Study_OUT_date, failure(Failure_status) origin(time HF_index_date) scale(365.25)
set seed 1768927689
sttocc, match(Study_in_date) number(4)
However I want to make sure that the controls selected for each case are not themselves a case (admitted to hospital) within three months of their match date as a control.
I thought of creating an indicator variable with a different number for each 3 months of follow up that the cases occur (cases and controls are also matched on calendar time). My questions are i) can I instruct Stata to NOT match according to this variable (so that cases occuring within the same 3 months do not appear as cases and controls in the same set) and if so what is the command? ii) is there another solution?
Many thanks
Claire
I am about to set up a matched case control data set using 1:4 matching with first hospital admission as the outcome variable and using risk set sampling.
The code I've used previously for a different outcome (mortality) is:
stset Study_OUT_date, failure(Failure_status) origin(time HF_index_date) scale(365.25)
set seed 1768927689
sttocc, match(Study_in_date) number(4)
However I want to make sure that the controls selected for each case are not themselves a case (admitted to hospital) within three months of their match date as a control.
I thought of creating an indicator variable with a different number for each 3 months of follow up that the cases occur (cases and controls are also matched on calendar time). My questions are i) can I instruct Stata to NOT match according to this variable (so that cases occuring within the same 3 months do not appear as cases and controls in the same set) and if so what is the command? ii) is there another solution?
Many thanks
Claire
Comment