1 Introduction

In behavioral research, intensive longitudinal data are ideal for understanding the dynamic processes of behavior change over time. Such data are especially useful for understanding constructs that change on a daily or within-day basis, such as motivation and self-efficacy for reducing drinking. Until relatively recently, such intensive data collection methods, referred to broadly as ecological momentary assessment (EMA), were too onerous to implement widely (Shiffman et al. 2008); however, advances in technology over the past two decades have allowed for the creation of inexpensive, efficient, and accurate real-time data collection methods (Morgenstern et al. 2014). These technological innovations have caused the proliferation of EMA across studies and behaviors (e.g., Carney et al. 2000; Jahnel et al. 2018; Kelly and Stephen 2016; Tennen et al. 2000; Todd et al. 2005), advancing the state of the science of behavioral research in cutting-edge ways, such as leading to the design and implementation of just in time interventions (e.g., Ford et al. 2015; Gustafson et al. 2014; Quanbeck et al. 2014).

Given the overwhelming amount and complexity of EMA data, several analytic procedures can be applied to investigate particular research questions. In the field of behavioral health, some procedures are more widely known and utilized than others. While advances have been made in applying new or rarely used methods to intensive longitudinal behavioral research, some methods appear to remain siloed among the few researchers who are aware of them.

The purpose of this manuscript is to illustrate the application of five distinct analytic methods to one dataset of intensive longitudinal data, highlighting the utility of each method–thus encouraging researchers to expand their ideas about what can be gleaned from using a single case study. This work provides an introduction to these methods, and further details may be found in the provided references and supplementary material. Specifically, we consider generalized estimating equations (GEE), generalized linear mixed-effects models (GLMM), Markov models (MM), generalized linear mixed-effects Markov models (GLMMM), and differential equations (DE) in addressing distinct yet related research questions. While we recognize that choosing analytic methods is reliant on both a specific conceptual model and the structure of the data (Hallgren et al. 2016), we tested closely related research questions based on a general conceptual model (see Sect. 2) of factors that explain how individuals with mild-to-moderate alcohol use disorder (AUD) maintain and/or might resist high-risk drinking–highlighting the similarities, differences, strengths and limitations across methods.

Importantly, this is not an exhaustive list of possible analytic methods for intensive longitudinal data. We chose these five procedures as a means to compare two widely used methods in behavioral research (GEE and GLMM) with three other methods (MM, GLMMM and DE) that are less well-known or utilized within behavioral health but are widely used in areas such as biology, medicine, and physics. While others performed similar work comparing subsets of these five methods (e.g., Albert and Follmann 2007; Shirley et al. 2010), this would be the first manuscript known to these authors to include a comparison of DE with more commonly used statistical methods using EMA data.

Our work grew out of an interdisciplinary collaboration across mathematicians (RE, KB, HTB, SS), a statistician (JC), and social scientists (AK, JM). This exploratory exercise was instrumental in providing a foundational mutual language for our work together. We aim to provide a starting point for others, particularly as mathematics becomes a more prominent part of analyzing data in social science.

2 Clinical Data and Variable Identification

We investigate drinking behavior by applying five analytic methods to clinical data. The data utilized for this methodological comparison was collected during a study called Project SMART (Morgenstern et al. 2012). The purpose of Project SMART was to identify optimal brief treatments for hazardous drinking that focus on moderation rather than abstinence among men-who-have-sex-with-men (MSM). Project SMART was initiated in response to a growing public health problem. Individuals with mild-to-moderate AUD (formerly known as problem drinkers), or those who drink hazardously, tend to have high levels of psychosocial functioning and experience relatively mild problems or consequences to their drinking; however, those with mild-to-moderate AUD are likely to avoid established formal treatments that historically require abstinence as a goal (Hester 1995). In fact, only about 10% of this group ever receive treatment (Moss et al. 2007), highlighting the need for alternative, more accessible brief interventions. In addition, among those who have mild-to-moderate AUD, men-who-have-sex-with-men may have compounded vulnerabilities caused by hazardous drinking, specifically increased HIV transmission due to engaging in risky sexual behaviors while intoxicated and/or reduced efficacy of antiretroviral treatments for HIV due to alcohol use (Koblin et al. 2006). Therefore, brief treatments that allow for moderation among MSM with mild-to-moderate AUD may provide an important opportunity to improve public health.

Project SMART was a double-blind randomized controlled trial that specifically investigated the combined effectiveness of modified behavioral self-control therapy (MBSCT, a psychotherapeutic intervention that involves skill-building, such as avoiding high risk situations, coping with craving, planning to avoid heavy drinking, etc.) and the medication naltrexone (NTX, thought to work by reducing both craving and the pleasure obtained from drinking). Two hundred (N=200) MSM were enrolled in the study and randomized to one of four conditions: placebo only (PBO), NTX only, MBSCT only, or combined NTX and MBSCT (NTX + MBSCT). During the 12-week treatment period, EMA data, specifically the subtype of EMA called daily diary, were collected using Interactive Voice Recording (TELESAGE 2005). Participants completed a 25-item telephone survey each evening, averaging between 2–5 minutes to complete. At the end of the study, each participant had up to 84 days of data (84 separate surveys) totaling a possible 16,800 observations for the entire sample. Further details on the treatment interventions, IVR methodology, and study design are described in Morgenstern et al. (2012) and Mereish et al. (2018).

As a part of our ongoing efforts in intervention research with individuals with mild-to-moderate AUD (Bekele-Maxwell et al. 2017; Kuerbis et al. 2014; Morgenstern et al. 2016), we adopted a ‘dual process’ theoretical framework of substance abuse (Morgenstern et al. 2013) to select variables that we theorized related to alcohol consumption over time. This neurocognitive framework for addiction posits a ‘top-down, bottom-up’ cognitive process in which executive functioning (‘top-down’, such as commitment not to drink, utilizing coping skills, self-efficacy) exerts effort to inhibit both explicit and implicit responses to stimuli (‘bottom-up’, such as the smell of alcohol and craving in response). Treatments utilized in Project SMART were meant to target these two systems-MBSCT by enhancing executive functioning in the context of stimuli and NTX by reducing the intensity of the bottom up responses to stimuli and the rewards that may occur once an individual has started to drink. Using this conceptual framework, investigators hypothesized that the combined treatments—MBSCT + NTX—would yield the strongest outcomes given it was addressing both components of the dual process framework.

The variables selected to represent this framework were alcohol consumption, personal norm violation, confidence to resist drinking heavily (self-efficacy), and commitment to resist drinking heavily (motivation). We then added treatment as an additional component impacting alcohol consumption.

2.1 Alcohol Consumption

Alcohol use was assessed via multiple items within the IVR survey that asked participants to report the number of drinks they consumed in the last 24 hours. Each item asked about a different type of alcohol (e.g., beer, wine). Total number of drinks consumed in the last 24 hours was calculated by summing these items together to yield a daily count of drinks per day. We then averaged the daily data into weekly averages to yield a mean drinks per day (DPD) response variable. In places where there may have been missing days of IVR data, Timeline Followback (TLFB) (Sobell et al. 1988) data collected during post-treatment assessments were used to calculate average DPD for the same week where there was a missing day. The calculated TLFB average replaced the missing daily value.

DPD was used in DE as a continuous response variable; however, for the purposes of an easier comparison of GEE, GLMM, and GLM/MM, as well as to avoid issues related to zero inflated regression analyses, we created a binary response variable: low-risk drinking (DPD less than or equal to 4, including 0) versus high-risk drinking (DPD greater than 4), using guidelines from the National Institute on Alcohol Abuse and Alcoholism [25]. The goal of the treatment was moderation, not abstinence. Therefore, the proportion who would achieve low-risk drinking was the outcome of interest. We recognize the loss of information due to the dichotomization of the response variable, but as the purpose of this paper is illustrative and not inferential, we chose this approach to deal with issues within the data (e.g., missingness, zero-inflated, extreme and unrealistic outliers). All models presented that use a dichotomous response may also be adapted to a Poisson (count-based) model.

2.2 Personal Norm Violation (Top-Down Component)

Norm violation was assessed by asking, Do you consider the total amount you have had to drink since this time yesterday to be excessive? That is, was it more than you think you should have had? The response set ranged from 0 (Definitely Not) to 3 (Definitely). The thresholds (i.e., norms) individuals used to evaluate whether or not their drinking was excessive were not predefined, thus considered a ‘personal norm,’ and were not explicitly measured.

2.3 Confidence to Resist Drinking Heavily (Top-Down Component)

Confidence was measured by asking, How confident are you that you can resist drinking heavily (that is, resist drinking 5 or more standard drinks) over the next 24 hours? The response set ranged from 0 (Not at all) to 4 (Extremely).

2.4 Commitment to Resist Drinking Heavily (Top-Down Component)

Commitment was measured by asking, How committed are you not to drink heavily (that is, not to drink 5 or more standard drinks) over the next 24 hours? The response set ranged from 0 (Not at all) to 4 (Extremely).

2.5 MBSCT

A dichotomous variable indicated whether a participant was assigned to the behavioral therapy condition (MBSCT=1), in which they would receive 12 sessions of modified behavioral self-control therapy or no therapy (MBSCT=0).

2.6 NTX

A dichotomous variable was used to indicate whether a participant received active medication NTX (NTX=1) or placebo (NTX=0).

2.7 Time

To account for time, a count of the weeks during treatment was used, ranging from 1 to 12.

3 Model Descriptions and Results

For each of the modeling approaches described below, we introduce the method, propose the appropriate research question related to our conceptual model of the dual process model of addiction, and then describe the analytic model design within the context of Project SMART. Next, we present model results and their interpretation. Initial comparison of the basic qualities of each of the methods, as well as their respective research questions, are described in Table 1. A comparison of each model relative to the others are reviewed in the Discussion (Sect. 4).

Table 1 Comparison of all of all five models as they may be broadly applied to longitudinal studies of behavior and in this study.

3.1 Generalized Estimating Equations (GEE)

GEE (Zeger et al. 1988) are a population-level statistical method commonly used to study longitudinal, repeated measures data. GEE extend generalized linear models (GLMs) by correcting for correlated observations (Stokes et al. 2000), and thus they are robust to the violation of the assumption of independence of observations. GEE are therefore appropriate for longitudinal panel designs or intensive longitudinal data—data that are often collected in alcohol treatment clinical trials. As with GLMs broadly, GEEs allow response variables to be distributed non-normally. Parameters are estimated in GEE by solving a function similar to the quasi-likelihood function (Liang and Zeger 1986). In the formulation of the GEE, one must choose a correlation structure to model the relationship between time-dependent observations. There are several options, (e.g., exchangeable, autoregressive) depending on the known or hypothesized correlation structure of the data, but the GEE method is generally robust to misspecification of the correlation structure (Ballinger 2004; Liang and Zeger 1986). Thus, parameter estimates are reasonably unbiased even if the correlation structure is misspecified.

3.1.1 Application to Project SMART

Within the context of Project SMART, one potential research question is: How do treatment (therapy (MBSCT) and/or medication (NTX)), norm violation, confidence to resist drinking heavily, and commitment to resist drinking heavily affect the likelihood of high-risk (versus low-risk) drinking over time? We used GEE to test for both the main effects and interactions between predictors and time, as well as for the combined effect of MBSCT and NTX. For this analysis, a binomial distribution with logit link function was specified due to the binary response of high-risk or low-risk drinking behavior. In addition, an autoregressive working correlation matrix was specified (Stokes et al. 2000), which assumes that the correlation is dependent upon the amount of time between observations, that is, average alcohol consumption in a week is correlated more with one week ago than several weeks ago. Analyses were conducted using PROC GENMOD in the SAS statistical software program (see supplementary material) (SAS Institute Inc SAS software 2002).

We reduced the model predictors in a stepwise fashion, successively eliminating each term that was not statistically significant. The final model yielded four significant predictors of drinking across the treatment period: MBSCT, confidence to resist drinking heavily, norm violation, and time (Table 2). None of the interaction terms included in the original model were statistically significant. When keeping the other predictors constant in the model, participants in MBSCT had 49% lower odds of high-risk drinking compared to those not in MBSCT. For every unit increase in confidence, participants had 41% lower odds of drinking heavily. Time also had a negative relationship with high-risk drinking. For every week that passed during the treatment period, participants had 7% lower odds of drinking heavily. Only personal norm violation demonstrated a positive relationship with high-risk drinking, such that for every unit increase in rating drinking as excessive (personal norm violation), participants had 3.7 times greater odds of drinking heavily that same week.

Table 2 Parameter estimates (\(\hat{\beta }\)) and associated standard errors (SE) from GEE and GLMM predicting the likelihood of weekly high-risk drinking compared to low-risk drinking and GLMMM predicting transition probabilities to and from low-risk and high-risk drinking. Odds ratios (OR) and the lower limit (LLCI) and upper limit (ULCI) for the 95% confidence interval for the OR of each statistically significant predictor. Note that the OR for the GLMMM are for the parameter estimates, not for the treatment groups

3.2 Generalized Linear Mixed Models (GLMMs)

Generalized linear mixed-effects models (GLMMs) are another common extension of GLMs used for analyzing longitudinal data. The model specification is similar to the GEE, again using interactions between time and other predictors to test change in effect over time. Both fixed effects and random effects are estimated in GLMM. Fixed effects are constant across individuals and describe the overall averaged change trajectories of the sample, while random effects capture the person-level trajectories. The inclusion of random effects allows a better description of inter-individual differences and intra-individual changes: variability in trajectories. Therefore, GLMM are appropriate when both within- and between-person differences are of research interest. If, however, the random effects are not statistically significant, indicating that there is insufficient individual variability to account for them, then the random effects would be removed from the model (Singer and Willett 2003). Thus, what remains is a GLM more similar to the GEE above. To estimate parameter values, we used maximum likelihood estimation methods as we had sufficient power and data to use this method (Capanu et al. 2013).

3.2.1 Application to Project SMART

The research question for GLMM would be quite similar to that for GEE: How do treatment (therapy (MBSCT) and/or medication (NTX)), norm violation, confidence to resist drinking heavily, and commitment to resist drinking heavily affect the likelihood of high-risk (versus low-risk) drinking over time? We again tested for main effects, interaction effects between predictors and time, as well as for the combined effect of MBSCT and NTX. For this analysis, a binomial distribution was specified with a logit link function. Analyses were conducted using the GLIMMIX procedure in the SAS statistical software program (see supplementary material) (SAS Institute Inc SAS software 2002). All models included both random intercept and slope for the count of EMA weeks in the study, permitting individual variability in drinking over time.

Again, we reduced the model in a stepwise fashion and successively eliminated each term that was not statistically significant. Not surprisingly, the final GLMM yielded the same four significant predictors of drinking across the treatment period as the GEE: MBSCT, confidence to resist drinking heavily, norm violation, and time (Table 2). None of the interaction terms included in the original model were statistically significant. When keeping the other predictors constant in the model, participants in MBSCT had 62% lower odds of high-risk drinking compared to those not in MBSCT. For every unit increase in confidence, participants had 53% lower odds of drinking heavily. For every week that passed during the treatment period, participants had 14% lower odds of drinking heavily. For norm violation, for every unit increase in rating drinking as excessive (personal norm violation), participants had 8.6 times greater odds of drinking heavily. Note that person-level centering was not applied to separate between-person variance from within-person variance, which could potentially result in misleading estimated effects of confidence on odds of heaving drinking. While the main goal of the analyses is to test treatment effect and the example is presented for illustration purpose in order to make comparison with other methods, the authors decided to keep the variables consistent across all methods. A variety of centering methods are discussed in Wang and Maxwell (2015); Snijders and Bosker (2011) for the researchers who are interested in applying GLMM in practice.

3.3 Markov Models

While GEE and GLMM work well to look at the impact of predictors on the observable response, in the study of behavior, it is also informative to consider the influence of predictors on the likelihood of transition from one behavioral state to another. In such situations, Markov models (MMs) are an appropriate tool to explore the transitions between behavior states over time. Markov models have been used in psychology applications for at least 60 years (e.g., Miller 1952). A more recent example includes (Yeh et al. 2012), where the authors use MMs to analyze smoking behavior, specifically to identify factors associated with the transitions between smoking and abstinence. MMs have been used previously in the application of alcohol-related studies (e.g., Maruotti and Rocci 2012; Shirley et al. 2010), as well as extensions to hidden Markov models, which are beyond the scope of this paper. Regardless, MMs remain underutilized in social science applications perhaps due to their relative inaccessibility in common software packages (de Haan-Rietdijk et al. 2017).

To define a MM, we must first define the Markov Process. We assume that any given time point, t, an individual, i, will be in a specific observable state, \(s_{i,t}\). While one could assume any number of possible states, we will assume just two states, i.e., low-risk (0) or high-risk (1) drinking states. The first-order Markov process assumes that the probability of an individual, i, being in a particular state at a specific time point, t, is dependent only on what state the individual was at in the previous time point, \(t-1\). For example, the probability of being in state 0 at time t is dependent on whether an individual was in state 0 or 1 at time \(t-1\), or

$$\begin{aligned} P(s_{i,t} = 0 \vert s_{i,t-1} = 0) = \pi _{i,00} \end{aligned}$$

and

$$\begin{aligned} P(s_{i,t} = 0 \vert s_{i,t-1} = 1) = \pi _{i,10}. \end{aligned}$$

Note that \(\pi _{i,00}+\pi _{i,01}=1\) and \(\pi _{i,11}+\pi _{i,10}=1\), as the sum of the probabilities of observing one of the two possible events at time t, given the same origin state at time \(t-1\), total one. We can define a ‘transition matrix’ to model the transition probability from every state to every other state in a single time-step. For a two-state Markov process that matrix would be

$$\begin{aligned} \Pi _i = \begin{bmatrix} \pi _{i,00} &{} \pi _{i,01} \\ \pi _{i,10} &{} \pi _{i,11} \end{bmatrix}. \end{aligned}$$

From the transition matrix, we can also estimate the steady-state solution, i.e., the probability that at any time point a particular individual is in a particular state. The steady-state solution would be similar to the probabilities associated with the response variable for the GLMM and GEE, i.e., the probability of being in a specific state of drinking at a specific time-point.

The Markov process can be assumed to be time-homogenous, i.e., the transition probabilities do not vary over time, as above, or time-inhomogeneous, such that the transition probabilities vary over time. Transition probabilities may be estimated empirically via maximum likelihood estimation (Maruotti and Rocci 2012) or Bayesian estimation methods (de Haan-Rietdijk et al. 2017; Shirley et al. 2010).

3.3.1 Application to Project SMART

We assumed a simple first-order MM for all participants, and we estimated the transition matrix, using maximum likelihood estimation, from low-risk drinking (0) to high-risk drinking (1) states and vice versa. Analyses were conducted using the R statistical software program (R Core Team 2018) with the ‘markovchain’ package (Spedicato 2017) (see supplementary material). In general, we observed that participants were more likely to remain in their current drinking behavior state (probability of low-risk to low-risk state transition is 0.838; probability of high-risk to high-risk state transition is 0.746) than transition to different state the next week across all twelve weeks and 181 participants (Table 3).

Table 3 Estimated transition probabilities and steady states for all participants

The research question of interest for the simple MM is: How does treatment (MBSCT and/or NTX) affect the probability of transitioning from one level of alcohol consumption to another level over time? We examined this question by looking at individual Markov models and treatment group Markov models. We estimated individual participant transition matrices for four patients, one from each treatment group (Table 4). For participants 1761, 1460, and 1474, once they transitioned to low-risk drinking, they remained in that state through the end of the 12 weeks, as indicated by the probabilities of 1 in the row associated with transitions from low-risk drinking and remaining in a low-risk drinking state. While informative at a participant level, the models do not provide much information on differences in treatments, prohibiting generalization to the treatment groups. To make more generalized inferences about the effects of treatment on behavior changes, we estimated the transition probabilities for all participants within each treatment group (Table 5).

Table 4 Estimated transition matrices for one participant from each treatment group
Table 5 Estimated transition matrices for time-homogeneous Markov model for all participants within each treatment group, with standard errors in parentheses. Steady-state solutions provided for each treatment group

While there were no statistically significant differences between the transition rates among the treatments (excluding the Placebo group) from low-risk to high-risk drinking, there was a significant difference in transition rates from high-risk to low-risk drinking (Table 5). Specifically, the NTX+MBSCT group has the greatest transition probability to low-risk drinking after a high-risk drinking state, a contrast to the GEE and GLMM models that found no significant effect of the combined treatments on the probability of high-risk drinking. The steady-state solutions show that treatment was better than placebo at supporting low-risk drinking behavior states and specifically that MBSCT led to a higher probability of low-risk drinking with or without NTX (Table 5) and that the addition of NTX to MBSCT does not improve the probability of being in a low-risk state, similar to the results of the GEE and GLMM.

We also examined the time-inhomogeneous transition probabilities by treatment group from low-risk to high-risk or high-risk to low-risk (Fig. 1) to compare the effect on treatments on transition probabilities that vary over time. Again, while all of the treatments had varying, but similar, effects on the probability of transition from low-risk to high-risk drinking states (Fig. 1 right), it was the combination of MBSCT and NTX that had the greatest impact on the probability of transitioning out of a high-risk drinking state into a low-risk drinking state (Fig. 1 left).

Fig. 1
figure 1

Estimated transition probabilities from week to week over the twelve weeks from high-risk to low-risk drinking (left) and from low-risk to high-risk drinking (right)

3.4 Generalized Linear Mixed-Effects Markov Model (GLMMM)

While useful at the group/population level, the previous MM approach did not allow for individual level effects and/or effects of time-varying predictors on transition probabilities, such as norm violation, confidence, and commitment. The erratic trend of the transition probabilities over time (Fig. 1) may also indicate that other factors aside from treatment impact the transition probabilities. For GEE and GLMM, we developed linear models to examine the probability of being in a specific state at a specific time point. Here, we can extend MMs to build coupled GLMMs, one per each row of the transition matrix, to model the probability of transitioning from low-risk to high-risk drinking at a specific time point (Equation (1)), and the probability of transitioning from high-risk to low-risk drinking at a specific time point (Equation (2)) such that:

$$\begin{aligned} \log \left( \frac{\pi _{i,01}}{\pi _{i,00}}\right)= & {} \text {logit}(\pi _{i,01}) = \varvec{x}_i' \varvec{\beta }_{01} + \varvec{\gamma }_{i,01} \end{aligned}$$
(1)
$$\begin{aligned} \log \left( \frac{\pi _{i,10}}{\pi _{i,11}}\right)= & {} \text {logit}(\pi _{i,10}) = \varvec{x}_i' \varvec{\beta }_{10} + \varvec{\gamma }_{i,10}, \end{aligned}$$
(2)

where \(\varvec{x}_i'\) are the predictor values, \(\varvec{\beta }_{10}\) and \(\varvec{\beta }_{01}\) are the coefficient estimates, and \(\varvec{\gamma }_{i,10}\) and \(\varvec{\gamma }_{i,01}\) are the random intercepts for each model, respectively. Note that there is a time-inhomogeneous GLMMM where participant transition probabilities and coefficients of time-varying predictors are estimated over time. We recognize that a time-inhomogeneous GLMMM may be more practical for modeling behavior modification, but for the purposes of this paper, we implemented the simpler model, where transition probabilities were homogeneous over time. While we focus on modeling transition between two states, it is possible to model three or more states or even Poisson processes as is relevant to the research context.

3.4.1 Application to Project SMART

The research question for GLMMM would be: How does treatment (MBSCT and/or NTX), norm violation, confidence to resist drinking, and commitment to resist drinking affect the probability of transitioning from one level of alcohol consumption to another level over time? Similar to GLMM and GEE, we tested for both the main effects and the interaction effects between predictors and time as well as for the combined effect of MBSCT and NTX. Analyses were conducted using R statistical software program (R Core Team 2018) with the package ‘LMest’ (Bartolucci et al. 2017). The function for estimation of the models in ‘LMest’ required the imputation of missing data for weekly observations of norm violation, confidence, and commitment. We used predictive mean matching to impute the missing values for norm violation, confidence, and commitment via the R package ‘mice’ (van Buuren and Groothuis-Oudshoorn 2011). Therefore, results are based on imputed data and are for demonstration purposes, though the model fit and general results were relatively consistent across various iterations of the imputed data.

Again, we reduced the two models (one to model the probability of transitioning from low-risk to high-risk drinking; and the second to model the probability of transitioning from high-risk to low-risk drinking) in a stepwise fashion and successively eliminated each term that was not statistically significant (Table 2). In contrast to GLMM and GEE results, time was not significant for the high-risk to low-risk transition model and had only a weak effect on low-risk to high-risk transitions (OR \(\approx \)1) so there was only a slight decrease in likelihood of transitioning from low-risk to high-risk drinking over time (\(\approx \) 7% decline). In addition, the interaction between MBSCT and NTX was significant in both models. We see that participants in a non-placebo group (NTX: OR=0.35; MBSCT: OR=0.40; MBSCT+NTX: OR=0.54) had 46-65% lower odds of transitioning from a low-risk drinking state to a high-risk drinking state, compared to the placebo group. The combination of MBSCT and NTX had less of a combined impact on the odds of transitioning from low-risk to high-risk drinking compared to MBSCT and NTX alone. In addition, as confidence to resist heaving drinking increased, participants were 23% less likely to transition from low-risk to high-risk drinking. Personal norm violation was significant as well, but merely verified that patients who transitioned to high-risk drinking recognized that they were high-risk drinking. In the model for high-risk to low-risk transition probabilities, we see that a participant in the combined MBSCT and NTX group were 2 times more likely to transition from high-risk to low-risk drinking, compared to the other treatment or placebo groups. Additionally, as confidence increased the likelihood of transitioning to low-risk drinking from high-risk drinking also increased.

3.5 Differential Equations (DE)

While statistical methods, such as GEE, GLMM, or GLMMM, model the direct effect of predictors on a response variable, DE can model nonlinear effects of the predictors on the response; the effect of the predictors on each other; and the effect of the response on the predictors over time. Therefore, while there are similarities to the types of inference we might make with DE and statistical methods, DE can allow for a more nuanced exploration of the relationships between all the variables of interest. Similar to statistical models, a range of parameter estimation methods can be applied including frequentist and Bayesian parameter estimation methods. The DE model along with the parameter estimation method can be applied at the population-level, individual-level, or both levels using mixed effects methods. Individual-level analysis provides the opportunity to construct a much richer model than might emerge utilizing a group from the beginning. One may think of this as akin to the contributions of qualitative research—the purpose of qualitative research is not to provide generalizability to a population but instead to provide more in-depth information about a few individuals ultimately offering potential road maps for future investigation at the population level. By exploring data with one individual at a time with a DE, in depth, nonlinear relationships between variables can be described, providing the researcher with new information about how they may proceed constructing a mathematical model to be applied to a group, as well as inform the construction of potential statistical models, where feasible.

3.5.1 Application to Project SMART

We implemented a differential equation model to investigate the research question: How do the factors alcohol consumption, norm violation, confidence to resist drinking heavily, and commitment to resist drinking heavily relate to each other to cause behavior change in (four) individual participants? In the context of Project SMART, we consider a continuous DE model that assumes the predictor and response variables are continuous. We consider the change in amount of alcohol consumed over time instead of the two categories of low-risk and high-risk drinking as we did in our analysis using GLMM, GEE, and GLM/MM. DE will allow us to quantify the complex and nonlinear relationships between alcohol consumption, norm violation, confidence, and commitment over time that cause behavior change in individual participants.

To create a mathematical representation of the conceptual model of the dual process model of addiction previously discussed, we let A represent the daily alcohol consumption, or the number of alcoholic drinks a person has consumed in the past 24 hours from time t (i.e., from time \(t-1\) to time t); V represents norm violation in the past 24 hours; \(C_f\) represents the confidence level a person feels at time t to resist high-risk drinking in the next 24 hours; and \(C_h\) represents commitment a person makes to not drink heavily in the next 24 hours at time t (i.e., from time t to time \(t+1\)). In addition, we defined a latent variable, personal norm, or \(A^*\), which means it was not directly measured in the SMART study. We define this variable to be the threshold (i.e., norm) an individual used to evaluate whether or not his drinking was excessive. The mathematical model (Bekele-Maxwell et al. 2017; Banks et al. 2017) is given by the following system of differential equations:

$$\begin{aligned} \frac{\textrm{d}A}{\textrm{d}t}&= \underbrace{a_1}_{\text {desire}}- \underbrace{a_2V(t-1)}_{\begin{array}{c} \text {norm violation} \\ \text {affects drinking} \end{array}} - \underbrace{a_3C_h(t-1)}_{\begin{array}{c} \text {commitment} \\ \text {affects drinking} \end{array}} - \underbrace{a_4C_f(t-1)C_h(t-1)}_{\begin{array}{c} \text {interaction of confidence and } \\ \text {commitment affect drinking} \end{array}} \end{aligned}$$
(3a)
$$\begin{aligned} \frac{\textrm{d}V}{\textrm{d}t}&= \underbrace{\chi _{(A>A^*)}v_1\frac{d(A-A^*)}{\textrm{d}t}}_{\begin{array}{c} \text {if drink more than personal norm:}\\ \text {rate that drinking approaches personal} \\ \text {norm affects norm violation} \end{array}}- \underbrace{\chi _{(A\le A^*)}v_2V}_{\begin{array}{c} \text {if drink less than personal norm:}\\ \text {norm violation decreases to 0} \end{array}} \end{aligned}$$
(3b)
$$\begin{aligned} \frac{\textrm{d}C_f}{\textrm{d}t}&= \underbrace{-\chi _{(A>4)}d_1\frac{\textrm{d}A}{\textrm{d}t}C_h(t-1)}_{\begin{array}{c} \text {if high-risk drinking:}\\ \text {interaction of rate of drinking and} \\ \text {commitment affects confidence} \end{array}} + \underbrace{\chi _{(A\le 4)}d_2(C_f-\alpha )\left( 1-\frac{C_f}{n}\right) }_{\begin{array}{c} \text {if low-risk drinking:}\\ \text {confidence soln increases logistically} \\ \text {to max level over time} \end{array}}, \end{aligned}$$
(3c)
$$\begin{aligned} \frac{\textrm{d}C_h}{\textrm{d}t}&= \underbrace{mC_h\left( 1-\frac{C_h}{K}\right) }_{\begin{array}{c} \text {commitment soln increases } \\ \text {logistically to max level over time} \end{array}} \end{aligned}$$
(3d)

where

$$\begin{aligned} A^*(t) = \underbrace{be^{-rt}+l}_{\begin{array}{c} \text {personal norm decreases} \\ \text { to min level over time} \end{array}} , \end{aligned}$$
(3e)

and \(\chi \) is the indicator function defined as follows

$$\begin{aligned} \chi _{(A>x)} = {\left\{ \begin{array}{ll} 1 &{} \text { if } A>x \\ 0 &{} \text { else }\end{array}\right. }, \ \chi _{(A \le x)} = {\left\{ \begin{array}{ll} 1 &{} \text { if } A\le x \\ 0 &{} \text { else }\end{array}\right. }, \end{aligned}$$
(3f)

where \(x = A^*\) in (3b) and \(x = 4\) in (3c).

We assume a constant desire to drink causes alcohol consumption to increase, represented by parameter \(a_1\). The second term in equation (3a) represents how if a patient feels that his drinking in the past 24h was a norm violation, he will decrease his drinking in the next 24h, with weighting parameter \(a_2\). Similarly, if the patient feels committed to not drink heavily in the next 24h, then he will decrease his drinking in the next 24h, with weighting parameter \(a_3\). The last term in equation (3a) represents how if the patient feels both committed to not drink heavily in the next 24h and confident that he can resist drinking heavily in the next 24h, then he will decrease his drinking in the next 24h, with weighting parameter \(a_4\).

The first term in equation (3b) contributes to the model when alcohol consumption is larger than the personal norm, and represents how the change in norm violation is dependent on the rate at which the number of drinks approaches the personal norm, with weighting parameter \(v_1\). The patient’s norm violation decreases if his alcohol consumption decreases toward his personal norm at a faster rate than the rate of decrease in his personal norm; his norm violation increases if his alcohol consumption decreases at a slower rate compared to his personal norm or if his alcohol consumption increases away from his personal norm. The second term in (3b) represents how if the patient drinks less than or equal to his personal norm then his norm violation will decrease exponentially at rate \(v_2\).

The first term in equation (3c) contributes to the model when the patient drinks heavily (more than 4 drinks in 24h), in which case confidence will decrease (or increase) if the patient’s drinking rate is positive (or negative) and he was committed, with weighting parameter \(d_1\). The second term contributes to the model when the patient is not drinking heavily, with weighting parameter \(d_2\). In this case, the patient first needs to establish a habit of drinking less than 4 drinks before he feels a sense of mastery and his confidence increases. We model this using a logistic function where the initial slow growth represents the time it takes for a patient to establish a habit of not drinking heavily, followed by confidence increasing to a maximum confidence level n. Since we want the logistic function to start once alcohol consumption is less than or equal to 4 (and not at \(t=0\)), we subtract parameter \(\alpha \) to shift the function.

While theoretically one would assume that commitment only increases in the context of treatment, as it is one of the primary therapeutic targets, we were aware that this may not occur in the placebo condition. We therefore explored the data descriptively and found that commitment had an overall increasing trend, regardless of condition. Therefore in the model, we assume that a patient’s motivation level (i.e., commitment) increases over time. We quantify this using a logistic model with maximum commitment K and growth rate m, as described in equation (3d). Lastly, in (3e), we assume that a patient’s personal norm exponential decreases with rate r from initial value \(b+l\) to a minimum level l. We refer the reader to Bekele-Maxwell et al. (2017); Banks et al. (2017) for further details of the mathematical model formulation, although a different threshold for high-risk drinking is used.

We estimated the DE parameters for each individual patient using an iterative reweighted weighted least squares (IRWLS) method (Banks et al. 2014) that aims to determine parameters that minimize the distance between the data and model output for each observable, where the observables are weighted according to their variability (Banks et al. 2017). While other parameter estimation methods, such as maximum likelihood and Bayesian parameter estimation, can be applied to a DE model with data, here we use a least squares method as a first step in developing a DE model. Specifically, we implement the IRWLS method since we assume the error depends on the size of the observations. The IRWLS method is applied to each individual patient using the patient’s averaged weekly alcohol, norm violation, confidence, and commitment data. Each resulting parameter set represents a patient and, combined with the model, produces individual solutions. Analyses were conducted using the built-in function ‘fmincon’ in MATLAB (The MathWorks Inc 2015) (see supplementary material). The estimated parameter values for each individual are given in Table 6. See (Banks et al. 2017) for details about implementing the IRWLS method.

Table 6 DE model parameter estimates for each individual case

To best compare the model solutions to the previous methods, we present results for alcohol consumption for individual participants from each treatment group (Fig. 2). See supplementary material for results for norm violation, confidence, and commitment. The model solutions are able to reasonably capture the overall trend in the data for each participant, suggesting the plausibility in the hypothesized relationships among the factors, although future research should include further analysis regarding the parameterization. In addition, the results indicate the importance of the ‘personal norm’ threshold, which might be of interest for future studies.

Fig. 2
figure 2

DE alcohol consumption model solutions for PID 1474 (MBSCT\(+\)NTX), PID 1761 (MBSCT), PID 1460 (NTX), and PID 1859 (PBO). The red line represents the model solution (solved on the daily scale), the red o’s represent the weekly averaged alcohol consumption based on the model, and the black x’s represent the weekly averaged alcohol consumption data

4 Discussion

When designing a study, it is important to first identify the research question(s) of interest and the appropriate model for analysis so that the data collection design and process is effective and efficient. In this paper, we demonstrated how each modeling approach evaluated the conceptual model of the dual process model of addiction for changing or maintaining problem drinking, using observations from Project SMART. The two types of generalized linear models, GEE and GLMM, both supported the proposed conceptual framework of the dual process neurocognitive model of addiction. Both MBSCT and confidence to resist high-risk drinking (self-efficacy) were negatively related to high-risk drinking compared to low-risk drinking, potentially indicating the increased use of learning, skills, and agency (top down executive functions) to moderate drinking.

In contrast, the GLM/MM results showed a combined effect for medication and psychotherapy on the probability of transitioning out of a high-risk drinking state—a finding consistent with other research exploring combined treatments (Donovan et al. 2008). Though this appears counter to our GEE and GLMM results, as well as previous analyses (Morgenstern et al. 2012), it is simply due to a shift in perspective—the addition of naltrexone to therapy supports behavior change, but may only slightly increase time spent in a low-risk drinking state overall. Given that this combined effect is slightly greater than the individual effects alone, the GLM/MM potentially supports the possibility of combined treatments addressing the top down–bottom up nature of addiction, as outlined in the conceptual model: naltrexone is thought to inhibit the strength of ‘bottom-up’ stimuli (craving), while MBSCT enhances ‘top-down’ executive process and skills to reduce drinking. These mechanisms of action would need to be tested explicitly to confirm these relationships. The fact that confidence to reduce drinking was also a significant contributor to the transition between high-risk to low-risk drinking is consistent with our previous studies and the dual process model of addiction.

DE also validates the conceptual model, but provides very different information. While DE supports the selection of variables initially chosen, similar to statistical models, DE also demonstrates the potential complexity of the relationships that variables may have with one another—a complexity that is lost in statistical models due to the restrictions of linear models. This ability to incorporate complexities however can require several iterations of modeling to gain a desired understanding. For example, the research question associated with DE presented here is about understanding the relationships among the factors (i.e., developing functions that represent how variables relate to one another). A natural next research question could then involve the role of treatment, which would align more closely with the research questions associated with the statistical models. To investigate this, treatments could be incorporated into the model, and parameterization could consider both the individual and population level using mixed effects. An example of using mixed effects with dynamical systems modeling in the context of alcohol use disorder is given by Everett et al. (2022). Here, the authors develop a discrete dynamical system (as opposed to a continuous differential equation) that model alcohol consumption and desire over time, and use Bayesian parameter estimation techniques. The authors in Everett et al. (2022) meaningfully interpret both population and individual level parameters. In addition, sensitivity analysis that determines how changes in model parameters affect model solutions provide insights into possible avenues for treatment.

4.1 Choosing the ‘Best’ Modeling Approach

We examined five different modeling methods in this paper, all of which could be further modified to include other formulations of our variables or perspectives on our research questions. Regardless, we see that each model has its purposes when examining behavior changes over time (Table 1).

GLMMs and GEEs are both extensions of GLMs, although their target of inference are different: GEE is a marginal model where the expectation is only on the fixed design matrix and the variability among individuals are not taken into account. In contrast, both within- and between-person variabilities are included and estimated in GLMM. While GEEs or GLMMs can classify a participant into a specific category of behavior, such as high-risk drinking, smoking, or manic state, they do not directly provide a measure of the rate of behavior changes between states, such as from abstinence to relapse rates, which are conditional on prior behavior states. Even though nonlinear change models could be considered in GLMM framework, the change trajectories is still in a linear function form and is therefore challenging to interpret with relationship to time. GLM/MMs allow us to model behavior changes and rates of behavior change over time, such as periods of remission or recidivism (e.g., Yeh et al. 2012). In addition, focusing on the behavior changes between states instead of only the observed behavior (outcome) may illuminate why a certain treatment is effective or ineffective. By focusing on the transition, we can observe if it failed to prevent a participant from transitioning to a ‘bad’ behavior rather than only on helping the participant return to a healthy behavior. By focusing only on the outcome, the treatment may appear ineffective, when it may in fact be a powerful prevention measure. More complex GLM/MMs, like hidden Markov models, can detect overarching behavior patterns, such as remission and relapse, and not just observed behavior states (e.g., Maruotti and Rocci 2012; Shirley et al. 2010).

GLMMs, GEEs, and GLM/MMs determine the direct relationship of the predictors on some form of the observed response. In contrast, DEs quantify the often complex and nonlinear relationship between the predictor variables and the rate of change of the mean of the response variable. Both DE and MM models may be fit to population-level data or to data for a specific individual. This allows for personalization of the model, to examine an individual’s behavior or to make predictions about an individual’s behavior under different scenarios or perturbations of the parameter estimates.

4.2 Other Modeling Considerations

In the process of model building, it is important to recognize, and be transparent about, the choices that are statistical in nature (e.g., significance testing and model comparison measures) and the choices that are scientific in nature (e.g., the initial choice to include specific predictors or model structure (nonlinear vs. linear formulation)). One choice in the model building process that must be considered is the time scale of the data. For example, time lag for predictors may be appropriate in a mathematical or statistical model given the conceptual model being tested. The DE treats norm violation prospectively—if one violates their norm one day, it influences drinking levels the next day. Another time-scale decision is the choice to represent data measured daily as a weekly average or some other time-scaled average. The choice to average data over time may depend on the research question, the type of behavior studied, or characteristics of the data itself, such as cases in which there may be missing data. Time-scaled averages do not necessarily dilute the impact of EMA, as a study of alcohol treatment clinical trials found that models testing for main effects of treatments using aggregate data performed equivalently and in some cases better than the more complicated data structures (Hallgren et al. 2016). Ultimately, the research question should drive the form of the data used in the modeling process.

5 Conclusion

While GEE and GLMM remain common approaches to analysis in longitudinal studies due to their utility and their accessibility in common statistical software, we showed how other modeling approaches, such as MMs, GLMMMs, and DEs, might provide alternative perspectives and insight into the validity of conceptual models of behavior. Hopefully, as more researchers adopt these other modeling methods, statistical software will provide more accessible ways to build and analyze these types of models for future longitudinal studies of behavior. Until that time, we encourage the continued collaboration between the mathematical, statistical, and social scientists to support the important work of modeling behavior for treatment and intervention.