Prevention Science

, Volume 13, Issue 3, pp 288–299 | Cite as

Using the Time-Varying Effect Model (TVEM) to Examine Dynamic Associations between Negative Affect and Self Confidence on Smoking Urges: Differences between Successful Quitters and Relapsers

  • Mariya P. Shiyko
  • Stephanie T. Lanza
  • Xianming Tan
  • Runze Li
  • Saul Shiffman


With technological advances, collection of intensive longitudinal data (ILD), such as ecological momentary assessments, becomes more widespread in prevention science. In ILD studies, researchers are often interested in the effects of time-varying covariates (TVCs) on a time-varying outcome to discover correlates and triggers of target behaviors (e.g., how momentary changes in affect relate to momentary smoking urges). Traditional analytical methods, however, impose important constraints, assuming a constant effect of the TVC on the outcome. In the current paper, we describe a time-varying effect model (TVEM) and its applications to data collected as part of a smoking-cessation study. Differentiating between groups of short-term successful quitters (N = 207) and relapsers (N = 40), we examine the effects of momentary negative affect and abstinence self-efficacy on the intensity of smoking urges in each subgroup in the 2 weeks following a quit attempt. Successful quitters demonstrated a rapid reduction in smoking urges over time, a gradual decoupling of the association between negative affect and smoking urges, and a consistently strong negative effect of self-efficacy on smoking urges. In comparison, relapsers exhibited a high level of smoking urges throughout the post-quit period, a time-varying and, generally, weak effect of self-efficacy on smoking urges, and a gradual reduction in the strength of the association between negative affect and smoking urges. Implications of these findings are discussed. The TVEM is made available to applied prevention researchers through a SAS macro.


Intensive longitudinal data Time-varying covariates Ecological momentary assessments Modeling Multilevel modeling 

Longitudinal studies are frequently designed to establish short- and long-term efficacy of prevention programs, evaluate mechanisms through which programs work, and study temporal changes in health-related behaviors. With technological advances and a deepened understanding of the dynamic nature of health behaviors, researchers frequently rely on intensive longitudinal study designs to capture temporal changes with frequent assessments, often administered in real time and naturalistic settings. Examples of intensive longitudinal data (ILD) sampling techniques include ecological momentary assessment (EMA; Shiffman et al. 2008; Smyth and Stone 2003; Stone and Shiffman 1994; Trull and Ebner-Priemer 2009), experience sampling methods (Larson and Csikszentmihalyi 1983), ambulatory assessments (Ebner-Priemer et al. 2009; Fahrenberg et al. 2007), and diary studies (Bolger et al. 2003).

In drug-use research, ILD are used to study frequency, patterns, and situational and psychological triggers of substance use (Shiffman 2009). Through use of ILD methods, it is now better understood that smoking cessation is a highly dynamic process (Piasecki et al. 2002) characterized by time-varying changes in behavioral and psychological factors following a quit attempt (McCarthy et al. 2006; Van Zundert et al. 2009). During this unstable period of behavior change, momentary fluctuations in mood or cravings can result in a smoking lapse which, eventually, may lead to a full relapse (Piasecki 2006; Shiffman 2005). It has been unveiled that an increase in smoking urges and negative affect has an immediate effect on the actual smoking behavior (Berkman et al. 2011; Shiffman and Waters 2004). To prevent a relapse following periods of intense urge experiences, intervention programs have been developed that provide participants with coping strategies and motivational messages delivered in real time via cell phones (Berkman et al. 2011; Rodgers et al. 2005). Such interventions are commonly individualized to target periods when individuals are at most risk for a relapse (e.g., experience high smoking urges).

While our understanding of the dynamic nature of health-related behaviors such as smoking cessation continues to improve, there is little exploration of the time-varying relations between dynamic outcomes and their covariates. Generally, researchers assume that this relation is stable and can be expressed statistically with a single correlation or regression coefficient. However, time (or an equivalent of time) can have a major impact on the strength of the association. Consider the following example. Suppose a sample of individuals, enrolling in a month-long smoking cessation program, are assessed several times per day on their affect and craving. Based on existing evidence, we expect that both affect and craving will change over the course of the intervention. Importantly, we might also see that the association between affect and craving changes over time in some systematic way.

In this article, we introduce an analytical tool to address the question of the time-varying relations between covariates and intensively sampled outcomes. The time-varying effect model (TVEM; Tan et al. 2010) is a statistical approach that grew out of the field of functional data analysis, which can be successfully applied to answer important research questions focusing on time-varying relations in prevention research. The model is applied to ILD from a smoking-cessation study (Shiffman et al. 2000) to examine smoking-related post-quit processes in groups of successful short-term quitters and relapsers. In the context of our empirical example, we outline steps for model fitting and refer to the SAS macro that was specifically developed for model implementation by applied researchers.

Multilevel Modeling of Time-Varying Relations

Currently, multilevel modeling (MLM) is the most widely used analytic approach for analyzing ILD with time-varying and time-invariant covariates (Schwartz and Stone 1998, 2007). Advantages of the model over more traditional approaches that aggregate data over time (e.g., repeated measures analysis of variance) have been previously described (e.g., Schwartz and Stone 1998, 2007). MLM splits the influence of a time-varying covariate (TVC) into between- and within- person effects. The between-person effect is estimated by computing an average level of a TVC for every individual and entering it as a time-invariant covariate. This between-person effect is assumed to be constant over time. The within-person effect is computed by creating a series of deviation scores from a personal average on the covariate, entered as a TVC. Thus, the effect of a TVC represents the average amount of change in an outcome associated with momentary deviation from a personal mean. This effect is also pooled over time.

Conceptually, MLM can be extended to include time as an additional predictor, as commonly done in growth curve modeling (e.g., Raudenbush and Bryk 2002; Singer and Willett 2003). The main effect of time would represent temporal changes in the dependent variable over time, controlling for covariates. In addition, an interaction between time and a covariate (either time-invariant or time-varying) would account for some temporal changes in a relation. While offering an initial solution to explore time-varying effects, MLM is limited to relatively simple patterns of change, which can be modeled by a few parametric terms (e.g., linear or quadratic). Otherwise, the model becomes too complex to interpret and implement. It is rare, however, to observe behavior dynamics that follow a simple developmental pattern (Walls and Schafer, 2006, p. xiv), because most individual trajectories are complex and nonparametric (see an example in Fig. 1). In most cases, it is also unknown what shape a time-varying relation takes because very few studies have explicitly examined such relations. TVEM, the model we introduce in this paper, addresses this limitation because it requires no a priori constraints on the shape of a modeled relation and, due to its nonparametric nature, assumes only a smooth change pattern.
Fig. 1

A Hypothetical example of the time-varying relationship between negative affect and smoking urges

In the sections that follow, we first describe a motivating example for our analytical work. Further, we present TVEM and apply it to answer a set of empirical questions about the relations of smoking-cessation processes. We outline model-fitting steps, followed by results and interpretations. In the conclusion, we discuss empirical implications of the findings, model advantages, and cautionary points. SAS syntax is shared in the appendices.

A Motivating Example: Changes in Urges to Smoke among Quitters and Relapsers

To facilitate model introduction, we present an empirical example of ILD collected as part of a smoking cessation study (Shiffman et al. 1997, 2000; Shiffman, Hickcox et al. 1996; Shiffman, Paty, et al. 1996). Multiple naturalistic and laboratory studies emphasize the importance of emotion in smoking (Baker et al. 2004; Kassel et al. 2003). It has been demonstrated that negative affect is associated with higher reports of smoking urge and it influences the probability of quitting success (Killen et al. 1991; Niaura et al. 2002; Piasecki et al. 1997). Many smokers report that cigarettes are a coping strategy for reducing stress and dealing with anger, anxiety and other negative emotions (Shadel and Mermelstein 1993; Wetter et al. 1994). Thus, individuals may relapse at times when emotional demands are particularly high. Interestingly, ILD studies examining the association between momentary negative affect and ad lib smoking have generally found no relation (Shiffman 2009), while studies of relapse have demonstrated a relation (Shiffman et al. 1996). Li et al. (2006), however, applied a variation of TVEM to the same data and identified a peak in the strength of the relation between negative affect and smoking urges following a quit attempt, which gradually dissipated over the course of a month following the attempt.

Besides the emotional factors influencing quitting success, beliefs in one’s ability to quit (self-efficacy) play an important role (Cinciripini et al. 1997; Garcia et al. 1990; Gulliver et al. 1995; Gwaltney et al. 2005). Shiffman and colleagues (2002) demonstrated the dynamic nature of self-efficacy, with daily levels of self-efficacy predicting probability for a relapse on a subsequent day. They also demonstrated that most changes in self-efficacy are driven by concurrent smoking behavior, which itself influences subsequent smoking, lapse, and relapse (Baer et al. 1986). Thus, one needs to be cautious when drawing causal inferences between self-efficacy and smoking urges.

The Current Study

In the current study, we explore the time-varying relations between three intensively measured continuous variables: negative affect, self-efficacy, and smoking urges. As smokers almost universally report that they smoke under stress (Brandon 1994), negative affect was expected to influence urges. However, this association may change with time; for example, Baker et al. (1987) suggested that urges would be negatively associated with negative affect during ad lib smoking, but positively associated with it during withdrawal. Theorists have also suggested that urge intensity would be associated with self-efficacy; for example, Marlatt and Gordon (1985) suggested that, during a quit attempt, decreased self-efficacy leads to increased urges, and that this process contributes to progression towards relapse. It is not known how this association changes over time, but both self-efficacy and urges are known to be quite dynamic (e.g., Gwaltney et al. 2005). As negative affect, self-efficacy, and urges are all associated with relapse risk (Gwaltney et al. 2005; Killen et al. 1991; Shiffman and Waters 2004), we sought to assess the dynamic effects of negative affect and self-efficacy on smoking urges following a quit attempt for two groups of smokers: those who were successful at abstaining from smoking during 1 month post-quit (successful quitters) and those who relapsed (relapsers). We examined changes in the strength and directionality of the relation over the first 2 weeks post-quit, because a majority of relapsers were still abstaining during this time frame. We compared the nature of the time-varying relation among relapsers with that in the successful-quitters group.

Smoking Cessation Data

In a smoking-cessation study, smokers who were highly motivated to quit were recruited to participate in an intensive EMA assessment of their smoking-related behaviors (Shiffman et al. 1997, 2000; Shiffman, Hickcox et al. 1996; Shiffman, Paty et al. 1996). Each participant was scheduled to quit 2 weeks into the study. Both before and after the quit attempt, participants responded to random PDA prompts approximately five times a day for a period of up to 1 month, reporting a number of smoking-related behaviors and situational and psychological states. The sample was comprised of 304 smokers, reporting a baseline mean of 27.6 cigarettes per day (SD = 11.9), with a mean of 23.1 years smoked (SD = 9.8), and an average of 16.1 min (SD = 25.6) until their first cigarette in the morning (an indicator of high nicotine dependence). On average, participants were 44.1 years old (SD = 10.0), 57% female, 93% Caucasian, and well educated (71% completed some college). More details about the study procedure and the sample can be found in earlier publications (e.g., Shiffman et al. 2002). Based on the momentary records of smoking behavior after the quit date, 40 individuals initially achieved 24 h of abstinence, and subsequently smoked at least 5 cigarettes per day for 3 consecutive days and, thus, met the study’s definition for relapse (Shiffman, Hickcox et al. 1996; Shiffman, Paty et al. 1996). The 207 individuals who provided post-quit momentary assessments without relapse were considered short-term successful quitters. This group consisted of those who remained smoke-free until the end of the observational period (N = 98) and those who lapsed during the quit period but did not reach the smoking rate of 5 cigarettes per day for 3 consecutive days during the EMA period (N = 109). Fifty seven individuals never quit and were excluded from the analysis.

Among the relapsers, the majority of individuals (55.5%) relapsed by day 14, with time of relapse ranging from day 3 to 24. We limited the exploration to the 2-week post-quit period due to our interest in differences in processes leading to a relapse, desire to avoid contamination of pre-relapse relations with other unrelated processes, and our aim of maintaining a large sample size. For relapsers, a total of 5,569 momentary assessments of negative affect, self-efficacy, and smoking urges were recorded, averaging 139 assessments per person (SD = 60.6) and ranging from 36 to 306. In addition, 24,517 records were provided by the group of successful quitters, averaging 118 assessments per person (SD = 51.1) and ranging from 5 to 255.

Participants rated their smoking urges at the time of a prompt on a 0 to 10 scale (0 = no urge, 10 = extremely strong urge). By design, occasions when participants experienced a higher level of urges were oversampled. At the same time, they reported on their emotional state, responding whether or not they experienced an emotion on a four-point scale (0 = NO!!, 1 = no??, 2 = yes??, 3 = YES!!). Factor analysis revealed a construct that reflected intensity of negative affect and was primarily comprised of eight items: happy, irritable, miserable, tense, content, frustrated-angry, sad, and the overall feeling (Shiffman, Paty, et al. 1996); the scale was bipolar, such that low scores indicated experience of positive affect. Self-efficacy was assessed by a single item “Confident in ability to abstain” on a four-point scale (0 = NO!!, 1 = no??, 2 = yes??, 3 = YES!!). On all three scales, participants used the entire spectrum of responses, thus preventing the restriction of range problem.

An Overview of TVEM

TVEM was introduced in the statistical literature nearly 20 years ago (Hastie and Tibshirani 1993; Hoover et al. 1998). In the area of psychology, Li et al. (2006) demonstrated a variation of the model with applications to smoking. However, despite the abundance of ILD being collected in social and behavioral sciences, models with time-varying effects are not used in practice. This is likely due to the fact that user-friendly software was not available until now, and that the literature has lacked demonstrations of how TVEM could be applied to behavioral data.

To introduce the model conceptually, we provide a hypothetical example in Fig. 1, in which ILD measures of negative affect and smoking urges for a single individual are summarized in the first two panels. To explore variation in the relation between negative affect and smoking urges over time, we split the time scale into three equally spaced intervals. An association between negative affect and smoking urges is positive in the beginning (r = .9), negative in the middle (r = −.8), and absent at the end (r = .05; the bottom panel of Fig. 1). Correlating data from the entire observational period (a similar approach to MLM) yielded a nearly null association between the variables (r = .13). This simplified example demonstrates the importance of considering time when studying the relation between a TVC and a time-varying outcome. Moreover, it makes intuitive sense that the dynamic phenomena studied using ILD might have a time-varying association with correlates, because many ILD studies are designed to elicit or capture changes in behavior.

With TVEM, there is no need to divide time into arbitrary intervals or to assume a linear change pattern. Instead, directionality and strength of association are evaluated along the continuum of a time scale by using multiple individuals in ILD studies. Thus, time is measured on a continuous scale and values of parameter estimates are allowed to change with time.

Considering a simple case of one TVC from the current empirical example on smoking data, TVEM can be formulated in the following way:
$$ S{U_{{ij}}} = {\beta_0}(t) + {\beta_1}(t)*N{A_{{ij}}} + { \in_{{ij}}}, $$
where SUij (smoking urges) and NAij (negative affect) are intensively measured longitudinal variables for a subject i measured at time t. Assessments j can be sampled at different time points across individuals, a feature that differentiates TVEM from traditional functional data analysis methods. The outcome SUij is assumed to be normally distributed. β0 and β0 are intercept and slope parameters, respectively. Making use of intensively sampled phenomenon under investigation, TVEM assumes that any relations described by intercept β0 (t) and slope β1 (t) follow a smooth curve. As a result, both model parameters are functions that summarize relations in forms of curves, with values changing along the time continuum. Thus, β0 (t) corresponds to an intercept function, varying over time. In this example, β0 (t) represents the course of smoking urge intensity over time for a centered value of negative affect (the exact interpretation depends on how negative affect is centered). Similarly, β1 (t) is a slope function describing the progressive time-varying association between negative affect and urges. The shape and magnitude of each function are specified separately, allowing both intercept and slope to flexibly and independently change over time. Because the parameter estimates vary with time, it is helpful to summarize estimates graphically by plotting their values and corresponding confidence intervals. Hypothesis testing can be done in relation to an estimated confidence interval of a function.

The random errors ij in Equation 1 are assumed to be normally distributed. Similarly to MLM, the inter-observation variance structure can be specified in multiple ways (e.g., autoregressive, unstructured; Raudenbush and Bryk 2002; Singer and Willett 2003).

TVEM is a nonparametric model, requiring no constraints on shapes of intercept and slope functions. Instead, shapes are estimated from the available data; the only assumption is that temporal progression happens gradually, in a smooth way (with no sudden peaks or jumps). For model-fitting purposes, the P-spline method is used to estimate shapes of parameter functions. With this flexible approach, a complex function is split into several (usually equally spaced) intervals, and each portion of a function is estimated with a polynomial (in our case, cubic) model. With this method, any complex function can be successfully approximated if a sufficient number of intervals is specified. The splitting points between intervals are referred to as knots. Thus, in the process of model selection, models with a different number of knots (or intervals) and of different complexity are compared. More technical details about model fitting and estimation can be found in Tan et al. (2010).

Model Selection

During model selection, the investigator fits models with different numbers of knots and evaluates values of AIC (Akaike 1974) and BIC (Schwarz 1978). We recommend starting with five knots and inspecting shapes of estimated functions (in practice, it does not make a difference which parameter function - intercept or slope - is specified first). If the resulting function is relatively simple (e.g., a linear function with five knots will still look linear), the number of knots can be gradually reduced, and improvement in model fit is evaluated by decreasing values of AIC and BIC. When the shape of a parameter function is complex, a larger number of knots should yield lower AIC and BIC values. However, when a relation is simple and can be characterized by a familiar shape (e.g., linear or quadratic), the model can and should be simplified. For example, TVEM with zero knots corresponds to a cubic model of the data over the entire interval, because no splitting points are specified. When a cubic model is too complex, the model can be further reduced to represent quadratic, linear, or even a constant shape (e.g., linear with zero slope). Examples of such simplified models arise in our empirical demonstration. The final model is selected based on the lowest AIC and BIC model fit criteria, although, in practice, this may be more complicated, because AIC and BIC often do not agree.


The model described in this paper can be fit in SAS. The macro %TVEM can be downloaded from Analytic steps and syntax for fitting the model described below are summarized in the Appendices.

Applications of TVEM to the Smoking Cessation Data

Specifying the TVEM

To identify the nature of the temporal relations between smoking urges, negative affect, and self-efficacy, we fit the following model to the ILD from the smoking cessation study separately for relapsers and successful quitters1:
$$ S{U_{{ij}}} = {\beta_0}(t) + {\beta_1}(t)*N{A_{{ij}}} + {\beta_2}(t)*S{E_{{ij}}} + {\varepsilon_{{ij}}}. $$
In Equation (2), β0 (t) is the intercept function, which captures an expected smoking urge trajectory for an individual with average levels of negative affect and self-efficacy (SE). Average negative affect was .33 for relapsers and 0 for successful quitters; average self-efficacy was 1.56 points for relapsers and 2.32 for successful quitters.

The slope function β1 (t) characterizes the progressive pattern of the relation between the intensity of urges and negative affect over the period of 2 weeks. Similarly, β2 (t) is a slope function for self-efficacy. Changes in the magnitude and directionality of the relations between negative affect, self-efficacy, and urges, as well as differences between relapsers and successful quitters in parameter functions are of particular interest.

Model Selection

For both models, the first TVEM we fit had five equally spaced knots for each parameter function (i.e., functions for the intercept and the time-varying effects of negative affect and self-efficacy). We first decreased the complexity of the intercept functions by reducing the number of knots. The best fitting intercept functions were selected based on the lowest values of AIC and BIC. Further, holding the intercept functions at the chosen level of complexity, we progressively simplified models for negative effect and self-efficacy in a similar manner until the lowest AIC and BIC indices were identified.

Tables 1 and 2 summarize model-fitting steps for relapsers and successful quitters, respectively. In the process of model selection for relapsers, the reduction in the number of knots resulted only in small changes in AIC and BIC values, suggesting that the complexity of additional knots was not necessary to achieve a good model. Accordingly, striving for the most parsimonious solution, the simplest model was chosen. The final TVEM contained an intercept function that reduced to a constant with no changes over time, a one-knot function for the effect of negative affect, and a three-knot function for the effect of self-efficacy. In comparison, the best-fitting TVEM for successful quitters was substantially more complex, containing an intercept function with four knots, a three-knot function for the effect of negative affect, and a five-knot function for the effect of self-efficacy. Of note, when the smallest values of AIC and BIC corresponded to different models, we relied on BIC, aiming to arrive at the simplest model.
Table 1

Time-varying effect model selection for the group of relapsers: varying the number of knots for intercept and two slope functions

Number of Knots for Intercept, Negative Affect, and Self-Efficacy Functions



Varying Intercept

5, 5, 5



4, 5, 5



3, 5, 5



2, 5, 5



1, 5, 5



cubic, 5, 5



quadratic, 5, 5



linear, 5, 5



constant, 5, 5



Varying Slope for Negative Affect

constant, 4, 5



constant, 3, 5



constant, 2, 5



constant, 1, 5



constant, cubic, 5



Varying Slope for Self-Efficacy

constant, 1, 4



constant, 1, 3



constant, 1, 2



The final model is in bold.

Table 2

Time-varying effect model selection for the group of successful quitters: varying the number of knots for intercept and two slope functions

Number of Knots for Intercept, Negative Affect, and Self-Efficacy Functions



Varying Intercept

5, 5, 5



4, 5, 5



3, 5, 5



Varying Slope for Negative Affect

4, 4, 5



4, 3, 5



4, 2, 5



Varying Slope for Self-Efficacy

4, 3, 4



4, 3, 6



The final model is in bold.

Intercept Function: Smoking Urges over Time for Each Group

Figure 2 presents a graphical summary of the intercept functions for both groups. Conceptually, intercept functions represent the level of urges over time for a typical person in each group (typical - a person with average levels of negative affect and self-efficacy). For relapsers, the average level of smoking urges appears to be stable over time, with a constant intercept parameter of 4.61.
Fig. 2

A graphical summary of intercept functions (with confidence intervals), representing a time-varying level of smoking urges for relapsers (solid line, N = 40) and successful quitters (dashed line, N = 207) with average levels of negative affect and self-efficacy for quitting over the course of 2 weeks post-quit

Smoking urges were at about the same level for successful quitters and relapsers immediately after the quit attempt, judging by an overlap in confidence intervals immediately post cessation (time 0). There was a sizable rapid reduction in urges, dropping from almost 4.5 points to 2.5 points over the course of 2 weeks, which was very different from the level of urges for relapsers. Thus, group differences in smoking urges were detectable within the first few days post-quit.

Time-Varying Effect of Negative Affect on Smoking Urges

Slope functions of the effect of negative affect on smoking urges were similar across the two groups, with confidence bands from parameter functions overlapping across the entire study period (see Fig. 3). For all participants, there was a strong positive association between negative affect and urges immediately after the quit attempt, estimated to be about 1.2; that is, for a one-point increase in negative affect the predicted intensity of urges would increase by 1.2 points. There was a fairly rapid decrease in the influence of negative affect on smoking urges over time, reducing to about .4 by the end of 2 weeks.
Fig. 3

A graphical summary of slope functions of the time-varying effects (with confidence intervals) of negative affect on smoking urges for relapsers (solid line, N = 40) and successful quitters (sashed line, N = 207) over the course of 2 weeks post-quit

Time-Varying Effect of Self-Efficacy on Smoking Urges

Self-efficacy showed a complex association with urges for relapsers (see Fig. 4). Immediately after the quit date, there was no association between self-efficacy and smoking urges. A small negative effect (around −0.5) was detected by around Day 4. In the middle of the second week, the magnitude of the effect increased to about −1.0, but weakened by the end of the observation period. In comparison, there was a strong negative association (around −1.0) between one’s confidence in the ability to abstain from smoking and smoking urges immediately after the quit attempt for successful quitters. The relation remained strong and negative over time for successful quitters.
Fig. 4

A graphical summary of slope functions of the time-varying effects (with confidence intervals) of confidence on smoking urges for relapsers (solid line, N = 40) and successful quitters (dashed line, N = 207) over the course of 2 weeks post-quit


Implications for Smoking Cessation

Findings from the application of TVEM to the smoking cessation study provide unique insight into the nature of processes associated with smoking relapse and their direct comparison with parallel processes in a group of successful quitters. In the current study, TVEM allowed for a detailed description of time-varying relations between negative affect, self-efficacy, and smoking urges in the crucial post-quit period. Our findings demonstrate that the nature of relations between TVCs and smoking urges differed substantially between individuals who ultimately relapsed to regular cigarette use and those who did not.

For successful quitters, there was a smooth and steady drop in the intensity of smoking urges during the first 2 weeks post-quit, reducing from approximately 4.5 to 2.5. This is consistent with the findings that urge intensity decreases over time (Shiffman et al. 1997) and also with earlier findings suggesting that this occurs only with abstinence (Shiffman and Jarvik 1976; note, though, that some of the successful quitters in the analysis engaged in occasional lapses to smoking). Quitters showed a consistent, strong negative association over time between their confidence in ability to abstain from smoking and their urges, such that greater momentary self-efficacy corresponded to lower urges. This suggests the notion that confidence in abstaining might protect one from strong urges (Gwaltney et al. 2005), and that decreased efficacy promotes urges (Marlatt and Gordon 1985). A complimentary explanation is that strong urges undermine self-efficacy or, conversely, that experiencing low urge levels helps build confidence (Gwaltney et al. 2009). A more definite answer about the directionality of the effect should be explored in the future through studies of the lagged relationship. Since ILD were collected at random time intervals during the waking time, there was no simple way of exploring the directionality in the effect because the time periods between adjacent assessments were constantly varying. We pursued a simpler model of contemporaneous effects for TVEM demonstration.

The relapsers showed a more complex pattern, in which self-efficacy was initially unrelated to urges, only beginning to show a negative association at about Day 4 and reverting to the null near the end of the 14-day observation period. For these relapsers, who are progressively back-sliding into smoking, this may reflect a process in which increased smoking, despite the attempts to abstain, leads to both decreased self-efficacy (Gwaltney et al. 2009) and increased urges. As they relapse, with smoking becoming more routine and approaching the ad lib level, self-efficacy may become less linked to current smoking behavior or urges, perhaps coming to reflect more global beliefs about the self, as it does among smokers who are not in the midst of a quit effort.

Both groups demonstrated high levels of association between negative affect and the intensity of smoking urges right after the quit attempt, consistent with the theory that negative affect may be the driving force of smoking urges post-quit (Baker et al. 1987). Previous research demonstrates that the post-quit period is generally characterized by high nicotine withdrawal symptoms and high negative affect (Shiffman and Jarvik 1976; Shiffman, Paty et al. 1996). Thus, the strong association between negative affect and smoking urges is expected. The new finding is that both groups exhibited a consistent decrease with time in the strength of the association, such that these two constructs essentially decoupled as time passed. However, the process underlying this shift may differ for the two groups. Among the successful quitters, it may indicate the resolution of the affective disturbances associated with primary nicotine withdrawal, and a shift from withdrawal to external cues as the primary driver of smoking urges (Shiffman et al. 1996). For relapsers, it may reflect a trajectory towards routine ad lib smoking, during which urges have been posited to be associated with positive affect (Baker et al. 1987).

Taken together, the findings on negative affect, self-efficacy, and smoking urges suggest that careful monitoring of the trajectory of individuals’ urges in the days immediately post-quit may provide an important indication of who is likely to relapse during that first month. Also, individuals who show little association between self-efficacy and urges during the first week post-quit may merit close monitoring for relapse. Individuals who demonstrate either of these characteristics might benefit from an early intervention. By identifying quitters at high risk for relapse, resources may be directed to the group that has a higher need for support.

Advantages and Limitations of TVEM for Studying Dynamic Processes

The TVEM introduced in this paper is designed to address a unique research question, concerned with the dynamic relations between intensively measured covariates and a time-varying outcome. TVEM is unique in that it allows exploration of time-varying relations without imposing parametric constrains. Instead, it estimates a smooth function, the values of which change over time. While development of some processes may be more erratic (for instance, a discontinuity in smoking behavior, as might occur after an initial lapse, is likely to follow a step-wise function), functions representing associations between outcomes and covariates may be more likely to follow a smooth pattern of change. In addition, TVEM is flexible enough to account for sudden changes through specification of a higher number of knots and their placement at time junctions where sudden shifts are hypothesized to occur (see %TVEM documentation at

TVEM is considerably different from MLM, the most widely used method of ILD analysis. MLM generally estimates an average effect of a TVC on an ILD outcome across the entire observational period, assuming that the effect of a covariate is stable over time. Instead, TVEM makes use of the dynamic nature of processes and their associations. For example, rather than estimating an overall effect of a TVC (such as self-efficacy) on an outcome (such as smoking urges), TVEM allows for the effect of self-efficacy on smoking urges to be dynamic. In other words, in addition to both constructs being time-varying, their association is time-varying as well.

The model described here can be readily extended to address a variety of more nuanced research questions. For example, time-invariant covariates (e.g., gender2) can be incorporated in the model such that their effects can vary over time as well. In addition to allowing for an examination of the salience of static characteristics on a developing process, this flexibility raises the intriguing possibility of looking at the dynamic effect of a treatment program over time and identifying hinge points where treatment effects change. This could suggest strategic points at which booster sessions of a program might be best implemented in order to maximize long-term effectiveness.

One needs to keep in mind that all nonparametric methods, including TVEM, can yield results that are somewhat specific to the particular data being modeled. Since no parametric shapes of model functions (e.g., linear) are assumed, estimation is driven by relations in observed data. Thus, it is of primary importance to consider the study design and data quality (e.g., sample size, sample representativeness) when generalizing beyond a specific sample. In addition, theory should guide the process of model specification and selection to improve external validity of findings.

In the empirical example, we carried out the analysis separately for groups of relapsers and successful quitters in order to allow for differences between groups in all model parameter functions. This was done to keep the model simple and limit the number of parameter estimates. One limitation to this approach is that statistical power differed across groups due to the variation in group sizes (N = 207 for successful quitters with 24,517 momentary assessments and N = 40 for relapsers with 5,569 momentary assessments). This explains why confidence bands around parameter estimates for relapsers are wider than those for successful quitters. This may also partially explain why a substantially more complex model was selected for the successful quitters and why the fit indices for relapsers were close across competing models. The issue of statistical power for TVEM and, more generally, for the analysis of ILD deserves much consideration in future research. TVEM is a new method that has not been extensively applied to empirical ILD; a number of other practical issues remain unexplored, including the impact of missing data and the effect of inter-subject heterogeneity on the stability of model parameter estimates. Empirical and theoretical studies are needed to address these issues.


Exciting work remains to expand TVEM to accommodate even richer research questions. For example, inclusion of random effects could inform researchers about between-person variations in time-varying parameter functions. The state-of-the-art in methodology for analyzing ILD, such as ecological momentary assessments, is changing rapidly. New methods, such as the model described in this study, are just now becoming available to applied scientists. As demonstrated here, TVEM is straightforward to apply, and the procedure is freely available for download as a SAS macro. As systems unfold, new research questions surrounding dynamic processes will be posed – and answered – as applied scientists begin to use this and related methods in their research.


  1. 1.

    It is possible to include a binary indicator of relapse status in a single model for smoking urges. In the current study, however, our goal was to describe the entire system of time-varying relations within each group. By fitting separate models, we essentially allowed relapse state to moderate every aspect of the TVEM.

  2. 2.

    The time-varying effect of gender was tested for both groups. For relapsers, the overall effect was zero. For successful quitters, a model with three knots fit best, although the overall effect was very small. Specifically, the non-zero relation between gender and intensity of smoking urges did not emerge until day 10, with women reporting urges about .2 points higher than men.


Author Note

The authors would like to thank Linda Collins, John Dziak, Charu Mathur, C.J. Powers, and Violet (Shu) Xu for comments on earlier drafts of this manuscript, and Amanda Applegate for her editorial suggestions. The work of Shiyko, Lanza, Tan, & Li was supported by the National Institute on Drug Abuse grant P50 DA010075-14 and R21 DA024260. The work of Shiffman was supported by the National Institute on Drug Abuse grant DA06084. The content of this manuscript is solely the responsibility of the authors and does not necessarily represent the official views of the National Institute on Drug Abuse or the National Institutes of Health.


  1. Akaike, H. (1974). A new look at the statistical model identification. IEEE Transactions on Automatic Control, 19, 716–723.CrossRefGoogle Scholar
  2. Baer, J. S., Holt, C. S., & Uchtenstein, E. (1986). Self-efficacy and smoking reexamined: Construct validity and clinical utility. Journal of Consulting and Clinical Psychology, 54, 846–852.PubMedCrossRefGoogle Scholar
  3. Baker, T. B., Morse, E., & Sherman, J. E. (1987). The motivation to use drugs: A psychobiological analysis of urges. In P. C. Rivers (Ed.), The Nebraska symposium on motivation: Alcohol use and abuse (pp. 257–232). Lincoln: University of Nebraska Press.Google Scholar
  4. Baker, T. B., Piper, M. E., McCarthy, D. E., Majeskie, M. R., & Fiore, M. C. (2004). Addiction motivation reformulated: An affective processing model of negative reinforcement. Psychological Review, 111, 33–51.PubMedCrossRefGoogle Scholar
  5. Berkman, E. T., Dickenson, J., Falk, E. B., & Lieberman, M. D. (2011). Using SMS text messaging to assess moderators of smoking reduction: Validating a new tool for ecological measurement of health behaviors. Health Psychology, 30, 186–194.PubMedCrossRefGoogle Scholar
  6. Bolger, N., Davis, A., & Rafaeli, E. (2003). Diary methods: Capturing life as it is lived. Annual Review of Psychology, 54, 579–616.PubMedCrossRefGoogle Scholar
  7. Brandon, T. H. (1994). Negative affect as motivation to smoke. Current Directions in Psychological Science, 3, 33–37.CrossRefGoogle Scholar
  8. Cinciripini, P. M., Wetter, D. W., & McClure, J. B. (1997). Scheduled reduced smoking: Effects on smoking abstinence and potential mechanisms of action. Addictive Behaviors, 22, 759–767.PubMedCrossRefGoogle Scholar
  9. Ebner-Priemer, U. W., Kubiak, T., & Pawlik, K. (2009). Ambulatory assessment. European Psychologist, 14, 95–97.CrossRefGoogle Scholar
  10. Fahrenberg, J., Myrtek, M., Pawlik, K., & Perrez, M. (2007). Ambulatory assessment - Monitoring behavior in daily life settings: A behavioral-scientific challenge for psychology. European Journal of Psychological Assessment, 23, 206–213.CrossRefGoogle Scholar
  11. Garcia, M. E., Schmitz, J. M., & Doerfler, L. A. (1990). A fine-grained analysis of the role of self-efficacy in self-initiated attempts to quit smoking. Journal of Consulting and Clinical Psychology, 58, 317–322.PubMedCrossRefGoogle Scholar
  12. Gulliver, S. B., Hughes, J. R., Solomon, L. J., & Dey, A. N. (1995). Self-efficacy and relapse to smoking in self-quitters. Addiction, 90, 767–772.PubMedCrossRefGoogle Scholar
  13. Gwaltney, C. J., Metrik, J., Kahler, C. W., & Shiffman, S. (2009). Self-efficacy and smoking cessation: A meta-analysis. Psychology of Addictive Behaviors, 23, 56–66.PubMedCrossRefGoogle Scholar
  14. Gwaltney, C. J., Shiffman, S., Balabanis, M. H., & Paty, J. A. (2005). Dynamic self-efficacy and outcome expectancies: Prediction of smoking lapse and relapse. Journal of Abnormal Psychology, 114, 661–675.PubMedCrossRefGoogle Scholar
  15. Hastie, T., & Tibshirani, R. (1993). Varying-coefficient models. Journal of the Royal Statistical Society. Series B (Methodological), 55, 757–779.Google Scholar
  16. Hoover, D. R., Rice, J. A., Wu, C. O., & Yang, L. P. (1998). Nonparametric smoothing estimates of time-varying coefficient models with longitudinal data. Biometrika, 85, 809–822.CrossRefGoogle Scholar
  17. Kassel, J. D., Stroud, L. R., & Paronis, C. A. (2003). Smoking, stress, and negative affect: correlation, causation, and context across stages of smoking. Psychological Bulletin, 129, 270–304.PubMedCrossRefGoogle Scholar
  18. Killen, J. D., Fortmann, S. P., Newman, B., & Varady, A. (1991). Prospective study of factors influencing the development of craving associated with smoking cessation. Psychopharmacology, 105, 191–196.PubMedCrossRefGoogle Scholar
  19. Larson, R., & Csikszentmihalyi, M. (1983). The experience sampling method. New Directions for Methodology of Social and Behavioral Science, 15, 41–56.Google Scholar
  20. Li, R., Root, T. L., & Shiffman, S. (2006). A local linear estimation procedure of functional multilevel modeling. In T. Walls & J. L. Schafer (Eds.), Models for intensive longitudinal data (pp. 63–83). New York: Oxford University Press.CrossRefGoogle Scholar
  21. Marlatt, G. A., & Gordon, J. R. (1985). Relapse prevention: Maintenance strategies in the treatment of addictive behaviors. New York: Guilford Press.Google Scholar
  22. McCarthy, D. E., Piasecki, T. M., Fiore, M. C., & Baker, T. B. (2006). Life before and after quitting smoking: an electronic diary study. Journal of Abnormal Psychology, 115, 454–466.PubMedCrossRefGoogle Scholar
  23. Niaura, R., Shadel, W. G., Britt, D. M., & Abrams, D. B. (2002). Response to social stress, urge to smoke, and smoking cessation. Addictive Behaviors, 27, 241–250.PubMedCrossRefGoogle Scholar
  24. Piasecki, T. M. (2006). Relapse to smoking. Clinical Psychology Review, 26, 196–215.PubMedCrossRefGoogle Scholar
  25. Piasecki, T. M., Fiore, M. C., McCarthy, D. E., & Baker, T. B. (2002). Have we lost our way? The need for dynamic formulations of smoking relapse proneness. Addiction, 97, 1093–1108.PubMedCrossRefGoogle Scholar
  26. Piasecki, T. M., Kenford, S. L., Smith, S. S., Fiore, M. C., & Baker, T. B. (1997). Listening to nicotine: Negative affect and the smoking withdrawal conundrum. Psychological Science, 8, 184.CrossRefGoogle Scholar
  27. Raudenbush, S. W., & Bryk, A. S. (2002). Hierarchical linear models: Applications and data analysis methods (2nd ed.). Thousand Oaks, CA: Sage.Google Scholar
  28. Rodgers, A., Corbett, T., Bramley, D., Riddell, T., Wills, M., Lin, R. B., et al. (2005). Do u smoke after txt? Results of a randomised trial of smoking cessation using mobile phone text messaging. Tobacco Control, 14, 255–261.PubMedCrossRefGoogle Scholar
  29. Schwarz, G. E. (1978). Estimating the dimension of a model. Annals of Statistics, 6, 461–464.CrossRefGoogle Scholar
  30. Schwartz, J. E., & Stone, A. A. (1998). Strategies for analyzing ecological momentary assessment data. Health Psychology, 17, 6–16.PubMedCrossRefGoogle Scholar
  31. Schwartz, J. E., & Stone, A. A. (2007). The analysis of real-time momentary data: A practical guide. In A. A. Stone, S. Shiffman, A. A. Atienza, & L. Nebeling (Eds.), The science of real-time data capture: Self-reports in health research (pp. 76–113). New York: Oxford University Press.Google Scholar
  32. Shadel, W. G., & Mermelstein, R. J. (1993). Cigarette smoking under stress: The role of coping expectancies among smokers in a clinic-based smoking cessation program. Health Psychology, 12, 443–450.PubMedCrossRefGoogle Scholar
  33. Shiffman, S. (2005). Dynamic influences on smoking relapse process. Journal of Personality, 73, 1715–1748.PubMedCrossRefGoogle Scholar
  34. Shiffman, S. (2009). Ecological momentary assessment (EMA) in studies of substance use. Psychological Assessment, 21, 486–497.PubMedCrossRefGoogle Scholar
  35. Shiffman, S., Balabanis, M. H., Paty, J. A., Engberg, J., Gwaltney, C. J., Liu, K. S., et al. (2000). Dynamic effects of self-efficacy on smoking lapse and relapse. Health Psychology, 19, 315–323.PubMedCrossRefGoogle Scholar
  36. Shiffman, S., Engberg, J. B., Paty, J. A., Perz, W. G., Gnys, M., Kassel, J. D., et al. (1997). A day at a time: Predicting smoking lapse from daily urge. Journal of Abnormal Psychology, 106, 104–116.PubMedCrossRefGoogle Scholar
  37. Shiffman, S., Gnys, M., Richards, T., Paty, J. A., Hickcox, M., & Kassel, J. D. (1996). Temptations to smoke after quitting: A comparison of lapsers and maintainers. Health Psychology, 15, 455–461.PubMedCrossRefGoogle Scholar
  38. Shiffman, S., Gwaltney, C. J., Balabanis, M. H., Liu, K. S., Paty, J. A., Kassel, J. D., et al. (2002). Immediate antecedents of cigarette smoking: An analysis from ecological momentary assessment. Journal of Abnormal Psychology, 111, 531–545.PubMedCrossRefGoogle Scholar
  39. Shiffman, S., Hickcox, M., Paty, J. A., Gnys, M., Kassel, J. D., & Richards, T. J. (1996). Progression from a smoking lapse to relapse: Prediction from abstinence violation effects, nicotine dependence, and lapse characteristics. Health Psychology, 64, 993–1002.Google Scholar
  40. Shiffman, S., & Jarvik, M. (1976). Smoking withdrawal symptoms in two weeks of abstinence. Psychopharmacology, 50, 35–39.PubMedCrossRefGoogle Scholar
  41. Shiffman, S., Paty, J. A., Gnys, M., Kassel, J. A., & Hickcox, M. (1996). First lapses to smoking: Within-subjects analysis of real-time reports. Journal of Consulting & Clinical Psychology, 64, 366–379.CrossRefGoogle Scholar
  42. Shiffman, S., Stone, A. A., & Hufford, M. R. (2008). Ecological momentary assessment. Annual Review of Clinical Psychology, 4, 1–32.PubMedCrossRefGoogle Scholar
  43. Shiffman, S., & Waters, A. J. (2004). Negative affect and smoking lapses: A prospective analysis. Journal of Consulting and Clinical Psychology, 72, 192–201.PubMedCrossRefGoogle Scholar
  44. Singer, J. D., & Willett, J. B. (2003). Applied longitudinal data analysis: Modeling change and event occurrence. New York: Oxford University Press.Google Scholar
  45. Smyth, J. M., & Stone, A. A. (2003). Ecological momentary assessment research in behavioral medicine. Journal of Happiness Studies, 4, 35–52.CrossRefGoogle Scholar
  46. Stone, A. A., & Shiffman, S. (1994). Ecological momentary assessment (EMA) in behavioral medicine. Annals of Behavioral Medicine, 16, 199–202.Google Scholar
  47. Tan, X., Shiyko, M. P., Li, R., Li, Y., & Dierker, L. (2010). Intensive longitudinal data and model with varying effects (Technical Report No. 10–106). University Park, PA: The Methodology Center, The Pennsylvania State University.Google Scholar
  48. Trull, T. J., & Ebner-Priemer, U. W. (2009). Using experience sampling methods/ecological momentary assessment (ESM/EMA) in clinical assessment and clinical research: Introduction to the special section. Psychological Assessment, 21, 457–462.PubMedCrossRefGoogle Scholar
  49. Van Zundert, R. M. P., Boogerd, E. A., Vermulst, A. A., & Engels, R. C. M. E. (2009). Nicotine withdrawal symptoms following a quit attempt: An ecological momentary assessment study among adolescents. Nicotine & Tobacco Research, 11, 722–729.CrossRefGoogle Scholar
  50. Walls, T. A., & Schafer, J. L. (Eds.) (2006). Modeling for intensive longitudinal data. New York, NY: Oxford University Press.Google Scholar
  51. Wetter, D. W., Smith, S. S., Kenford, S. L., Jorenby, D. E., Fiore, M. C., Hurt, R. D., et al. (1994). Smoking outcome expectancies: Factor structure, predictive validity, and discriminant validity. Journal of Abnormal Psychology, 103, 801–811.PubMedCrossRefGoogle Scholar

Copyright information

© Society for Prevention Research 2012

Authors and Affiliations

  • Mariya P. Shiyko
    • 1
  • Stephanie T. Lanza
    • 2
  • Xianming Tan
    • 2
  • Runze Li
    • 3
  • Saul Shiffman
    • 4
  1. 1.Department of Counseling & Applied Educational PsychologyBouve College of Health Sciences, Northeastern UniversityBostonUSA
  2. 2.The Methodology CenterState CollegeUSA
  3. 3.Department of Statistics and The Methodology CenterThe Pennsylvania State UniversityUniversity ParkUSA
  4. 4.Departments of Psychology, Psychiatry, and Pharmaceutical SciencesUniversity of PittsburghPittsburghUSA

Personalised recommendations