Analysis of time-stratified case-crossover studies in environmental epidemiology using Stata

The time-stratified case-crossover design is widely used in environmental epidemiology to analyze the short-term effects of environmental risk factors, such as air pollution or temperature, on human health. It compares the exposure level in the day when the health event occurs (case day) with the levels in control days chosen with alternative selection methods. Standard analytical approaches to case-crossover analysis, based on conditional logistic regression (the clogit command in Stata), require a considerable amount of data management. Here we introduce the gencco command to reshape datasets from time-series to time-stratified case-crossover designs. Then we will discuss alternative statistical models to perform case-crossover analysis for aggregated data using Poisson and overdispersed Poisson regression (poisson and glm) and conditional Poisson regression (xtpoisson). Furthermore, we also introduce an updated command for conditional Poisson to allow for overdispersion (xtpoisson_addOD). Examples will be given using air pollution and mortality datasets, although these methods can be applicable generally in other contexts.