/********************************************************************************** * File name : Oxford.sas * * Author : Bart Spiessens * * GlaxoSmithKline Biologicals * * Email : Bart.Spiessens@gskbio.com * * Date : 02FEB2005 * * ------------------------------------------------------------------------------ * * Description : This batch contains case series analyses on oxford data * * from Miller et al. * * References : Miller et al. The Lancet, 1993;341:979-982 * * Tutorial in Biostatistics: http:\\statistics.open.ac.uk\sccs * **********************************************************************************/ OPTIONS nodate nonumber; /* Define macro and output directories */ %LET macdir = C:\Case series\Macro; %LET outdir = C:\Case series\Output; %LET indir = C:\Case series\Examples tutorial; /* Define name of batch */ %LET batch=Oxford; /* Read in macros */ %INCLUDE "&macdir\sccs.sas"; %INCLUDE "&macdir\poisreg.sas"; %INCLUDE "&macdir\element.sas"; /* Read in dataset */ DATA oxford; INPUT indiv diag start end st_risk end_risk; /* The start of the observation period and the start of the risk period are always included in the interval, therefore we have to add one day */ start = start + 1; st_risk = st_risk + 1; CARDS; 1 398 365 730 472 493 2 413 365 730 406 427 3 449 365 730 443 464 4 455 365 730 447 468 5 472 365 730 446 467 6 474 365 730 409 430 7 485 365 730 484 505 8 524 365 730 510 531 9 700 365 730 442 463 10 399 365 730 730 751 ; RUN; /* Perform analyses from Tutorial in Biostatistics */ /* Agerange defines the age range for each subject In this example, the observation period goes from 366 (inclusive) to 730 (inclusive) days */ %LET agerange=366 730; /* Define risk periods (0-20 instead of 15-35 because st_risk is the start of the risk period and not the day of vaccination */ %LET risk=0 20; /* Define age categories */ %LET age=547; /* No adjustment for seasonality is used in this example */ %LET season=; /* No semiparametric analysis is done */ %LET semi=N; /* Create dataset for use with case series analysis */ %sccs(data=oxford, pid=indiv, events=diag, vacc=st_risk, startst=start, endst=end); /* Perform the case series analysis */ %poisreg(data=wk_sccs,y=nevt,covar=int risk, class=age,offset=offset,elim=indiv ,prntyn=Y,covb=Y,title="Oxford analysis"); /* Same output can be obtained in GENMOD, but there is no possibility to eliminate subjects if the dataset becomes larger */ TITLE "Oxford analysis using PROC GENMOD"; PROC GENMOD DATA=wk_sccs; CLASS indiv age; MODEL nevt = indiv risk age / DIST=POISSON OFFSET=l_off COVB; ESTIMATE 'Risk' risk 1 / EXP; ESTIMATE 'Age' age 1 -1 / EXP; RUN; /* ************** */ /* SEMIPARAMETRIC */ /* ************** */ /* semiparametric analysis */ %LET semi = Y; /* Create dataset for use with case series analysis */ %sccs(data=oxford, pid=indiv, events=diag, vacc=st_risk, startst=start, endst=end); /* Perform the case series analysis */ %poisreg(data=wk_sccs,y=nevt,covar=int risk, class=age,elim=indiv ,prntyn=Y,title="Oxford analysis, semiparametric analysis"); TITLE; FILENAME output "&outdir\&batch..lst"; DM out "file output replace;" CONTINUE; FILENAME output CLEAR; DM log "BOT" CONTINUE;