JOB "read in the data" "indiv = individual identifier" "eventday = day on which adverse event occurred" "sta = day before the start of the observation period" "end = day which is the end of observation period" "exday = day marking the start of exposure" FILEREAD[name = 'itp.txt'] identifier = indiv, eventday, sta, end, mmr; fgroups = no "n0: non-zero if the first event for each individual\ then cut out observations where n0 is 0" CALC n1 = nval(indiv) CALC n2 = n1 - 1 VARI [nvalues = n1] n0 CALC n0$[1] = 1 CALC n0$[2...n1] = indiv$[2...n1] - indiv$[1...n2] SUBSET [condition = n0 .NE. 0] oldvector=indiv,eventday,sta,end,mmr "convert indiv to a factor using GROUPS with the option lmethod=*" GROUPS [redefine=yes; lmethod=*] indiv "ex1, ex2 etc.. mark either 1 day before 1st day of a risk\ period or the last day of a risk period for each individual.\ risk periods must not overlap, i.e. ex1 < ex2, ex2 < ex3 etc...\ (can give ex1 = ex2, ex2 = ex3 etc... to skip out a risk group)\ If there is no risk period give ex1,ex2 etc.. values greater than max(end)" CALC ex1 = mmr - 1 CALC ex2 = mmr + 14 CALC ex3 = mmr + 28 CALC ex4 = mmr + 42 "ex: pointer containing the risk factor cut points." POINTER [values = ex1,ex2,ex3,ex4] ex "exc: labels for risk factors corresponding to the cut points in ex.\ The first and last value of exc should be the baseline level, 0" VARI [nvalues=5] exc READ exc 0 1 2 3 0 : "t: age cut points to mark the end of an age group or day before the start of\ a new age group. Do not include the beginning of the first age group or the end\ of the last age group. The minimum length of t is 1 (for 2 age groups). If\ no age groups are required choose a value greater than or equal to max(end)" VARI [nvalues=5] t READ t 426 487 548 609 670 : "Delete anything that is no longer needed" DELETE [redefine = yes] mmr "fit: what explanatory variables to fit (this should include 'age_group': the age group\ factor and 'exposure_group': risk factor)." TEXT [VALUES = 'exposure_group + age_group'] fit OPEN 'sccs.gen'; CHANNEL=4; FILETYPE=input INPUT 4 ENDJOB