eventdepenexp | R Documentation |

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.

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

`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 ( |

`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 |

`expogrp` |
a vector of days to the start of exposure-related risk, counted from |

`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 |

`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 |

`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" |

`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 |

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

Relative incidence estimates along with their 95% confidence intervals.

Yonas Ghebremichael-Weldeselassie, Heather Whitaker, Paddy Farrington.

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.

`semisccs`

, `standardsccs`

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.