WELCOME TO THESELF
CONTROLLED CASE
SERIES METHODWEBSITE! |
STATISTICS@ |

HOME |
PAPERS |
STATA |
GENSTAT |
GLIM |
SAS |
R |
ABOUT US |

There are two ways in which we can fit the case series model after the data have been reformatted:

- Download the gnm package and use gnm to fit a conditional poisson regression model with eliminate = indiv (where indiv is a factor for each individual in the data set)
- Use the survival package (included in R 2.5.0, so no need to download) and use clogit to fit a logistic regression model with strata = event (where event is a factor for each event in the data set, rather than a factor for each individual). Here, we fit a conditional logistic regression model rather than a conditional poisson regression model: because recurrent events are assumed to be independent the conditional logistic likelihood is equivalent if each event is treated like a separate individual.

All examples on this webpage and the R package use clogit, therefore reformatted data to fit SCCS models looks a little different in R than in other packages.

A general R package for self-controlled case series models was written by Yonas Weldesselassie. This can fit:

- The standard SCCS model.
- The semiparametric SCCS model. (Farrington CP and Whitaker HJ. Semi-parametric analysis of case series data. JRSS C, 2006, 55(5): 553-594.)
- The SCCS model for event dependent observation periods. (Farrington CP et al. Self-Controlled Case Series Analysis with Event-Dependent Observation Periods. JASA, 2011, 106(494): 417–426.)
- The SCCS model with smooth (spline-based) age effect. (Weldeselassie YG, Whitaker HJ, Farrington CP. Self-Controlled Case Series Method with Smooth Age Effect. Stats in Med, 2014, 33(4): 639-649.)
- The SCCS model with smooth (spline-based) exposure effect, for a single exposure. (Weldeselassie YG, Whitaker HJ, Farrington CP. Flexible modelling of vaccine effect in self-controlled case series models. Biometrical journal, early view available)
- The non-parametric, spline based SCCS model, for a single exposure. (Weldeselassie YG, Whitaker HJ, Farrington CP. Non-parametric self-controlled case series method. Submitted. See Yonas' thesis.)

We plan to extend this package in the future to fit further SCCS models.

adSCCS package version 1.5

adSCCS manual

All script files were written by Heather Whitaker for R version 2.5.0 (free software available from http://www.r-project.org/). Please let us know if you have any suggestions for improving them.

To run the MMR and meningitis in Oxford example detailed in the tutorial paper save these two files:

'ox.txt', the data in a tab-delimited text file.

'oxford.r', the commands in an r script file.

Open oxford.r and select 'run all' under the edit menu.'itp.r' fits the multiple risk periods example on p.1782-1783 of the tutorial paper.

'itp.r', r script file

'intuss.r' fits analysis 5, repeat exposures example detailed on p.1787-1789 of the tutorial paper.

'intuss.txt', data

'intuss.r', r script
file

The self-controlled case series method / Heather Whitaker / updated December 2015