Dear Statalisters,

I wish to perform a survival analysis comparing exposed and non-exposed subjects with the special condition that non-exposed subjects have their study entry date the same as the study entry date of the exposed subject to whom they are matched. I have used the user-written command gmatch to perform greedy matching based on propensity scores, and groups are well-balanced (SMD between exposed/non-exposed all <0.1).

For context, the observation window is all patients admitted to a hospital department between 01/Jan/2003 - 31/Dec/2014. A subject becomes exposed when they take out a prescription for drug. Suppose this happens on 01/Feb/2006. That exposed subject has a study entry of 01/Feb/2006. This exposed subject has been matched to a non-exposed subject who was admitted to the department on 01/Feb/2004 (thus this is their study entry date). I wish to force the study entry date of the exposed (01/Feb/2006) onto the non-exposed and treat the two years of observation time before this date that the non-exposed subject has as history.

I know of the command sttocc but I don't think this command can be used to generate what I am after.

I am using Stata v14.2.

Many thanks,
Alexander