*! version 1.1 24 May 2024

Title

sccsdta -- Generating the dataset for the self-controlled case series method (SCCS)

Syntax

sccsdta
varlist(min=2
max=2)
[,
options]

Required
enter(varname) Start of the individual observation period.

riskpoints(numlist sort) End points of intervals at risk.

First value is the starting point of the first at risk interval.

The rest of the values are the last point of an at risk interval.

All intervals include their last end points.

timepoints(numlist sort) At least one interval end point(s)
for time dependence.

The first time interval starts with enter.

The end points are relative to enter unless
option absolutetimepoints is set.
The last time interval end is also the end of the individual observation period
unless the option ex:it is set.

All intervals include their last end points.

Optional
exit(varname) A variable for the absolute last end point in the observation period.

absolutetimepoints Treat the time end points in
timepoints as absolute.

noregression The regression output can be ignored by this option.

noquietly See the code run in the result window.

* Add options for the used xtpoisson command.

Description

The SCCS method examines the association between a time-varying exposure
and an event outcome.

The study samples only cases, and it requires that an event has occurred during
the observation period.

The method doesn't compare incidences for cases with incidences for references.

Instead, it contrasts incidences in periods of risk with incidences in periods
where the case is not at risk.

In this approach, cases serve as their control for fixed confounders.

It's feasible to adjust for time effects such as age.

The intervals are marked by risk, time, and individual.

For each interval, the number of incidences and the width of the interval are
determined..

The command sccsdta reports the output from a xtpoisson
where data are xtset by the generated variable _rowid.

However, the undocumented old version of xtpoisson using the
option i for the xtset-setting.

Examples

The datasets used below are readable from version 15.1.

Version 12 datasets with the same data are added to the package.

Case 3.1 in 2005 Whitaker

Hospital records indicate a association between MMR vaccination and viral meningitis.

Specifically, the use of a certain live mumps vaccine, known as the Urabe strain,
has been linked to an increased risk of viral meningitis.

Instances of viral meningitis were identified in 10 children during their second
year of life.

Get a dataset with an event day (day of meningitis) and a day for exposure
(day of vaccination):

//sccs-studies.info/uploads/1/1/6/4/116436421/oxford.dta", clear"'

Case 3.1 in 2005 Whitaker continued

The observation period was from the 366th to the 730th day of age.

Evidence led to the definition of the risk period as the 15th to the 35th day
following the administration of the MMR vaccine.

Time groups were 366 to 547 (relative endpoint 182) days and 548 to 730
days (relative endpoint 365).

Generate the SCCS dataset and do the analysis using absolute time end points:

`". sccsdta eventday exday, enter(365) riskpoints(14 35) timepoints(547 730) absolutetimepoints nolog"'

or with relative time end points:

//sccs-studies.info/uploads/1/1/6/4/116436421/oxford.dta", clear"'

`". sccsdta eventday exday, enter(365) riskpoints(14 35) timepoints(182 365) nolog"'

. xtpoisson _nevents i._exgr i._tmgr, fe i(_rowid) exposure(_interval) irr nolog

Conditional fixed-effects Poisson regression Number of obs = 38
Group variable: _id Number of groups = 10

Obs per group:
min = 2
avg = 3.8
max = 4

Wald chi2(2) = 19.10
Log likelihood = -10.088277 Prob > chi2 = 0.0001

------------------------------------------------------------------------------
_nevents | IRR Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
_exgr |
]14; 35] | 12.037 8.528 3.51 0.00 3.002 48.259
|
_tmgr |
]182; 365] | 0.225 0.252 -1.33 0.18 0.025 2.016
ln(_inter~l) | 1.000 (exposure)
------------------------------------------------------------------------------

We estimate the incidence rate ratio of the risk period versus the no
risk period using a poisson regression and looking at the i._exgr estimate:

Compare the i._exgr estimate with the Stata output at page 11 in
2005 Whitaker.

Conclusion

The incidence rate in the risk period is around 12 times higher
than in the no-risk period.

Hence, there is a a association between MMR vaccination and viral meningitis.

Reproducing Table V in 2005 Whitaker:

//sccs-studies.info/uploads/1/1/6/4/116436421/itp.dta", clear"'

`". sccsdta eventday mmr, en(cutp1) ex(cutp2) r(-1 14 28 42) t(426(61)670) a nolog"'

Reproducing Table VII, analyses 1 in 2005 Whitaker:

//sccs-studies.info/uploads/1/1/6/4/116436421/intuss.dta", clear"'

`". sccsdta eventday agep3, en(cutp1) ex(cutp2) r(13 27 41) t(57(30)117 148(31)334) a nolog"'

Variables in the generated dataset

Created variables

_rowid A row id variable

_start Interval start value (not included in interval)

_stop Interval stop value (included in interval)

_nevents Number of events per individual in interval

_exgr Intervals marked by risk groups

_tmgr Intervals marked by time groups

_interval Interval width (the exposure)

Stored results

cmd The regression xtpoisson command.

References

2005 Whitaker - Tutorial in biostatistics; The self-controlled case series method

2016 Petersen - Self controlled case series methods; An alternative to standard epidemiological study designs

Authors and support

Author:

Niels Henrik Bruun,

Aalborg University Hospital

Support:

niels.henrik.bruun@gmail.com