eventdepenexp: SCCS with event-dependent exposure

eventdepenexpR Documentation

SCCS with event-dependent exposure

Description

One of the assumptions of the self-controlled case series model is that occurence of an event does not affect subsequent exposure. This function fits the modified SCCS model when the assumption is not satisfied, see Farrington et al (2009). This modified method assumes that no exposure is possible following a unique event. It requires that exposure is of a fixed finite length and that the end of observation that would have applied in the absence of the event is known.

Usage

eventdepenexp(indiv, astart, aend, aevent, adrug, aedrug, expogrp=0,
             sameexpopar=T,agegrp=NULL, dataformat="stack", verbose=F,
             tolerance=1e-8,itermax=100, data)

Arguments

indiv

a vector of individual identifiers of cases

astart

a vector of ages at which the observation periods start

aend

a vector of ages at end of observation periods, that would have applied in the absence of the event

aevent

a vector of ages at event (one event per case)

adrug

a vector of ages at which exposure starts or a matrix if there are multiple episodes of the same exposure type (dataformat multi). Multiple exposures of the same exposure type can be recorded as multiple rows (dataformat stack). In this method only one exposure type can be included unlike the standardsccs where multiple exposure types can be analayzed in the same model

aedrug

a vector of ages at which exposure-related risk ends or a matrix if there are multiple episodes of the same exposure type. The dimension of aedrug should be equal to the dimension of adrug, that is aedrug should be given for each column in adrug

expogrp

a vector of days to the start of exposure-related risk, counted from adrug. E.g if the risk period is [adrug+c,aedrug], use expogrp = list(c) or expogrp = c. The DEFAULT is a expogrp= 0 where the exposure-related risk period is [adrug, aedrug].

sameexpopar

a logical value. If TRUE (the default) no dose effect is assumed: the same exposure parameters are used for multiple doses/episodes of the same exposure type presented in dataformat 'multi'. If FALSE different relative incidences are estimated for different doses/episodes of the same exposure.

agegrp

a vector of cut points for the age groups where each value represents the start of an age catagory. The first element in the vector is the start of the second age group. The first age group starts at the minimum of astart, the start of observation period. The default is NULL (i.e no age effects included).

dataformat

the way the input data are assembled. It accepts "multi" or "stack" (the default), where "multi" refers to a data assembled with one row representing one event and "stack" refers to a data frame where repeated exposures of the same type are stacked in one column. In the "multi" dataformat different episodes of the same exposure type are recorded as separate columns in the dataframe.

verbose

a logical value indicating whether information about the iterations should be printed. Default is FALSE

tolerance

the convergence tolerance when estimating the parameters. Defaults to 1e-8.

itermax

maximum number of iterations. 100 is the default.

data

a data frame containing the input data. The data should be in 'stack' or 'multi' (see dataformat).

Details

This model fits a SCCS model with event-dependent exposures.

Value

Relative incidence estimates along with their 95% confidence intervals.

Author(s)

Yonas Ghebremichael-Weldeselassie, Heather Whitaker, Paddy Farrington.

References

Farrington, C. P., Whitaker H.J., and Hocine M.N. (2009). Case series analysis for censored, perturbed or curtailed post-event exposures. Biotatistics, 10(1), 3-16.

Farrington P., Whitaker H., and Ghebremichael-Weldeselassie Y. (2018). Self-controlled Case Series Studies: A modelling Guide with R. Boca Raton: Chapman & Hall/CRC Press.

See Also

semisccs, standardsccs

Examples

library(SCCS)

# Analysis of rotavirus vaccination and intussusception data
# Model 1: Three doses of the same vaccine exposure OPV (OPV, OPV2 and opv3), 
# only one risk period [adrug, aedrug]


   rot.mod1 <- eventdepenexp(indiv=case, astart=sta, aend=end,
                         aevent=intus, adrug=cbind(rv,rvd2), 
                         expogrp=1,aedrug=cbind(rv+21,rvd2+21), 
                         agegrp=seq(56,168,14), dataformat="multi", data=rotdat)

   rot.mod1

# Model 2: Two doses with two riks periods, 1-7 and 8-21 


   rot.mod2 <- eventdepenexp(indiv=case, astart=sta, aend=end,
                            aevent=intus, adrug=cbind(rv,rvd2),
                            aedrug=cbind(rv+21,rvd2+21), expogrp=c(1,8),
                            agegrp=seq(56,168,14), dataformat="multi", 
                            data=rotdat)   

   rot.mod2


SCCS documentation built on July 5, 2022, 5:05 p.m.