|| Checking for direct PDF access through Ovid
The estimated effect of unemployment on depression may be biased by time-varying, intermediate, and time-constant confounding. One of the few methods that can account for these sources of bias is the parametric g-formula, but until now this method has required that all relevant confounders be measured.We combine the g-formula with methods to adjust for unmeasured time-constant confounding. We use this method to estimate how antidepressant purchasing is affected by a hypothetical intervention that provides employment to the unemployed. The analyses are based on an 11% random sample of the Finnish population who were 30–35 years of age in 1995 (n = 49,753) and followed until 2012. We compare estimates that adjust for measured baseline confounders and time-varying socioeconomic covariates (confounders and mediators) with estimates that also include individual-level fixed-effect intercepts.In the empirical data, around 10% of person-years are unemployed. Setting these person-years to employed, the g-formula without individual intercepts found a 5% (95% confidence interval [CI] = 2.5%, 7.4%) reduction in antidepressant purchasing at the population level. However, when also adjusting for individual intercepts, we find no association (−0.1%; 95% CI = −1.8%, 1.5%).The results indicate that the relationship between unemployment and antidepressants is confounded by residual time-constant confounding (selection). However, restrictions on the effective sample when using individual intercepts can compromise the validity of the results. Overall our approach highlights the potential importance of adjusting for unobserved time-constant confounding in epidemiologic studies and demonstrates one way that this can be done.