  In a real-life setting, little is known regarding the effectiveness of
statins for primary prevention among older adults, and analysis of
observational data can add crucial information on the benefits of actual
patterns of use. Latent class growth models (LCGM) are increasingly proposed as
a solution to summarize the observed longitudinal treatment in a few distinct
groups. When combined with standard approaches like Cox proportional hazards
models, LCGM can fail to control time-dependent confounding bias because of
time-varying covariates that have a double role of confounders and mediators.
We propose to use LCGM to classify individuals into a few latent classes based
on their medication adherence pattern, then choose a working marginal
structural model (MSM) that relates the outcome to these groups. The parameter
of interest is nonparametrically defined as the projection of the true MSM onto
the chosen working model. The combination of LCGM with MSM is a convenient way
to describe treatment adherence and can effectively control time-dependent
confounding. Simulation studies were used to illustrate our approach and
compare it with unadjusted, baseline covariates-adjusted, time-varying
covariates adjusted and inverse probability of trajectory groups weighting
adjusted models. We found that our proposed approach yielded estimators with
little or no bias.
