Skip to main content
American Journal of Epidemiology logoLink to American Journal of Epidemiology
. 2023 Apr 21;192(10):1701–1711. doi: 10.1093/aje/kwad104

Bias Due to Within-Subject Exposure Dependency With or Without Bias Due to Lack of Pairwise Exchangeability When Exposure Is Chronic in Case-Crossover and Case–Time-Control Studies: A Simulation Study

Kiyoshi Kubota , Thu-Lan Kelly
PMCID: PMC10558192  PMID: 37083936

Abstract

The case-crossover study design has been proposed as a suitable design for use when a brief exposure causes a transient change in risk of an acute-onset disease. In pharmacoepidemiology, the condition of “brief exposure” is rarely satisfied because medication use is often chronic or successive, which may result in bias due to within-subject exposure dependency. Here we describe a simulation of a case-crossover study conducted within a cohort, where patients successively used a drug for 60 or more days and the rate ratio for the outcome occurrence was 4.0. Standard conditional logistic regression for the analysis produced overestimated odds ratios ranging up to 7.8. This bias due to within-subject exposure dependency from chronic use can be removed by the Mantel-Haenszel method or by our recently proposed weighting method. We also show that when some patients are censored after switching to another drug, a lack of pairwise exchangeability causes bias which is similar to bias due to an exposure time trend. This bias can be removed by using the case–time-control study design. We show that bias due to within-subject exposure dependency and lack of pairwise exchangeability occur independently and can occur separately or simultaneously, and we demonstrate how to detect and remove them.

Keywords: bias, case-crossover studies, case–time-control studies, self-controlled studies

Abbreviations

CI

confidence interval

OR

odds ratio

RR

rate ratio

The case-crossover study design is a case-only design which exclusively uses data from subjects who have experienced an outcome of interest. It was originally proposed as a design suitable for instances where a brief or intermittent exposure causes a transient change in risk of a rare acute-onset disease (1, 2). The original unidirectional case-crossover study included discordant cases who had both exposed and unexposed periods at and before the outcome occurrence and did not require data collected after the outcome. This is an advantage where the outcome affects the future exposure probability or future observation periods, which is difficult to manage using other case-only designs, including self-controlled case series (3, 4). For example, an occurrence of an adverse reaction to a medication may affect future use of the drug. On the other hand, the requirement of brief exposure is rarely satisfied in some fields like pharmacoepidemiology (5, 6), where medication use is often chronic or successive and exposure is not independent between periods. In 2001, Vines and Farrington (7) indicated that analysis using standard conditional logistic regression may lead to biased results in case-crossover studies when within-subject exposure dependency or autocorrelation exists even when the exposure time trends do not. Recently, we proposed a novel weighting method (8) by extending the findings of Vines and Farrington and modifying the likelihood presented by Greenland (9). Our weighting method for removing bias due to within-subject exposure dependency can be used with or without a time-varying confounder (8).

One of other biases in case-crossover studies is due to exposure time trends associated with the increase or decrease of the proportion exposed in the population, which can be removed using the case–time-control method (10). Recently, Bykov et al. (11) indicated that persistent user bias due to persistent users is also removed by the case–time-control approach.

The case-crossover analysis involving chronic drug use has often yielded complicated results that are difficult to explain. For example, Delaney and Suissa (12) used a case-crossover design to investigate the association between warfarin use and bleeding to show how the case-crossover design in pharmacoepidemiology is vulnerable to design parameters. When exposure was defined as daily use within the previous month, there was no association and the rate ratio (RR) was 0.98 (95% confidence interval (CI): 0.74, 1.28), but when subjects were stratified by the intermittency of warfarin therapy, the RR was 2.59 (95% CI: 1.42, 4.74) in a stratum of transient exposure, defined as 1–3 prescriptions in the previous year (12). When the exposure time window was increased to 1 year, the RR was 3.57 (95% CI: 2.22, 5.05), which was reduced by the case–time-control study design to 1.72 (95% CI: 1.08, 2.43). The authors highlighted that “the design is… highly sensitive to assumptions about intermittency of drug use and the length of the exposure time window” (12, p. 53).

To contextualize the problems encountered in the real-world data associated with chronic medication use, we have conducted a simulation study by which bias due to within-subject exposure dependency and exposure time trends can be addressed separately from biases due to a change in patients’ susceptibility to the outcome occurrence, or other changes in the drug effect (e.g., tolerance development) associated with chronic use of a drug. In our current simulation study, we show that bias due to within-subject exposure dependency associated with chronic or successive exposure can be removed by means of the Mantel-Haenszel method or our recently proposed weighting method. We also show that bias takes place when a proportion of patients are censored due to switching to another drug, and this bias can be removed by the case–time-control method (see the Web Appendix and Web Figures 1–3, available at https://doi.org/10.1093/aje/kwad104, for illustrative examples of those biases).

By using the approach illustrated in this study, the requirement of brief exposure may be relaxed and the case-crossover study design may be used reliably, together with the case–time-control approach when needed, even if the exposure is chronic or successive.

METHODS

Data

We simulated data for a cohort study in which 1 period was 1 day and exposure to a drug occurred successively (Figure 1). We assumed that the effect of a drug was acute and disappeared completely 24 hours after a patient took the drug once daily. After a preexposure (washout) period of 60 or more days when patients did not use the drug and did not have an outcome of interest, we assumed that 60 patients started a drug of interest and entered the cohort every day and that all patients continued to use the drug for at least 60 successive days. To simplify scenarios, we subdivided the 60 patients into 3 groups (groups A, B, and C) who used the drug for 180, 120, and 60 successive days, respectively. After the end of the exposure period, some patients stopped using the drug and were followed until the end of a 60-day postexposure (unexposed) period, while the other patients switched to another drug and were censored immediately after the exposure period ended. In the context of the cohort study, patients who were followed until the 60-day postexposure period had exposed periods followed by unexposed periods, while patients who were censored after switching to another drug had exposed periods only.

Figure 1.

Figure 1

Design diagrams for a simulation of case-crossover studies conducted within a cohort. A) Distribution of 60 patients who start using a medication and enter a cohort study every day after 60 days of the unexposed period. Of the 60 patients, groups A, B, and C (n = 20 each) use the drug for 180, 120, and 60 days, respectively. After the exposed period ends, 20 (1 − Pc) patients become unexposed, while 20 Pc patients switch to another drug and are censored, where Pc represents the proportion of censored patients. B) Case-crossover studies conducted within the cohort study, where C0 denotes the case period and C1, C2, …, CM denote control periods and M is the number of control periods. C) Distribution of 3 patients (patients A, B, and C) who had an outcome while followed in the cohort study and were included in the case-crossover study with 1 case period and 5 control periods. Patient A, who had an outcome during the first 60-day exposed period, had the discordant exposure pattern and was included in the case-crossover analysis; patient B, who had an outcome after the first 60 days of the exposed period, had the concordant exposure pattern (always exposed) and was excluded from the analysis; and patient C, who had an outcome during the 60-day postexposure period, had the discordant exposure pattern and was included in the analysis.

In scenarios 1 and 2, we assumed that the rate of occurrence of the outcome was 0.00005 events per day (0.018 per year) during the unexposed postexposure period and that the rate was 0.0002 events per day (0.073 per year) during the exposure period, so that the RR was 4.0. As a reference, in scenarios 3 and 4, we also generated data for a scenario in which the rate was 0.00005 per day during the exposed period (i.e., RR = 1.0). We simulated data for scenarios where 0% (scenarios 1 and 3) and 30% (scenarios 2 and 4) of patients were censored after switching. We also simulated extra scenarios in which the incidence rates were one tenth (0.000005 per day) and one hundredth (0.0000005 per day), but we do not report the results because the conclusion was the same as in the current study.

We conducted case-crossover and case–time-control studies by selecting subjects from the cohort study. Cases for a unidirectional case-crossover study were identified during a study period of 200 days when a steady state was attained in the cohort—that is, when the size of the population and the proportion of those exposed did not change even if some patients entered and left the cohort every day (see Web Figure 4). If a patient had 2 or more outcome occurrences, only the first occurrence was included in the case-crossover analysis. The time window for the case-crossover study was 61 days in and before the case period, and all time periods were 1 day. The number of control periods (M) was set as 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60. When M = 1, a control period was 60 days prior to the case period; when M = 2, two control periods were 30 and 60 days prior to the case period. In general, M control periods were 60/M, 2 × 60/M, …, M × 60/M days before the case period (see Figure 1B). We selected patients with a discordant exposure pattern because only those patients contributed to a case-crossover analysis (see patient A or patient C in Figure 1C). Cases who had the outcome during the exposure period but after the first 60 days with a concordant exposure pattern were excluded (see patient B in Figure 1C). Patients who had the outcome after switching to another drug were not identified as cases and not included in the analysis because they were censored before the outcome occurred.

In the case–time-control study, risk set sampling was used to select 1 control subject (designated the “time-control” by Greenland (9)) per case. A time-control was randomly selected with replacement from those who were at risk of becoming a case and had a discordant exposure pattern during the selected time period. As a sensitivity analysis, we also randomly selected time-controls irrespective of whether they had a discordant or concordant exposure pattern.

Analyses

We estimated odds ratios (ORs) via 3 methods: standard conditional logistic regression (ORSCL), the Mantel-Haenszel method (ORMH), and our weighting method (modified Greenland’s likelihood) ORG (8). The following likelihood was used to estimate ORG and ORSCL:

graphic file with name DmEquation1.gif (1)

where N is the total number of cases and time-controls, d = 1 for cases while d = 0 for time-controls, and Inline graphic and Inline graphic are the status of the exposure (and time-varying confounder) and weight for the jth period (j = 0 for a case period and j = 1, 2, …, M for M control periods) in patient i, respectively. The weight Inline graphic is set to 1 to estimate ORSCL. To estimate ORG, we first define Inline graphic and Inline graphic as the number of exposed periods and the number of unexposed periods (including both case and control periods) of patient i, respectively (Inline graphic). Then the weight Inline graphic with which to estimate ORG is defined as Inline graphic when Inline graphic and Inline graphic when Inline graphic. The quantity Inline graphic is estimated as in the previous study (8) as follows:

graphic file with name DmEquation2.gif (2)

In equation 2, PT represents the patient-time and Inline graphic is the number of unexposed control periods for subject i who is a case or time-control with the exposed case period; Inline graphic is the number of exposed control periods for subject i with the unexposed case period; Inline graphic and Inline graphic are the numbers of cases and time-controls with an unexposed case period and at least 1 exposed control period, respectively; and Inline graphic and Inline graphic are the numbers of cases and time-controls with an exposed case period and at least 1 unexposed control period, respectively (see Web Figure 5 for estimation of weights).

Pairwise exchangeability is the relationship Inline graphic, where Inline graphic is the exposure status in the case period and Inline graphic is the exposure status in the mth control period preceding the case period (when Inline graphic) in patient i (7). When pairwise exchangeability holds for all values of m (m = 1, 2, …, M), the estimate of Inline graphic is equal to 1 and an Inline graphic that is not equal to 1 indicates the presence of bias due to lack of pairwise exchangeability.

In a case-crossover study with no time-controls, Inline graphic in equation 1 is replaced by Inline graphic; Inline graphic and Inline graphic in equation 2 are 0; and the numbers of exposed and unexposed periods are calculated from the cases only.

In the case–time-control approach, the OR from the Mantel-Haenszel method, ORMH, is estimated as ORMH = ORMH_case/ORMH_tc, where ORMH_case is estimated from cases and ORMH_tc is estimated from time-controls.

Estimates and 95% CIs for ORSCL, ORMH, and ORG were calculated from the mean and standard deviation of the logarithm of estimates from each of 1,000 iterations of the simulation. SAS, version 9.4 (SAS Institute, Inc., Cary, North Carolina), was used for all analyses.

RESULTS

Figures and tables presenting the results are listed in Web Table 1. Figure 2 shows ORSCL, ORMH, and ORG for selected values of M; Web Table 2 shows those estimates for all values of M for scenario 1, where RR = 4 and no patients were censored due to switching to another drug (Figures 2A and 2B), and for scenario 2, where RR = 4 and 30% of patients were censored (Figures 2C and 2D). When no patients were censored, ORSCL for the case-crossover study was not biased when M = 1, but it increased to 7.8 when M = 60. In contrast, ORMH and ORG were unbiased irrespective of the value of M (Figure 2A). With the case–time-control approach, ORSCL, ORMH, and ORG were essentially the same as those in the case-crossover study (Figure 2B). When RR = 4 and 30% of patients were censored, ORSCL, ORMH, and ORG were overestimated as 5.9 when M = 1 in the case-crossover study. ORSCL increased further to 12.7 when M = 60, while ORMH and ORG were stable but remained overestimated as 5.9 (Figure 2C). With the case–time-control design, ORSCL was unbiased when M = 1 but increased when M increased, while ORMH and ORG were unbiased (Figure 2D). In the case–time-control studies where time-controls were selected irrespective of whether they had a discordant or concordant exposure pattern, the point estimates of the ORs were the same as those in Figures 2B and 2D, but the 95% CIs were wider because time-controls with a concordant exposure pattern were excluded from the analysis (data not shown).

Figure 2.

Figure 2

Odds ratios (ORs; points) and 95% confidence intervals (CIs; bars) estimated in case-crossover and case–time-control studies in scenarios 1 and 2 (true rate ratio = 4). ORs estimated by standard conditional logistic regression (SCL; ■), by the Mantel-Haenszel method (MH; ▲), and by the weighting method (weighting; Inline graphic) are shown for M = 1, 2, 5, 10, 30, and 60 control periods. Panels A and B show ORs estimated in case-crossover studies (A) and case–time-control studies (B) for scenario 1, where no patients are censored at the end of the exposed period. Panels C and D show ORs estimated in case-crossover studies (C) and case–time-control studies (D) for scenario 2, where 30% of patients are censored.

Figure 3 shows ORSCL, ORMH, and ORG for scenario 3, where RR = 1 and no patient was censored (Figures 3A and 3B), and for scenario 4, where RR = 1 and 30% of patients were censored (Figures 3C and 3D). In scenario 3, where no patients were censored, ORSCL, ORMH, and ORG were all unbiased in the case-crossover study, even when M varied and did not change when the case–time-control design was used (Figures 3A and 3B). In scenario 4, where RR = 1 and 30% of patients were censored, in the case-crossover study ORSCL, ORMH, and ORG were all equal to 1.4 when M = 1. ORSCL increased slightly to 1.7 when M = 60, but ORMH and ORG were stable at approximately 1.4 (Figure 3C). With the case–time-control approach, ORSCL, ORMH, and ORG were all unbiased (Figure 3D).

Figure 3.

Figure 3

Odds ratios (ORs; points) and 95% confidence intervals (CIs; bars) estimated in case-crossover and case–time-control studies in scenarios 3 and 4 (true rate ratio  = 1). ORs estimated by standard conditional logistic regression (SCL; ■), by the Mantel-Haenszel method (MH; ▲), and by the weighting method (weighting; Inline graphic) are shown for M = 1, 2, 5, 10, 30, and 60 control periods. Panels A and B show ORs estimated in case-crossover studies (A) and case–time-control studies (B) for scenario 3, where no patients are censored at the end of the exposed period. Panels C and D show ORs estimated in case-crossover studies (C) and case–time-control studies (D) for scenario 4, where 30% of patients are censored.

As shown in Web Tables 2–5, in the case–time-control studies, ORSCL and ORG for time-controls were approximately 1.0 when there was no censoring (scenario 1 in Web Table 2 and scenario 3 in Web Table 4) but were larger than 1.5 with 30% censoring (scenario 2 in Web Table 3 and scenario 4 in Web Table 5). This indicates that pairwise exchangeability holds when there is no censoring but does not hold with censoring.

Table 1 shows the biases due to 1) within-subject exposure dependency and 2) lack of pairwise exchangeability and how the measures against these biases work. When both biases do not exist, ORSCL is unbiased (Table 1, rows A and E). When bias due to lack of pairwise exchangeability does not exist but bias due to within-subject exposure dependency exists, ORSCL is overestimated when RR = 4, but the Mantel-Haenszel method or weighting method removes bias while the case–time-control approach does not (Table 1, row B). This bias does not occur when RR = 1 (Table 1, row F). When bias due to lack of pairwise exchangeability exists but bias due to within-subject exposure dependency does not, ORSCL is overestimated irrespective of RR = 4 or RR = 1, and this bias can be removed using the case–time-control approach but not by the Mantel-Haenszel method or the weighting method (Table 1, rows C and G). If 2 types of biases occur at the same time, the simultaneous use of the Mantel-Haenszel or weighting method and the case–time-control approach removes bias, but using only 1 of these 2 remedies does not when RR = 4 (Table 1, row D). However, when RR = 1, the use of the case–time-control approach is enough to remove bias (Table 1, row H).

Table 1.

Values of Log(OR/RR) Needed to Indicate the Magnitude of the Bias of the OR Classified by the True RR, Bias Due to Lack of Pairwise Exchangeability, and Bias Due to Within-Subject Exposure Dependency in Case-Crossover and Case–Time-Control Studies

Case-Crossover Study Case–Time-Control Study
Scenario
Example Bias Due to Lack of Pairwise Exchangeability Bias Due to Within-Subject Exposure Dependency OR SCL a OR MH b OR G c OR SCL OR MH OR G
Scenario 1
A RR = 4.0, no censoring, and M = 1d No No 0.032 0.032 0.032 0.004 0.004 0.004
B RR = 4.0, no censoring, and M = 60 No Yes 0.672e 0.044 0.044 0.629e 0.015 0.004
Scenario 2
C RR = 4.0, 30% censoring, and M = 1 Yes No 0.390e 0.390e 0.390e 0.006 0.006 0.006
D RR = 4.0, 30% censoring, and M = 60 Yes Yes 1.159e 0.396e 0.396e 0.579e 0.002 0.005
Scenario 3
E RR = 1.0, no censoring, and M = 1 No No 0.013 0.013 0.013 0.000 0.000 0.000
F RR = 1.0, no censoring, and M = 60 No Yes 0.026 0.019 0.019 0.010 0.008 0.000
Scenario 4
G RR = 1.0, 30% censoring, and M = 1 Yes No 0.369e 0.369e 0.369e −0.015 −0.015 −0.015
H RR = 1.0, 30% censoring, and M = 60 Yes Yes 0.540e 0.368e 0.368e −0.029 −0.022 −0.015

Abbreviations: OR, odds ratio; RR, rate ratio.

a OR estimated by standard conditional logistic regression.

b OR estimated by the Mantel-Haenszel method.

c OR estimated by our weighting method (modified Greenland’s likelihood) (8).

d M represents the number of control periods.

e The absolute value was more than 0.05 (about 5% difference from the true value). Log(OR/RR) ≤0.05 indicates minor bias, while log(OR/RR) >0.05 indicates major bias.

 

While both the weighting and Mantel-Haenszel methods can reduce bias due to within-subject exposure dependency, the weighting method has an advantage when there is a time-varying confounder, which can be included as a covariate in the conditional regression model (8). In the Mantel-Haenszel method, the binary time-varying confounder is used as a stratification variable as described in the original proposal of the case-crossover study by Maclure (1). To estimate ORMH, cases are excluded if the status of the time-varying confounder in all control periods is different from the case period. Otherwise, cases are not excluded, but only control periods with the same status of a time-varying confounder as the case period are used in estimating ORMH.

Similarly to the previous scenarios 1–4, we simulated data where the incidence rate = 0.00005 events per day when unexposed and without confounding and RR = 4.0. We included a binary time-varying confounder z, with rate ratio RRz = 2.0. We assumed that the proportion of the time-varying confounder was 0.2 during unexposed periods (f0) and 0.4 during exposed periods (f1), and that in any period the time-varying confounder was independent of the exposure and time-varying confounder in different periods. Censoring after switching to another drug was 0% and 30% (scenarios 5 and 6, respectively). We also simulated data where RR = 1.0, RRz = 2.0, and 0% and 30% of patients were censored after switching (scenarios 7 and 8, respectively).

Simulation results are shown in Web Figures 6 and 7 and Web Tables 6–9. The estimates for the time-varying confounder were unbiased (OR = 2.0), and the OR for the time-varying confounder in time-controls was always 1.0 for scenarios 5–8. Regarding the ORs for exposure, the existence of biases and the effects of the methods for removing them (such as the Mantel-Haenszel method, the weighting method, or the case–time-control approach) were essentially the same as in the scenarios without the time-varying confounder, although the magnitude of the bias differed: For example, when RR = 4 and there was no censoring, ORSCL = 7.8 without the time-varying confounder (scenario 1, Figure 2A, and Web Table 1) but ORSCL = 8.3 with the time-varying confounder (scenario 5, Web Table 5). Likewise, ORMH and ORG were generally close to each other. However, ORG was more precise and stable than ORMH because all case and control periods were used to estimate ORG, while for estimation of ORMH some cases and control periods were excluded.

As Table 2 shows, when a time-varying confounder did not exist, when RR = 4, when M = 1, and when no censoring occurred (scenario 1; Table 2, rows A–D), all cases were included in the analysis; while when a time-varying confounder existed, when RR = 4, when M = 1, and when no censoring occurred (scenario 5; Table 2, row E), more than half of the cases were excluded from the analysis of ORMH and the 95% CI was wider in comparison with ORG. Although most cases were used to estimate ORMH when M was 10 or more in scenario 5 (Table 2, rows G and H), the estimate of ORMH tended to be unstable in comparison with ORG even when M was large, probably because some of the control periods were excluded when ORMH was estimated.

Table 2.

Odds Ratios and 95% Confidence Intervals Estimated Using the Case–Time-Control Method for Exposure With or Without a Binary Time-Varying Confounder by the Mantel-Haenszel Method and the Weighting Method

Mantel-Haenszel Method Weighting Method
Excluded Cases Included Cases
Scenario
No. of Control
Periods (M)
OR MH a 95% CI No. of Cases c Row % No. of Cases c Row % Total No.
of Cases
OR G b 95% CI
Scenario 1d
 A 1 4.13 2.80, 6.10 0 0 177,625 100.0 177,625 4.13 2.80, 6.10
 B 2 4.16 2.76, 6.26 0 0 177,625 100.0 177,625 4.16 2.76, 6.26
 C 10 4.17 2.69, 6.47 0 0 177,625 100.0 177,625 4.17 2.69, 6.47
 D 60 4.18 2.67, 6.54 0 0 177,625 100.0 177,625 4.18 2.67, 6.54
Scenario 5e
 E 1 4.20 2.63, 6.70 128,152 53.0 113,616 47.0 241,768 4.18 2.92, 5.99
 F 2 4.12 2.65, 6.40 78,240 32.4 163,528 67.6 241,768 4.17 2.85, 6.11
 G 10 4.18 2.77, 6.33 5,051 2.1 236,716 97.9 241,768 4.17 2.78, 6.26
 H 60 4.35 2.87, 6.59 0 0 241,768 100.0 241,768 4.17 2.75, 6.32

Abbreviations: CI, confidence interval; OR, odds ratio.

a OR estimated by the Mantel-Haenszel method.

b OR estimated by our weighting method (modified Greenland’s likelihood) (8).

c Total number of cases generated by 1,000 iterations.

d Scenario 1 without a binary time-varying confounder where the true rate ratio = 4.0.

e Scenario 5 with a binary time-varying confounder where the true rate ratio = 4.0. Note that the 95% CI is wider and the precision of the OR is lower in the Mantel-Haenszel method than in the weighting method when a time-varying confounder exists in scenario 5.

DISCUSSION

In our study, we simulated data assuming that a patient was exposed to a medication every day for a period of 60 or more days, analyzing the data using the case-crossover and case–time-control approaches. In the case-crossover study, when no patients were censored after switching to another drug, ORSCL was biased except when M = 1 or RR = 1, while ORMH and ORG were unbiased. Those results are compatible with the findings of Vines and Farrington (7) that when pairwise exchangeability holds, ORMH is unbiased, and ORSCL is unbiased when M = 1 or RR = 1 even if within-subject exposure dependency exists.

We found that ORSCL is biased due to within-subject dependency when RR = 4 and M > 1. This bias cannot be removed by the case–time-control approach and requires the use of the Mantel-Haenszel method or the weighting method.

On the other hand, bias due to censoring occurs in all estimation methods even if RR = 1 or M = 1. Bias due to lack of pairwise exchangeability can occur for at least 3 reasons (exposure time trends, persistent users, and censoring). When there are positive exposure time trends, the probability of the (unexposed, exposed) pattern is higher than the probability of the (exposed, unexposed) pattern (13). Persistent users who do not stop taking the drug once they start it have the (unexposed, exposed) pattern only even if a steady state is attained in the population, and persistent user bias may be classified as bias due to lack of pairwise exchangeability which can be removed by the case–time-control method (11). In our simulation, when no patients were censored, pairwise exchangeability held, but when a proportion of patients were censored after switching, the probability of the (unexposed, exposed) pattern was higher than the probability of the (exposed, unexposed) pattern, indicating that pairwise exchangeability did not hold even if a steady state was attained. The results indicated that the case–time-control method removed bias due to censoring. Thus, it is likely that the case–time-control approach removes bias due to lack of pairwise exchangeability in general.

In our simulation study, the time-varying confounder was independent between periods, and estimates of the time-varying confounder in the case-crossover study that were obtained via standard conditional logistic regression (ORSCL) were unbiased (OR = 2.0) even when M varied. Similarly, ORs for the time-varying confounder of time-controls (Inline graphic) were estimated as 1.0 in scenarios 5–8, indicating that pairwise exchangeability held for the confounder. Thus, the behavior of ORSCL for the time-varying confounder in the current study is compatible with our previous findings (8).

Case-crossover studies can suffer from 2 types of biases associated with the analysis method. Bias due to within-subject exposure dependency can be removed with the Mantel-Haenszel method or our weighting method. Bias due to a lack of pairwise exchangeability (from exposure time trends, persistent users, or censoring due to switching) can be removed by using a case–time-control design. When both types of biases exist and RR ≠ 1, use of both the case–time-control design and either the Mantel-Haenszel method or the weighting method is required. Though the use of 1 control period (M = 1) can help avoid bias due to within-subject exposure dependency, this usually comes with a price of reduced precision. Unlike our simulation study, in which all patients were exposed and unexposed for at least 60 days even when M varied, in real-world data on chronic medication use, some patients may use the drug for a short period only or may restart the drug soon after the exposure ends, and some cases will have the concordant exposure pattern; in these situations, using M = 1 will lead to reduced precision. For example, in a case-crossover study on the tricyclic antidepressants–hip fracture association with 1 control period, the OR of 1.18 (95% CI: 0.91, 1.52) was increased to 1.54 (95% CI: 1.28, 1.86) when an earlier control period was used (14, 15).

To test whether within-subject exposure dependency exists in the real-world studies, ORSCL and ORMH can be compared, and if the discrepancy is larger than a prespecified level (e.g., 5% or 10% of ORMH), standard conditional logistic regression should not be used (8). The use of a specific length of exposure time window may potentially avoid within-subject exposure dependency and reduce bias from standard conditional logistic regression. The comparison between ORSCL and ORMH may also be useful for selecting the length of the exposure time window that is least biased. However, the primary purpose in choosing the length of one period and any washout periods between them should be to not misclassify the exposure status in each period in terms of the duration of pharmacological effect, rather than to reduce within-subject dependency. In our previous study, we indicated that pairwise exchangeability can be tested by examining whether the proportion of exposed subjects in the population is constant over the study period (8). However, pairwise exchangeability may not hold even when the exposure is stationary over the study period (e.g., due to censoring as in our simulation or persistent users). In these scenarios, a better way to test pairwise exchangeability is to examine whether ORMH is close to 1 in control subjects randomly selected from the population, such as time-controls.

In our simulation, ORMH and ORG for the exposure were similar with or without a time-varying confounder. However, the weighting method may have some advantages when a time-varying confounder exists. For example, ORG was more stable and its 95% CI was narrower compared with ORMH, as shown in Table 2.

One limitation of the current study is that the time-varying confounder was assumed to be independent of the exposure and time-varying confounder in different periods. Future studies are warranted to examine how to remove bias when one or more time-varying confounders (e.g., a concomitant drug) have within-subject dependency.

Our study suggests that the requirement of brief exposure as a condition for the use of the case-crossover design may be relaxed and that the case-crossover design may be reliably used for chronic or successive exposure using the Mantel-Haenszel or weighting method, in conjunction with the use of the case–time-control approach when needed.

In conclusion, we have described how the weighting method, with a case–time-control design if needed, can remove biases due to within-subject exposure dependency and lack of pairwise exchangeability caused by switching to another drug or by other factors.

Supplementary Material

Web_Material_kwad104

ACKNOWLEDGMENTS

Author affiliations: NPO Drug Safety Research Unit Japan, Tokyo, Japan (Kiyoshi Kubota); and Quality Use of Medicines Pharmacy Research Centre, Clinical and Health Sciences, University of South Australia, Adelaide, South Australia, Australia (Thu-Lan Kelly).

This work was supported by the Australian National Health and Medical Research Council (grant GNT1157506).

The data set used in this study is available from the corresponding author. SAS and R software code for weighted conditional logistic regression for case-crossover and case–time-control studies with binary exposures can be found at https://github.com/lan-k/Casecrossover. SAS code for the simulation study is available at https://github.com/lan-k/Casecrossover/blob/main/SAS%20Code/switching%20simulation%20study%20code.sas.

This work was presented at the 38th International Conference of Pharmacoepidemiology and Therapeutic Risk Management, Copenhagen, Denmark, August 24–28, 2022.

Conflict of interest: none declared.

REFERENCES

  • 1. Maclure M. The case-crossover design: a method for studying transient effects on the risk of acute events. Am J Epidemiol. 1991;133(2):144–153. [DOI] [PubMed] [Google Scholar]
  • 2. Mittleman MA, Maclure M, Tofler GH, et al. Triggering of acute myocardial infarction by heavy physical exertion: protection against triggering by regular exertion. N Engl J Med. 1993;329(23):1677–1683. [DOI] [PubMed] [Google Scholar]
  • 3. Farrington CP, Whitaker HJ, Hocine MN. Case series analysis for censored, perturbed, or curtailed post-event exposures. Biostatistics. 2009;10(1):3–16. [DOI] [PubMed] [Google Scholar]
  • 4. Farrington CP, Anaya-Izquierdo K, Whitaker HJ, et al. Self-controlled case series analysis with event-dependent observation periods. J Am Stat Assoc. 2011;106(494):417–426. [Google Scholar]
  • 5. Consiglio GP, Burden AM, Maclure M, et al. Case-crossover study design in pharmacoepidemiology: systematic review and recommendations. Pharmacoepidemiol Drug Saf. 2013;22(11):1146–1153. [DOI] [PubMed] [Google Scholar]
  • 6. Nordmann S, Biard L, Ravaud P, et al. Case-only designs in pharmacoepidemiology: a systematic review. PLoS One. 2012;7(11):e49444. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Vines SK, Farrington CP. Within-subject exposure dependency in case-crossover studies. Stat Med. 2001;20(20):3039–3049. [DOI] [PubMed] [Google Scholar]
  • 8. Kubota K, Kelly TL, Sato T, et al. A novel weighting method to remove bias from within-subject exposure dependency in case-crossover studies. BMC Med Res Methodol. 2021;21(1):214. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Greenland S. A unified approach to the analysis of case-distribution (case-only) studies. Stat Med. 1999;18(1):1–15. [DOI] [PubMed] [Google Scholar]
  • 10. Suissa S. The case-time-control design. Epidemiology. 1995;6(3):248–253. [DOI] [PubMed] [Google Scholar]
  • 11. Bykov K, Wang SV, Hallas J, et al. Bias in case-crossover studies of medications due to persistent use: a simulation study. Pharmacoepidemiol Drug Saf. 2020;29(9):1079–1085. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Delaney JA, Suissa S. The case-crossover study design in pharmacoepidemiology. Stat Methods Med Res. 2009;18(1):53–65. [DOI] [PubMed] [Google Scholar]
  • 13. Wang SV, Schneeseiss S, Maclure M, et al. “First-wave” bias when conducting active safety monitoring of newly marketed medications with outcome-indexed self-controlled designs. Am J Epidemiol. 2014;180(6):636–644. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Leach MJ, Pratt NL, Roughead EE. Psychoactive medicine use and the risk of hip fracture in older people: a case-crossover study. Pharmacoepidemiol Drug Saf. 2015;24(6):576–582. [DOI] [PubMed] [Google Scholar]
  • 15. Leach MJ, Roughead EE, Pratt NL. A data visualisation method for assessing exposure misclassification in case-crossover studies: the example of tricyclic antidepressants and the risk of hip fracture in older people. BMC Med Res Methodol. 2021;21(1):43. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Web_Material_kwad104

Articles from American Journal of Epidemiology are provided here courtesy of Oxford University Press

RESOURCES