Background: The effectiveness of treatment for people with substance use disorders is usually examined
using longitudinal cohorts. In these studies, treatment is often considered as a time-varying exposure.
The aim of this commentary is to examine confounding in this context, when the confounding
variable is time-invariant and when it is time-varying.
Method: Types of confounding are described with examples and illustrated using path diagrams.
Simulations are used to demonstrate the direction of confounding bias and the extent that it is
accounted for using standard regression adjustment techniques.
Results: When the confounding variable is time invariant or time varying and not influenced by prior
treatment, then standard adjustment techniques are adequate to control for confounding bias, provided
that in the latter scenario the time-varying form of the variable is used. When the confounder is
time varying and affected by prior treatment status (i.e. it is a mediator of treatment), then standard
methods of adjustment result in inconsistency.
Conclusions: In longitudinal cohorts where treatment exposure is time varying, confounding is an issue
which should be considered, even if treatment exposure is initially randomized. In these studies, standard
methods of adjustment may result be inadequate, even when all confounders have been identified.
This occurs when the confounder is also a mediator of treatment. This is a likely scenario in many studies