Self-Controlled Case Series Studies A Modelling Guide with R Chapman & Hall/CRC Biostatistics Series Shein-Chung Chow, Duke University of Medicine Byron Jones, Novartis Pharma AG Jen-pei Liu, National Taiwan University Karl E. Peace, Georgia Southern University Bruce W. Turnbull, Cornell University Recently Published Titles Repeated Measures Design with Generalized Linear Mixed Models for Randomized Controlled Trials Toshiro Tango Clinical Trial Data Analysis Using R and SAS, Second Edition Ding-Geng (Din) Chen, Karl E. Peace, Pinggao Zhang Clinical Trial Optimization Using R Alex Dmitrienko, Erik Pulkstenis Cluster Randomised Trials, Second Edition Richard J. Hayes, Lawrence H. Moulton Quantitative Methods for HIV/AIDS Research Cliburn Chan, Michael G. Hudgens, Shein-Chung Chow Sample Size Calculations in Clinical Research, Third Edition Shein-Chung Chow, Jun Shao, Hansheng Wang, Yuliya Lokhnygina Randomization, Masking, and Allocation Concealment Vance Berger Statistical Topics in Health Economics and Outcomes Research Demissie Alemayehu, Joseph C. Cappelleri, Birol Emir, Kelly H. Zou Medical Biostatistics, Fourth Edition Abhaya Indrayan, Rajeev Kumar Malhotra Applied Surrogate Endpoint Evaluation Methods with SAS and R Ariel Alonso, Theophile Bigirumurame, Tomasz Burzykowski, Marc Buyse, Geert Molenberghs, Leacky Muchene, Nolen Joy Perualila, Ziv Shkedy, Wim Van der Elst For more information about this series, please visit: https://www.crcpress.com/go/biostats Self-Controlled Case Series Studies A Modelling Guide with R By Paddy Farrington School of Mathematics and Statistics, The Open University, UK Heather Whitaker School of Mathematics and Statistics, The Open University, UK Yonas Ghebremichael Weldeselassie University of Warwick Medical School, UK CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2018 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Printed on acid-free paper Version Date: 20180406 International Standard Book Number-13: 978-1-4987-8159-6 (Hardback) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging-in-Publication Data Names: Farrington, Paddy, author. | Whitaker, Heather, author. | Ghebremichael Weldeselassie, Yonas, author. Title: Self-controlled case series studies : a modelling guide with R / Paddy Farrington, Heather Whitaker, Yonas Ghebremichael Weldeselassie. Description: Boca Raton, Florida : CRC Press, 2018. | Includes bibliographical references and index. Identifiers: LCCN 2018002262| ISBN 9781498781596 (hardback : alk. paper) | ISBN 9780429491313 (e-book) Subjects: LCSH: Medicine--Research--Methodology. | Clinical trials--Methodology. Classification: LCC R850 .F37 2018 | DDC 610.72/4--dc23 LC record available at https://lccn.loc.gov/2018002262 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com To Beckie, Dylan, Finlay, Isla, Benhur, HiabEl and Lulya Contents Note: Starred (*) sections may be skipped. Preface xiii 1 Introduction 1 1.1 Control and self-control in epidemiology . . . . . . . . . . . . 1 1.2 Self-controlled methods . . . . . . . . . . . . . . . . . . . . . 2 1.3 Guide to contents . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Computer package and data . . . . . . . . . . . . . . . . . . 4 2 Epidemiological overview 7 2.1 Genesis of the SCCS method . . . . . . . . . . . . . . . . . . 7 2.2 Rationale for the SCCS method . . . . . . . . . . . . . . . . 9 2.2.1 Case series . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.2 Self-control . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2.3 Data requirements . . . . . . . . . . . . . . . . . . . . 11 2.3 Some illustrations . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3.1 Using only cases . . . . . . . . . . . . . . . . . . . . . 13 2.3.2 Controlling confounding . . . . . . . . . . . . . . . . . 16 2.4 Assumptions and alternatives . . . . . . . . . . . . . . . . . . 18 2.4.1 Assumptions of the SCCS method . . . . . . . . . . . 18 2.4.2 What if the assumptions are not satisfied? . . . . . . . 19 2.5 Bibliographical notes and further material . . . . . . . . . . 20 3 The SCCS likelihood 21 3.1 Why start with the likelihood? . . . . . . . . . . . . . . . . . 21 3.2 Likelihood for the standard SCCS model . . . . . . . . . . . 22 3.3 Properties of the SCCS likelihood . . . . . . . . . . . . . . . 26 3.4 Example: MMR vaccine and aseptic meningitis . . . . . . . . 27 3.5 The general SCCS likelihood . . . . . . . . . . . . . . . . . . 32 3.6 MMR vaccine and aseptic meningitis: derivation of the SCCS likelihood . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.7 Assumptions of the SCCS method . . . . . . . . . . . . . . . 36 3.7.1 Assumption 1: Poisson or rare events . . . . . . . . . . 36 3.7.2 A counter-example: negative binomial events* . . . . . 37 3.7.3 Assumptions 2 and 3: validity of conditioning . . . . . 37 3.7.4 A more formal demonstration* . . . . . . . . . . . . . 39 vii viii Contents 3.7.5 Assumption 4: independent ascertainment . . . . . . . 40 3.8 Derivation of the SCCS likelihood* . . . . . . . . . . . . . . 41 3.9 Bibliographical notes and further material . . . . . . . . . . 45 4 The standard SCCS model 47 4.1 Proportional incidence models . . . . . . . . . . . . . . . . . 47 4.2 Fitting the standard SCCS model . . . . . . . . . . . . . . . 49 4.3 The R package SCCS: standard SCCS model . . . . . . . . . 51 4.3.1 A single point exposure: MMR vaccine and ITP . . . 51 4.3.2 Reshaping the MMR vaccine and ITP data . . . . . . 55 4.3.3 Extended exposures: antidepressants and hip fracture . . . . . . . . . . . . . . . . . . . . . . . . 57 4.4 Data formats for repeated exposures . . . . . . . . . . . . . . 59 4.4.1 Intermittent treatments: NSAIDs and GI bleeds . . . 60 4.4.2 Multiple vaccine doses: convulsions and DTP vaccine . . . . . . . . . . . . . . . . . . . . . . . 62 4.5 Multiple exposure types . . . . . . . . . . . . . . . . . . . . . 65 4.5.1 Exposures of several types: convulsions, Hib and MMR vaccines . . . . . . . . . . . . . . . . . . . . 66 4.5.2 Multiple exposures of several types: NSAIDs, antidepressants and GI bleeds . . . . . . . . . . . . . . 68 4.5.3 Multiple doses of different vaccines: convulsions, DTP and Hib vaccines . . . . . . . . . . . . . . . . . . 70 4.5.4 Overlapping risk periods: convulsions and DTP . . . . 73 4.6 Comparing models: likelihood ratio tests . . . . . . . . . . . 74 4.6.1 Comparing models: ITP and MMR vaccine . . . . . . 75 4.6.2 Combining multinomial categories* . . . . . . . . . . . 76 4.7 Interactions: effect modification and stratification . . . . . . 77 4.7.1 Interactions: sex, ITP and MMR vaccine. . . . . . . . 78 4.7.2 Interactions between exposures: GI bleeds, NSAIDs and antidepressants . . . . . . . . . . . . . . . . . . . 81 4.8 Indefinite and extremal risk periods . . . . . . . . . . . . . . 83 4.8.1 Curtailed observation: antidiabetics and fractures . . . 84 4.8.2 Indefinite risk periods: MMR vaccine and autism . . . 87 4.8.3 Initial risk periods: NRT and MI . . . . . . . . . . . . 90 4.9 SCCS analyses with temporal effects . . . . . . . . . . . . . . 92 4.9.1 Calendar time: GBS and influenza vaccine . . . . . . . 93 4.9.2 Seasonal SCCS model: OPV and intussusception . . . 95 4.10 Parameterisation of the standard SCCS model* . . . . . . . 100 4.11 Bibliographical notes and further material . . . . . . . . . . 101 5 Checking model assumptions 103 5.1 Rare disease assumption for non-recurrent events . . . . . . . 104 5.1.1 Evaluation of absolute risks: convulsions and stroke . . . . . . . . . . . . . . . . . . . . . . . . . 105 Contents ix 5.1.2 Quantifying the bias for non-recurrent events* . . . . 106 5.2 Poisson assumption for potentially recurrent events . . . . . 107 5.2.1 Investigating recurrences. . . . . . . . . . . . . . . . . 107 5.2.2 Recurrences for MMR and ITP data . . . . . . . . . . 109 5.2.3 Recurrent convulsions and MMR vaccine . . . . . . . 111 5.3 Event-dependent observation periods . . . . . . . . . . . . . 114 5.3.1 Investigating event-dependent observation periods . . 115 5.3.2 Planned and actual observation periods: NRT and MI . . . . . . . . . . . . . . . . . . . . . . . 117 5.3.3 Heavy censoring: antipsychotics and stroke . . . . . . 119 5.3.4 Censoring of observation periods* . . . . . . . . . . . 125 5.4 Event-dependent exposures . . . . . . . . . . . . . . . . . . . 127 5.4.1 Investigating event-dependent exposures . . . . . . . . 128 5.4.2 Event-dependence of exposures: ITP and MMR . . . . 130 5.4.3 Event-dependence with multiple exposures: NSAIDs, antidepressants and GI bleeds . . . . . . . . 134 5.4.4 Long-term dependence: influenza vaccine and GBS . . 137 5.4.5 Interpretation of pre-exposure risk period* . . . . . . 140 5.5 Modelling assumptions . . . . . . . . . . . . . . . . . . . . . 143 5.5.1 Checking the model . . . . . . . . . . . . . . . . . . . 143 5.5.2 Risk periods and age groups: MMR and convulsions . 144 5.5.3 Homogeneity of effect: MMR and convulsions . . . . . 147 5.6 Asymptotic assumptions . . . . . . . . . . . . . . . . . . . . 149 5.6.1 Permutation test for the aseptic meningitis data . . . 150 5.6.2 Permutation test for the ITP data . . . . . . . . . . . 151 5.7 Bibliographical notes and further material . . . . . . . . . . 154 6 Further SCCS models 157 6.1 Semiparametric SCCS model . . . . . . . . . . . . . . . . . . 157 6.1.1 Formulation of the semiparametric model . . . . . . . 158 6.1.2 Semiparametric model for the MMR and ITP data . . 160 6.1.3 Semiparametric model for the MMR and autism data . . . . . . . . . . . . . . . . . . . . . . . . 162 6.1.4 Further details of the semiparametric model* . . . . . 163 6.2 SCCS model with spline-based age effect . . . . . . . . . . . 166 6.2.1 Splines for the relative age effect . . . . . . . . . . . . 167 6.2.2 Spline model for age: MMR vaccine and ITP . . . . . 170 6.2.3 Spline model for age: antidepressants and hip fracture . . . . . . . . . . . . . . . . . . . . . . . . 173 6.2.4 Precision of estimators: MMR and autism . . . . . . . 176 6.2.5 Modelling with M-splines* . . . . . . . . . . . . . . . . 179 6.3 SCCS models with spline-based exposure effect . . . . . . . . 181 6.3.1 Splines for exposure effects . . . . . . . . . . . . . . . 182 6.3.2 Spline model for exposure: MMR and autism . . . . . 185