This is the code for the bivariate analysis used by Raymakers et al. (2019) (see Table 2, p. 5). Exposure to inhaled corticosteroids (ICS) is initially set to unexposed, until subject fill a prescription for an ICS.
The manuscript is available here: https://erj.ersjournals.com/content/53/6/1801257
Additional details are available from the authors.
____________________________________________________________________________________________________________________________________________________________________________________________
PROC PHREG DATA=&inputdata;
ARRAY xstart{*} ICS_START1-ICS_START203;
ARRAY xstop{*} ICS_STOP1-ICS_STOP203;
ics_ever_use=0;
DO I=1 TO 203;
IF xstop{I}>xstart{I} AND xstart{I}<time2lungcancer THEN ics_ever_use=1;
END;
MODEL time2lungcancer*censor(1)=ics_ever_use /risklimits;
RUN;