The time-varying effect model (TVEM) allows scientists to use intensive longitudinal data (ILD) to observe change over time in the factors that influence an outcome. For example, when a person is trying to quit smoking, successful quitting is influenced by a number of factors, including mood, belief in one's ability to quit, and stress level. With TVEM, we can model the changes in these relationships which will allow us to see when and under what circumstances a quitter might need additional support in order to succeed.

### Conceptual Introduction

### Introductory Example: TVEM Applied to Smoking-Cessation Data

In this example, researchers analyze data from a smoking-cessation program using a time-varying effect model (TVEM). TVEM allows the researchers to see the change over time in the relationships between a successful quit and personal factors such as cigarette craving and belief in one's ability to quit. This information could be used to develop early intervention cues for people quitting smoking who are in danger of relapsing.

### Data Set: EMA Study of Smokers Trying to Quit

- Smokers were prompted to report at 5 random times each day on a cell phone. This is called ecological momentary assessment (EMA).
- Data were collected 2 weeks pre-quit and 2 weeks post-quit
- 304 smokers
- Baseline mean = 27.6 cigarettes/day

### Structure of the Model

Many complex factors are involved in problem behaviors. Many scientists study factors in a model that vary over time. However, traditional methods assume that the * effects* of these covariates are consistent. TVEM allows scientists to measure the time-varying effects of covariates.

#### Time-Invariant Covariates vs. Time-Varying Covariates

Covariates are variables of scientific interest because they may have an impact on the outcome of interest. These can be things that are constant or changing. If we study the process of quitting smoking, craving is a covariate, because it impacts the outcome. Cravings are time-varying covariates because they come and go almost constantly. Other items, like gender, may impact how much someone smokes while trying to quit, but a person's gender is highly unlikely to change. For that reason, gender is considered a time-invariant covariate. NOTE: In the larger example on this page, gender is not considered in the model. It is only mentioned here to illustrate the difference.

#### Time-Invariant Effects vs. Time-Varying Effects

The* effect* of a covariate can also vary (regardless of whether the covariate is time-varying or time-invariant). For example, in a hypothetical obesity intervention, let's imagine that over the eighteen weeks of the program, 50% of men and 65% of women complete the program. In this case, gender would be a time-invariant covariate. This is useful information, but imagine that, during the first 4 weeks of the study 30% of men and 30% of women drop out. However, during the last 4 weeks, 20% of the men drop out and only 5% of the women drop out. If this were true, it would indicate that the effect of gender on adhering to the program varied tremendously in weeks 5 through 8. In this example, gender is still a time-invariant covariate, but it has a *time-varying effect*. In an instance like this researchers may want to examine the intervention to see if anything can be done to retain men during the latter half of the intervention. Alternately, if men were slightly more likely to drop out at every point in the study than women, gender would have a time-invariant effect.

#### Outcomes Can Vary Over Time

Outcomes are the last moving piece: they can also change over time. For example, a person who is trying to quit may smoke different numbers of cigarettes on different days.

#### Other Significant Attributes of Intensive Longitudinal Data (ILD)

ILD have a multi-level structure.

Also, effects vary between individuals.

**Data have a multilevel structure**. For example, occasions are nested within individuals, who are nested within families, and families are nested within communities.**Effects vary not only across time but also between individuals.**Different people may be affected differently by certain situations. For example, the relationship between mood and daily smoking may change over time and vary across individuals, because some people smoke in enjoyable social situations but others smoke when they are alone and under stress.**The population may be a combination of several discrete latent subpopulations.**This is related to the previous attributes. For example, mood may have a strong effect on urge to smoke for some smokers and a weak effect on others. If there are qualitatively different groups in a population, then this should be taken into account in the model.**The structure of the error process changes over time**. The error variance may dramatically change over time, making the classic linear modeling assumption of a constant variance term untenable.

### The Generalized Mathematical Model

Time-varying effect models (TVEMs) are a natural extension of linear regression models.

### Results and Model Flexibility

The model is able to incorporate time-varying effects and time-invariant effects. In this study, one of the most interesting results related to the way that smoking urges changed over time for successful quitters, compared to those who eventually relapsed. For both groups, urge to smoke started out high, but for successful quitters, the urges decreased steadily for several days and then continued to decrease slowly. For relapsers, the urge to smoke never decreased. Thus, researchers learned that early intervention may be warranted for quitters whose urges do not decrease in the first few days.

The modeling of time-varying effects in %TVEM can help remove bias from analysis of complex data. Sometimes while analyzing data, scientists make assumptions about the constancy of relationships or the shape of a curve without any knowledge of the true shape of the curve.

If a scientist assumes linearity and is wrong, the results will be biased. So, when researchers have no reason to assume a specific shape of the curve, %TVEM can help you avoid this potential source of bias. The %TVEM macro builds models based on the characteristics of the data, not on a priori assumptions.

**Reference**

Shiyko, M. P., Lanza, S. T., Tan, X., Li, R., & Shiffman, S. (2012). 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. Prevention Science. PMCID: PMC3372905 doi: 10.1007/s11121-011-0264-z View abstract

### What Would Scientists Have Done Without TVEM?

The standard for modeling longitudinal data is a growth curve model. Obviously, there are many valuable applications of growth curve models, but the advantage of ILD or EMA data is that it can capture complex relationships and processes. While a growth curve model ignores this complexity, TVEM embraces it.

### Current and Future Applications of TVEM

A list of our current work on ILD and TVEM can be found on our ILD research page.

In the future, the capacity to measure and model time-varying effects could alter the future of behavioral interventions. The better we understand complex relationships, the better able we will be to understand where problems arise and how to intervene at critical moments.