WELCOME TO THE
SELF CONTROLLED CASE SERIES METHOD
WEBSITE!
STATISTICS@
HOME PAPERS STATA GENSTAT GLIM SAS R ABOUT US

Using SAS for the self-controlled case series method.

The SAS macros are written to run under SAS v8.0 or above.

The macros

There are two main macros for fitting the self-controlled case series method (both parametric and semi-parametric) in SAS:

A third macro (element.sas) is a small macro to create macro variables in SAS from a list of variable names. This macro is used in the above main macros.

These macros can be read into SAS using the %INCLUDE statement (change the directory according to the location of the macros):

%INCLUDE “c:\temp\sccs\sccs.sas”;

%INCLUDE “c:\temp\sccs\poisreg.sas”;

%INCLUDE “c:\temp\sccs\element.sas”;

The following global parameters should be specified before calling the macros sccs.sas or poisreg.sas:

The macro sccs.sas has the following parameters:

Note that dates can be specified on the age scale (i.e., number of days since birth) or on the calendar scale (i.e., SAS numeric date value: number of days since 01JAN1960)

The macro sccs.sas outputs a dataset (default name=wk_sccs) which contains several rows per subject (one for each interval) and the following parameters:

The macro poisreg.sas has the following parameters:

The following examples show how the macros can be used for fitting the self-controlled case series analysis in SAS.

In each of the examples, three global macro variables are defined which contain the following directories:

These directories are only used in the different batches and not in the macros for analysis.

MMR and meningitis in Oxford example

The SAS batch oxford.sas contains the case series analysis of the Oxford dataset from Miller et al. (The Lancet, 1993;341:979-982). The results can be found in oxford.lst.

Additional details and comments are given in the SAS program itself.

Both the original analysis as well as the semi-parametric analysis are illustrated.

oxford_cov.sas contains the case series analysis of the Oxford dataset, displaying the variance-covariance matrix. The option COVB in PROC GENMOD to has also been included to compare the output. The covariance matrix is saved in a matrix _covb and printed when parameter covb=Y.

MMR and ITP examples

The SAS batch ITP and MMR.sas contains the case series analysis of the ITP and MMR dataset from Miller et al. (Archives of Disease in Childhood 2001;84:227-229). The results can be found in ITP and MMR.lst.

The data is imported from itp.dat using the INFILE statement.

The SAS program contains

OPV and IS examples

The SAS batch IS and OPV.sas contains the case series analysis of the IS and OPV dataset from Andrews et al. (European Journal of Epidemiology 2001; 17:701-706). The results can be found in IS and OPV.lst.

The data is imported from intus.dat using the INFILE statement.

The SAS program contains the different analyses that are performed in the tutorial:

In addition, the semi-parametric analysis of the Analysis 1 is also shown.

SAS code for the paper: Hua et al. 'A Simulation Study to Compare Three Self-Controlled Case Series Approaches: Correction for Violation of Assumption and Evaluation of Bias' Pharmacoepidemiology and drug safety 

This macro is for multiple exposures, pseudo-likelihood method  pseudo_multiple_exposures.SAS


The self-controlled case series method / Heather Whitaker / updated August 2006