Skip to main content
Translational Behavioral Medicine logoLink to Translational Behavioral Medicine
. 2020 Nov 7;11(4):912–920. doi: 10.1093/tbm/ibaa107

An empirical example of analysis using a two-stage modeling approach: within-subject association of outdoor context and physical activity predicts future daily physical activity levels

Chih-Hsiang Yang 1,, Jaclyn P Maher 2, Aditya Ponnada 3, Eldin Dzubur 4, Rachel Nordgren 5, Stephen Intille 3, Donald Hedeker 6, Genevieve F Dunton 7
PMCID: PMC8521720  PMID: 33159452

Abstract

People differ from each other to the extent to which momentary factors, such as context, mood, and cognitions, influence momentary health behaviors. However, statistical models to date are limited in their ability to test whether the association between two momentary variables (i.e., subject-level slopes) predicts a subject-level outcome. This study demonstrates a novel two-stage statistical modeling strategy that is capable of testing whether subject-level slopes between two momentary variables predict subject-level outcomes. An empirical case study application is presented to examine whether there are differences in momentary moderate-to-vigorous physical activity (MVPA) levels between the outdoor and indoor context in adults and whether these momentary differences predict mean daily MVPA levels 6 months later. One hundred and eight adults from a multiwave longitudinal study provided 4 days of ecological momentary assessment (during baseline) and accelerometry data (both at baseline and 6 month follow-up). Multilevel data were analyzed using an open-source program (MixWILD) to test whether momentary strength between outdoor context and MVPA during baseline was associated with average daily MVPA levels measured 6 months later. During baseline, momentary MVPA levels were higher in outdoor contexts as compared to indoor contexts (b = 0.07, p < .001). Participants who had more momentary MVPA when outdoors (vs. indoors) during baseline (i.e., a greater subject-level slope) had higher daily MVPA at the 6 month follow-up (b = 0.09, p < .05). This empirical example shows that the subject-level momentary association between specific context (i.e., outdoors) and health behavior (i.e., physical activity) may contribute to overall engagement in that behavior in the future. The demonstrated two-stage modeling approach has extensive applications in behavioral medicine to analyze intensive longitudinal data collected from wearable sensors and mobile devices.

Keywords: Experience sampling methods, Environmental context, Random subject effects, Intensive longitudinal data, Mixed-effects model


Implications.

Practice: The findings of time-sensitive coupling between context and activity, and its relation with future activity levels can be used by practitioners to better understand which contexts are most conducive for promoting healthy behaviors in everyday life.

Policy: Results from the empirical case example can help policy makers to evaluate whether findings from research or interventions are dependent on specific psychological, social, or physical contexts.

Research: Researchers can apply the two-stage modeling approach on intensive longitudinal data to answer new research questions that involve subject-level random effects as covariates to impact health outcomes.

INTRODUCTION

Adults are recommended to engage in regular moderate-to-vigorous physical activity (MVPA) for at least 150 min per week to prevent chronic disease [1]. However, a substantial proportion of the U.S. population participates in less MVPA than is recommended. Only about half of the adults (ages 18 or above) meet the national MVPA guidelines [2]. Engaging in physical activity regularly and consistently in everyday settings is challenging because factors that facilitate physical activity may vary over time and across different daily contexts [3]. Existing theoretical frameworks have depicted the relations between health behavior (e.g., physical activity) and various contextual factors. For example, the social-ecological model and the behavior setting theory not only consider the impact of individual factors (e.g., psychological states) but also recognize the influences of social (e.g., interactions with others) and physical contexts (e.g., outdoor environment) on health behaviors [4,5]. To promote public health, understanding and assessing adults’ constantly changing context in which physical activity occurs is critical to developing context-specific interventions for behavior change [6–8]. Among all the critical contexts that impact adults’ physical activity engagement, this study focuses on outdoor context and presents a novel analytic example to understand how the association between outdoor (vs. indoor) context and physical activity levels in adults play a role in shaping their future physical activity levels.

Self-report measures have been used to understand the general physical locations of physical activity engagement in U.S. adults. A national population-level survey revealed that about half of the sports and exercise bouts occurred outdoors or at home, regardless of sex, age, race/ethnicity, seasons, and day of the week [9]. Emerging research using mobile technology has further established the temporal association between a variety of time-varying contextual factors and physical activity, including whether people are actually active in outdoor versus nonoutdoor environments [10]. For example, a study using wearable camera to capture adults’ accelerometer-based physical activity episodes found that more than half (59%) of the episodes occurred outdoors [11]. A study combining ecological momentary assessment (EMA) and accelerometers further showed that male adults had more MVPA when in outdoor park settings, whereas female adults had more MVPA in outdoor home-based locations, such as yard or driveway [12]. More recently, a novel multicities study combining Geographic Information Systems, Global Positioning System (GPS), and an objective physical activity measure using smartphone accelerometers also revealed that having greater access to residential natural outdoor environments was linked to more physical activity in those outdoor spaces [13].

These studies suggest that, in general and, perhaps, not surprisingly, adults tend to participate in higher-intensity activities when they are outdoors as compared to nonoutdoor contexts; and this overall trend across adults can be characterized as a nomothetic (i.e., fixed) effect. However, there may be considerable heterogeneity in the extent to which adults’ physical activity levels are contingent upon the context in which they occur. For example, some adults may be primarily inactive regardless of their context, and others may engage in most of their physical activity indoors (i.e., at a fitness center or gym) rather than outdoors. These differences in the degree of strength between specific context and physical activity can be characterized as idiographic (i.e., random) effects. While it might be useful to know whether the intensity of one’s physical activity is contingent upon the context, what may be even more useful for health promotion is the extent to which this context-activity contingency is predictive of their future physical activity maintenance or other health outcomes. Having a stronger association between physical activity and contexts may reflect stronger physical activity habits as behavior can be automatically cued by features of those contexts [14,15]. In contrast, those whose physical activity is less related to specific contexts may engage in behavior patterns that are primarily driven by cognitively based deliberative decision-making processes, which may be vulnerable to adoption failure or relapse [16]. Understanding whether the differences in the momentary context contingency of health behavior predicts future engagement in that behavior or other health outcomes may lead to the development of new theories and interventions that take context into account.

However, answering these types of scientific questions has proven difficult thus far due to limitations in the types of statistical models and software that are available. To date, statistical models have been limited in their ability to test whether subject-level slopes (i.e., within-subject associations between time-varying predictors and time-varying outcomes) are associated with subject-level outcomes (e.g., overall physical activity levels or the presence of a disease) using intensive longitudinal data. The recent development of a two-stage joint modeling approach combining a mixed-effects model (at Stage 1) with a single-level linear regression model (at Stage 2) using the MixWILD program enables the identification of subject-level parameters (i.e., random effects) to predict health outcomes at the same subject level [17,18]. MixWILD is an open-source and user-friendly program (with point-and-click graphical user interface) available to the public for analyzing intensive longitudinal data (available at https://reach-lab.github.io/MixWildGUI/).

Unlike standard multilevel models, which assume that the variances (and covariances) of the random effects are homogeneous across subjects, the MixWILD program can relax this assumption and allow subject-level variances (i.e., intercept, slope[s], and scale variances) of time-varying variables to be modeled as covariates to predict an outcome [17]. A subject-level intercept represents each individual’s estimated mean level of a time-varying (or momentary) variable across all occasions (e.g., mean physical activity); a subject-level slope represents the estimated association between two time-varying variables within each individual (e.g., the momentary association between context and activity levels); and a subject-level scale represents the estimated degree of variation (or fluctuation) of a time-varying variable for each individual (e.g., variation in momentary physical activity levels over time). Thus, the differences between subjects are represented by the differences in these subject-level intercepts, slopes, and scales. A few recent EMA studies have used this two-stage modeling approach in MixWILD to examine the impact of subject-level random effects (i.e., the variability of intercept and scale) in time-varying variables (i.e., physical activity levels and affect) on health-related outcomes (i.e., mental health and obesity risk) using EMA data [19,20]. However, no study to date has tested the influence of the subject-level “slope” random effect between two time-varying variables on health outcomes.

In this paper, we present an empirical case study to demonstrate how the two-stage modeling approach available in the MixWILD software can estimate variability in subject-level slopes as a covariate to predict a subject-level outcome. Specifically, we will show how this modeling strategy can be used to determine whether adults’ differences in the context contingency of physical activity (i.e., random slope effect of being outdoors [vs. indoors] on momentary physical activity levels) predict their overall physical activity levels 6 months later. Data from a longitudinal study combining smartphone-based EMA and accelerometry-based physical activity monitoring were analyzed using MixWILD. Based on the geographical and climatic features of this study (conducted in California) and the theories depicting the context-contingency of behavioral habits [15,21], it is hypothesized that participants who had a stronger within-subject association between outdoor context (vs. indoor) and the momentary physical activity levels in those contexts (i.e., more context contingent) would be more physically active overall 6 months later.

METHODS

Participants

The current study analyzed EMA and accelerometry activity data from racially/ethnically diverse adults (N = 108) who participated in a multiwave longitudinal study (Project MOBILE) [22]. Participants’ mean age was 40.3 years (standard deviation = 9.71, range = 27–73 years), and most of them were female (73%) and were married (66%). Approximately, half of them were White/Caucasian (47%), and more than two thirds of them were non-Hispanic/Latino (70%). Participants were all living around San Bernardino County, California. Recruitment channels included posters and flyers placed at community locations and given out at community events, letters sent to places of residence, study advertisements printed in local newsletters and newspapers, and references from other research studies. Adults who were eligible to participate were scheduled to meet with the research staff for a study training session at a local community site or their home. The institutional review board reviewed and approved all study protocols. A general description of the study design and participant characteristics are presented in Table 1.

Table 1.

General description of participant characteristics and EMA study design

Study n Participant
characteristics
EMA
Design
Inclusion
criteria
Exclusion
criteria
Average
compliance
rate to EMA prompts
Provided 4 days of valid accelerometer data
Project MOBILE 116 Healthy adults
Mean age = 40.3 years (range: 27–73 years)
73% Female
66% Married
31% Hispanic
34% Normal/underweight
33% Overweight
33% Obese
Three measurement waves
(baseline,
6 months, and 12 months);
4 days of EMA per wave
(i) Living in Chino, CA, or a surrounding community
(ii) Age of 28 years or older
(iii) Able to answer electronic EMA surveys while at work
(i) Annual household income greater than $210,000
(ii) Regularly performed more than 150 min per week of physical activity or exercise
(iii) Had physical limitations that enabled them to exercise
82%
(range: 25%–100%)
89%

Valid ecological momentary assessment (EMA) and accelerometry data from 108 adults who completed the first two measurement waves were included in the analysis.

Procedures

This EMA study consisted of three 4 day measurement waves (baseline, 6 months, and 12 months follow-up) with a 6 months interval between two consecutive waves. During each measurement wave, participants were loaned an HTC Shadow mobile phone (T-Mobile USA, Inc.) with a customized version of the MyExperience software installed [23]. The software was programmed to display question sequences and response choices on the smartphone screen to collect EMA data. Prior to beginning EMA collection, participants attended a training session where they received verbal and written instructions on how to use the device. Participants also completed a practice trial in the presence of research staff and were given the opportunity to ask questions before starting the data collection.

Participants were monitored across 4 days, including two weekend days during each measurement wave. Each participant received eight random EMA surveys from Saturday to Tuesday between 6:30 am and 10:00 pm. Each EMA survey was prompted at a random time using preprogrammed 2 hr intervals to ensure adequate spacing each day. During each EMA collection period, participants received at least one phone call and two SMS messages from the research staff to inquire about any technical problems, as well as remind them to recharge the phone.

Upon hearing the EMA signal, participants were asked to stop their current activity and complete a short electronic question sequence on the assigned smartphone. They were instructed to ignore a signal if it occurred during an incompatible activity (e.g., sleeping or bathing). It required approximately 2–3 min to complete each EMA survey. If no entry was made initially, up to three reminder signals were sent at 5 min intervals. After this point, the EMA survey became inaccessible until the next scheduled prompt. Participants wore Actigraph accelerometers (GT2M and GT3X models) on their right hip for the four complete days with simultaneous EMA. They were asked to remove the device when sleeping, bathing, or swimming. Participants were compensated up to $50 for completing each wave. More detailed information about the EMA protocol of the study was published elsewhere [22].

Measures

Contexts

Information about physical context was assessed using one EMA item with multiple response choices at each prompt: “WHERE were you just before the beep went off?” Response options that were coded as outdoor contexts (coded as 1) were “Home (outdoors)” and “Outdoors (not at home)”; and options coded as nonoutdoor contexts (coded as 0) included “Home (indoors),” “Work (indoors),” “Vehicles (car/van/truck),” “Restaurant,” “Someone else’s house,” and “Gym/recreation center.” Each EMA response was also linked to a binary variable indicating whether the survey was completed at a weekday or a weekend day (coded as 1).

Physical activity

Participants’ physical activity was objectively measured using ActiGraph GT2M and GT3X accelerometers (Actigraph, Pensacola, FL). A 30 min epoch was used, and the frequency was 30 hz. MVPA was operationalized as having ≥2,020 counts per minute for adults [24]. Nonwear time was defined as having ≥60 consecutive minutes of zero counts, and the nonwear day was defined as having less than 10 hr of valid wear time per day. Timestamps in both the accelerometry-based physical activity data and the smartphone-based EMA data were synchronized to create 30 min time windows of MVPA surrounding each EMA prompt (±15 min). Each participant’s daily MVPA level was also calculated from averaging accelerometer data on all valid days in the 6 month follow-up as the outcome variable. A valid 30 min time window was defined as containing at least 20 min of valid wear time (two thirds of the time window). Only the valid time windows during baseline and the valid days at the 6 month follow-up were included in the analysis. Accumulated minutes of MVPA in the 30 min windows were considered as a time-varying variable, whereas average daily MVPA time (in minutes) was considered as a time-invariant variable reflecting each participant’s overall activity level. Physical activity outcome variables in the first stage (i.e., MVPA in the 30 min time window) and the second stage (i.e., daily averaged MVPA minutes) were positively skewed. Thus, log-transformed scores for both outcome variables were used in the current analysis, while their raw values were reported in the descriptive statistics.

Demographics and anthropometric data

Participants reported their demographics (i.e., date of birth and sex) via a paper and pencil questionnaire at the initial training session. Age was calculated to the closest year based on the lapse between the participant’s date of birth and the first day of each measurement wave. Participants’ body mass index (BMI) at each wave was calculated (kg/m2) from their heights and weights measured via a Seca portable stadiometer and a Tanita scale to the nearest 0.1 kg and 0.1 cm, respectively. Participants’ age, sex, and BMI were all significantly correlated with daily averaged MVPA minutes (ps < .05), so they were included in the second-stage model as covariates.

Data analysis

Baseline (EMA and accelerometry) and 6 month follow-up (accelerometry only) data were used as an example in the current analysis. Nonvalid activity data due to accelerometer malfunction either at the baseline or at the 6 month follow-up (n = 8) were excluded from the analysis.

Statistical model

A two-stage data analysis approach using the MixWILD program was applied in the current study, in which the random effects estimated at the first stage were used as predictors in a second-stage model [17,18]. Specifically, statistical models examined whether random subject effects (i.e., intercept and slope) of MVPA minutes surrounding the EMA prompt (during baseline) predicted future average daily MVPA minutes (at 6 month follow-up).

In this program, Stage 1 applied a mixed-effects model to determine whether there were significant random subject intercept and slope in MVPA minutes surrounding the EMA prompt. In the Stage 2 model, a single-level multiple regression model was used to predict participants’ average daily MVPA minutes using the random subject effects (i.e., intercept and slope) derived from the Stage 1 model. The Stage 1 mixed-effects model and the Stage 2 single-level multiple regression model applied in the current study are specified as follows:

yij = (β0+ υ0i) + (β1+ υ1i)Xij+Zijβ+ ϵij, (Stage 1 model)

where the time-varying measurement y of subject i (i = 1, 2, …, N) on occasion j (1, 2, …, ni) is predicted by the intercept coefficient β0, random subject intercept coefficient υ 0i, slope coefficient of the main predictor β1, random subject slope coefficient of the main predictor υ 1i, slope coefficients of covariates β (a p vector of regression coefficients), and an error term ϵ ij. Xij is the main time-varying predictor (i.e., physical context) and Zij is the covariate (i.e., weekend vs. weekday, time of the day) that consists of a vector of p regressors. The random intercept effect υ 0i represents each participant’s mean minutes of MVPA in the 30 min time window when all other predictors are zero, which represents the indoor context in this study. The random slope effect υ 1i represents the impact of physical context (outdoors vs. indoors) on each participant’s minutes of MVPA in the 30 min time window. Both the random subject effects (intercept and slope) account for the clustering of repeated observations within participants and are assumed to be normally distributed.

yi =β0+β1υ0i +β2υ1i+Wiβ+ εi (Stage 2model)

In the Stage 2 single-level multiple regression model, the continuous subject-level outcome yi is predicted by the intercept coefficient β0, the slope coefficient of Stage 1 random subject intercept estimate β1, the slope coefficient of Stage 1 random subject slope estimate β2, slope coefficients β of other subject-level regressors Wi (i.e., age, sex, and BMI), and an error term ɛ i. In the current study, participants’ random subject intercept and slope of minutes of MVPA minutes in the 30 min time window during baseline (from Stage 1 model), as well as other covariates, are used to predict their overall average daily MVPA levels 6 months after (in Stage 2). Both the predictors and the outcome in this Stage 2 model are at the subject level. Since the Stage 1 random subject effects are estimates, to account for their uncertainty, we used the plausible value methodology to repeatedly impute the random effects in our Stage 2 analysis [25]. A more detailed explanation of the two-stage modeling approach using MixWILD was published elsewhere [17].

Resampling

Based on the fact that subject-level random effects are estimated quantities with uncertainties, the resampling approach was carried out as part of the Stage 2 analysis to generate plausible values of random effects to minimize biased estimates [26]. To obtain a reliable estimate of the random effects, each participant’s random effects were generated from a multivariate normal distribution that includes the mean and variance estimates of these random effects for that participant, resampling 300 times. Akin to the procedure applied in multiple imputations, these resampled random effects were then used to retest the Stage 2 model repeatedly 300 times, and the coefficients and standard errors were then averaged to obtain the final results.

RESULTS

As shown in Table 2, the analysis included 1,163 EMA occasions nested within 108 participants. During baseline, a quarter of the EMA prompts were responded to in outdoor contexts, and about half (47%) of the EMA occasions occurred on weekend days. On average, participants had less than 1 min of MVPA in the 30 min time window surrounding an EMA prompt during baseline. Their average daily MVPA time at the 6 month follow-up was around 40 min with substantial variability.

Table 2.

Descriptive statistics of main variables in the current analysis

Variable M SD Min Max
Stage 1 variables
 Physical context (outdoor = 1) 0.25 0.43 0 1
 Day of week (weekend = 1) 0.47 0.50 0 1
 MVPA minutes in the 30 min window 0.81 2.52 0 29
Stage 2 variables
 Daily MVPA minutes 41.13 24.69 2.25 171.50
 BMI 27.65 6.62 17.84 55.23
 Age 39.51 10.52 18 73
 Sex (male = 1; female = 0) 0.29 0.45 0 1

N of ecological momentary assessment observations = 1,163, N of subjects = 108.

BMI body mass index; MVPA moderate-to-vigorous physical activity; SD standard deviation.

The Stage 1 mixed-effects model predicted minutes of MVPA in the 30 min time window around EMA prompts during baseline. As shown in Table 3, after controlling for weekend day versus weekday, outdoor context (compared to indoor) positively predicted more MVPA in the 30 min time window (p < .001) surrounding an EMA prompt. The random location effects section further showed that there were both significant random subject intercept (p < .01) and random subject slope (p < .01) in participants’ MVPA in the 30 min time window. In other words, participants significantly differed in their mean minutes of MVPA when staying indoors, as well as the strength of their within-subject association between context type and MVPA in the 30 min window. There was no significant association between the two random subject location effects (i.e., random intercept and slope). This suggested that, at any given EMA prompt, the strength of a participants’ within-subject association between context type and MVPA in the 30 min window surrounding that prompt was not attenuated by their mean levels of indoor MVPA across the 30 min time windows.

Table 3.

Results of the Stage 1 mixed-effects model and the Stage 2 multiple regression model

Variable
Stage 1 model Estimate 95% CI Z R 2
Regression coefficients
 Intercept 0.09*** 0.07–0.11 8.03 0.17
 Physical context (outdoor = 1) 0.07*** 0.03–0.11 3.69
 Weekday vs. weekend day (weekend = 1) 0.01 −0.02–0.03 0.39
Random location effects variance and covariances
 Random intercept 0.01** <0.01–0.02 3.14
 Random slope 0.02** 0.01–0.03 3.02
 Covariance (random intercept and slope) <−0.01 <−0.01–0.01 −0.48
 Error variance 0.05*** 0.04–0.06 22.04
Stage 2 model
 Intercept 1.63*** 1.22–2.04 7.71 0.27
 Sex (male = 1) 0.17* 0.04–0.30 2.55
 Age −0.01 <−0.01–<0.01 −1.08
 Body mass index −0.01 −0.01–0.01 −0.65
 Random intercept (during baseline) 0.15*** 0.06–0.23 4.40
 Random slope (during baseline) 0.09* 0.01–0.18 2.13
 Error variance 0.09*** 0.06–0.11 6.88

N of observations for Stage 1 model = 1,163. N of subjects for Stage 2 model = 108. The dependent variable for the Stage 1 mixed-effects model is the number of moderate-to-vigorous physical activity (MVPA) minutes in the 30 min window during the baseline ecological momentary assessment (EMA) period (a Level 1 variable). The dependent variable for the Stage 2 multiple regression model is the mean daily MVPA minutes in the 30 min window during the 6 month follow-up EMA period (a Level 2 variable). R2 = R-squared values for Stage 1 and Stage 2 models.

*p < .05, **p < .01, ***p < .001.

The Stage 2 multiple linear regression model predicted participants’ average daily MVPA minutes (at 6 month follow-up) as a function of the random subject intercept and random subject slope estimates generated from the Stage 1 model. As seen in Table 3, after controlling for demographics and BMI, both the random subject intercept and the random subject slope effects (from baseline) significantly predicted participants’ average daily MVPA minutes (at 6 months). Participants who had higher mean minutes of MVPA in the 30 min time window during baseline compared to others had more daily MVPA minutes at 6 months (p < .001). Furthermore, participants who had a stronger within-subject association between outdoor context (vs. indoor) and MVPA in the 30 min time window compared to others during baseline engaged in more daily MVPA at 6 months (p < .05). In other words, participants who were more active had more MVPA when they reported being outdoors (vs. indoors) 6 months before. For the significant covariate in the Stage 2 model, being males (vs. female) positively predicted daily MVPA at 6 months (p < .05). The results of the Stage 2 model were obtained after completing 300 plausible value resamples for both random subject effects. The positive associations between the subject-level random effect estimates at baseline and overall daily MVPA levels at follow-up are depicted in Figs. 1 and 2. The dots in these Figures represent all participants’ estimated random intercepts (for Fig. 1) or random slopes (for Fig. 2) from their baseline EMA data and their corresponding physical activity levels 6 months later.

Fig 1.

Fig 1

Bivariate scatter plot of subject-level random intercept estimates for indoor moderate-to-vigorous physical activity (MVPA) minutes during baseline and mean daily MVPA levels at 6 month follow-up

Fig 2.

Fig 2

Bivariate scatter plot of subject-level random slope estimates of outdoor context and moderate-to-vigorous physical activity (MVPA) minutes during baseline and mean daily MVPA levels at 6 month follow-up.

DISCUSSION

This study illustrates an empirical case example using a two-stage modeling approach to understand how theoretically meaningful subject-level predictors, such as the random subject slope (e.g., the change in the subject’s MVPA that is associated with outdoor vs. indoor contexts), may explain differences in future subject-level health behaviors (e.g., overall MVPA levels). This study is the first to test whether subject-level heterogeneity in the momentary context contingency of MVPA is associated with future daily MVPA levels using accelerometry combined with EMA data. Results from this study suggest that the strength of the subject-level association between outdoor context (vs. indoor contexts) and momentary MVPA (i.e., in 30 min window) predicted adults’ future daily MVPA levels above and beyond the effects of subject-level mean MVPA during baseline.

Restricted by the limited modeling options available, previous EMA studies primarily focused on addressing nomothetic questions about contextual effects on momentary physical activity through the modeling of fixed slope effects [12,27]. This study introduces an alternative modeling approach that extends previous work by demonstrating how momentary associations between context and physical activity (i.e., random slope effects) can be used to predict future overall physical activity levels. This novel information on time-sensitive coupling within individuals is useful and can be capitalized to drive overall behavior change.

Our finding that stronger strength between outdoor context (vs. indoor) and MVPA is positively related to future overall MVPA levels may reflect the development of exercise habits, which would lead to greater physical activity maintenance over time. However, this finding may be a geographical area-based phenomenon and may not be generalized to other areas in which outdoor physical activity is not favorable. For example, active people living in high-latitude regions or places with longer/severer winter seasons may instead have a stronger association between indoor context (vs. outdoor) and physical activity. Additionally, various external factors that exist within the adults’ environment may also play a role in determining physical activity participation rather than simply relying on outdoor or indoor exposure. Contextual factors, such as social interactions, temperature, sun exposure, neighborhood walkability, crime rate, traffic safety, and the design features of green space, also impact individuals’ decisions and motivation in outdoor physical activity engagement [28–31]. Larger-scale EMA studies that measure a wider range of social, geographical, and built environment variables should apply the current modeling approach to test whether specific context–activity associations (e.g., differences between activity levels in parks and nonpark settings) predict individuals’ overall activity levels. Findings from these studies will provide more elaborate information to test the theoretical premise of habit formation and improve the prediction of physical activity engagement.

The demonstrated two-stage modeling approach could be readily applied to test other empirical questions about whether the strength of the within-subject association between two time-varying factors is associated with subject-level health behaviors and outcomes. For example, affective response during health behaviors such as physical activity is considered a relevant factor that may reinforce motivation to engage in future behavior [32]. Affective rewards (i.e., more positive affect and less negative affect) experienced while engaging in the behaviors may also support the adoption of maintenance of those behaviors [33], and this is an example of a subject-level slope that could predict a subject-level outcome. Furthermore, the strength of intention–behavior coupling has been posited as a relevant factor contributing to health behavior change [34,35]. The two-stage modeling approach in MixWILD can be used to understand whether the degree of momentary intention–behavior coupling at any given point in time predicts future levels of physical activity engagement.

Despite the EMA design, device-based physical activity measure, and novel modeling approach applied in this empirical example, there are some limitations to the current study. The EMA context items only included limited response options in this study that were the focus of this investigation. There are opportunities for future research to further explore whether specific context or location (e.g., backyard and park) and what cues (e.g., playhouse, sports facilities, greenness, and trails) in the outdoor environment may encourage or motivate people to be active. Our reported model included a limited set of basic individual and time-based covariates; future studies should include other social and built environment factors in the analysis to understand the context–activity associations in a more holistic manner. Objective measures of outdoor context (i.e., wearable camera and GPS) could be combined with EMA self-reports in future studies to identify key features and locations that may trigger outdoor physical activity participation. Accelerometers only provided the volume and pattern information but not the types of physical activity. Some types of physical activities (e.g., hiking and biking) may have a stronger relationship with the outdoor context than others (e.g., racquetball).

Furthermore, the physical context reported may not cover the entire time window surrounding the EMA prompt. The relatively narrow 30 min time window used in the current study was selected to limit the contextual changes corresponding to participants’ concurrent physical activity. However, it is also possible that context exposures may fluctuate across even shorter time frames and may not be captured using our EMA design. Future research could apply shorter time windows, wearable video recording, or use event-contingent EMA approach to collect the duration of people staying outdoors more precisely [36]. Finally, this study included data from generally healthy adults and may not be generalizable to youth and older adults. Physical activity changes across the lifespan and individuals’ roles and ecological contexts may change as they get older. Different contextual determinants may be more impactful in predicting physical activity during earlier or later periods of life transition [37–40]. Future studies are needed to test if current findings are replicable in people at different age groups. It is possible that the strength and direction of the observed associations may vary in different populations.

There are also some modeling considerations that need to be made in future studies. Aside from the random location effects (i.e., random intercept and slopes) estimated in this study, the MixWILD program also has the capability of modeling random scale effects (i.e., within-subject variability) of a Stage 1 time-varying variable. The current study did not estimate the within-subject variance of MVPA in the 30 min windows in Stage 1 nor the effect of random scale for MVPA in the 30 min window (i.e., degree of within-subject variability) on average daily MVPA in Stage 2 as it was not part of the a priori hypotheses. Future studies have the option of exploring whether the magnitude of subject-level variability in time-varying factors, along with other random location effects, predict an individual’s overall health-related outcomes using MixWILD.

In summary, the main objective of this article is to present an empirical case study example using a novel two-stage modeling approach to investigate how the time-sensitive coupling between momentary context and health behavior may impact overall health behavior. The current modeling approach using the MixWILD program can be readily applied to other health-related variables measured through intensive longitudinal designs. Preliminary findings from this case study may enhance our understanding concerning the dynamic role of physical context in shaping people’s overall physical activity in everyday naturalistic settings. With more findings accumulated from future research, it will provide valuable implications for developing context-based physical activity programs and just-in-time adaptive interventions to promote physical activity when people are in specific contexts.

Acknowledgment

Funding: The current study and the development of the MixWILD program were supported by the National Heart Lung and Blood Institute of the National Institutes of Health (award number: 5R01HL121330-05 and 1R01CA240713-01).

Compliance with Ethical Standards

Conflicts of Interest: All authors listed on this manuscript declare that they have no conflicts of interest.

Author Contributions: C.H.Y. formulated the research question, analyzed the data, drafted the work. J.P.M. substantially revised the work. A.P. substantially revised the work. E.D. substantially revised the work. S.I. substantially revised the work. D.H. assisted in data analysis and the interpretation of study results. G.F.D. conceptualized and designed the study and revised the work.

Ethical Approval: All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and/or national research committee and with the 1964 Helsinki declaration and its later amendments or comparable ethical standards.

Informed Consent: Informed consent was obtained from all individual participants included in the study.

References

  • 1. US Department of Health and Human Services. 2018. Physical Activity Guidelines Advisory Committee Scientific Report. [Google Scholar]
  • 2. CDC. About physical activity. 2018; Available at https://www.cdc.gov/physicalactivity/about-physical-activity/index.html. Accessibility verified February 22, 2019.
  • 3. Dunton GF. Ecological momentary assessment in physical activity research. Exerc Sport Sci Rev. 2017;45(1):48–54. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4. Sallis JF, Cervero RB, Ascher W, Henderson KA, Kraft MK, Kerr J. An ecological approach to creating active living communities. Annu Rev Public Health. 2006;27(1):297–322. [DOI] [PubMed] [Google Scholar]
  • 5. Barker RG Ecological Psychology: Concepts and Methods for Studying the Environment of Human Behavior (Clean & Tight Contents ed.). Stanford, CA: Stanford University Press; 1968. [Google Scholar]
  • 6. McKenzie TL. Context matters: Systematic observation of place-based physical activity. Res Q Exerc Sport. 2016;87(4):334–341. [DOI] [PubMed] [Google Scholar]
  • 7. McNeill LH, Kreuter MW, Subramanian SV. Social environment and physical activity: A review of concepts and evidence. Soc Sci Med. 2006;63(4):1011–1022. [DOI] [PubMed] [Google Scholar]
  • 8. Seefeldt V, Malina RM, Clark MA. Factors affecting levels of physical activity in adults. Sports Med. 2012;32(3):143–168. [DOI] [PubMed] [Google Scholar]
  • 9. Dunton GF, Berrigan D, Ballard-Barbash R, Graubard BI, Atienza AA. Social and physical environments of sports and exercise reported among adults in the American Time Use Survey. Prev Med. 2008;47(5):519–524. [DOI] [PubMed] [Google Scholar]
  • 10. Loveday A, Sherar LB, Sanders JP, Sanderson PW, Esliger DW. Technologies that assess the location of physical activity and sedentary behavior: A systematic review. J Med Internet Res. 2015;17(8):e192. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11. Doherty AR, Kelly P, Kerr J, et al. Using wearable cameras to categorise type and context of accelerometer-identified episodes of physical activity. Int J Behav Nutr Phys Act. 2013;10(1):22. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Liao Y, Intille SS, Dunton GF. Using ecological momentary assessment to understand where and with whom adults’ physical and sedentary activity occur. Int J Behav Med. 2015;22(1):51–61. [DOI] [PubMed] [Google Scholar]
  • 13. Triguero-Mas M, Donaire-Gonzalez D, Seto E, et al. Living close to natural outdoor environments in four european cities: Adults’ contact with the environments and physical activity. Int J Environ Res Public Health. 2017;14(10):1162. Available at https://www.mdpi.com/1660-4601/14/10/1162. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Neal DT, Wood W, Labrecque JS, Lally P. How do habits guide behavior? Perceived and actual triggers of habits in daily life. J Exp Soc Psychol. 2012;48(2):492–498. [Google Scholar]
  • 15. Wood W, Quinn JM, Kashy DA. Habits in everyday life: Thought, emotion, and action. J Pers Soc Psychol. 2002;83(6):1281–1297. [PubMed] [Google Scholar]
  • 16. Hofmann W, Friese M, Wiers RW. Impulsive versus reflective influences on health behavior: A theoretical framework and empirical review. Health Psychol Rev. 2008;2(2):111–137. [Google Scholar]
  • 17. Dzubur E, Ponnada A, Nordgren R, et al. MixWILD: A program for examining the effects of variance and slope of time-varying variables in intensive longitudinal data. Behav Res Methods. 2020;52(4): 1403–1427. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. Nordgren R, Hedeker D, Dunton G, Yang CH. Extending the mixed-effects model to consider within-subject variance for Ecological Momentary Assessment data. Stat Med. 2020;39(5):577–590. [DOI] [PubMed] [Google Scholar]
  • 19. Maher JP, Dzubur E, Nordgren R, et al. Do fluctuations in positive affective and physical feeling states predict physical activity and sedentary time? Psychol Sport Exerc. 2019;41:153–161. Available at https://www.sciencedirect.com/science/article/pii/S1469029217305691?casa_token=s9bd0ANTpRIAAAAA:f2QtYgmsysTTx9qzA0YK6ZYWIEOJ3jC2OOC5b6masTf0Yb8MAN-szzYZUp1eoD66tdJTZvLI. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Maher JP, Huh J, Intille S, Hedeker D, Dunton GF. Greater variability in daily physical activity is associated with poorer mental health profiles among obese adults. Ment Health Phys Act. 2018;14:74–81. Available at https://www.sciencedirect.com/science/article/pii/S1755296617301485?casa_token=8l_UeQewd4sAAAAA:sxa8kQxIBshnDFrvb-x-PzTKvC76gTG1kFen2ypm7w6uCHlIC3gc1yGCgLC41sdnBoVer5x4. [Google Scholar]
  • 21. Lally P, Gardner B. Promoting habit formation. Health Psychol Rev. 2013;7(suppl 1):S137–S158. [Google Scholar]
  • 22. Dunton GF, Liao Y, Kawabata K, Intille S. Momentary assessment of adults’ physical activity and sedentary behavior: Feasibility and validity. Front Psychol. 2012;3:260. Available at https://www.frontiersin.org/articles/10.3389/fpsyg.2012.00260/full. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Froehlich J, Chen MY, Consolvo S, Harrison B, Landay JA. MyExperience: A System for in Situ Tracing and Capturing of User Feedback on Mobile Phones. In: Knightly EW, ed. Proceedings of the 5th International Conference on Mobile Systems, Applications and Services. New York, NY: ACM; 2007: 57–70. doi: 10.1145/1247660.1247670. [DOI] [Google Scholar]
  • 24. Troiano RP, Berrigan D, Dodd KW, Mâsse LC, Tilert T, McDowell M. Physical activity in the United States measured by accelerometer. Med Sci Sports Exerc. 2008;40(1):181–188. [DOI] [PubMed] [Google Scholar]
  • 25. Mislevy RJ. Randomization-based inference about latent variables from complex samples. Psychometrika. 1991;56(2):177–196. [Google Scholar]
  • 26. Carsey TM, Harden JJ. Monte Carlo Simulation and Resampling Methods for Social Science. Thousand Oaks, CA: SAGE Publications; 2013. [Google Scholar]
  • 27. Dunton GF, Whalen CK, Jamner LD, Floro JN. Mapping the social and physical contexts of physical activity across adolescence using ecological momentary assessment. Ann Behav Med. 2007;34(2):144–153. [DOI] [PubMed] [Google Scholar]
  • 28. Wang J, Lee K, Kwan M-P. Environmental influences on leisure-time physical inactivity in the U.S.: An exploration of spatial non-stationarity. ISPRS Int Geo-Inf. 2018;7(4):143. [Google Scholar]
  • 29. Transportation Research Board, & Institute of Medicine. Does the Built Environment Influence Physical Activity?: Examining the Evidence—Special Report 282. Washington, DC: Transportation Research Board; 2005. [Google Scholar]
  • 30. Townsend M, Mahoney M, Jones JA, Ball K, Salmon J, Finch CF. Too hot to trot? Exploring potential links between climate change, physical activity and health. J Sci Med Sport. 2003;6(3):260–265. [DOI] [PubMed] [Google Scholar]
  • 31. Jardine A, Bright M, Knight L, Perina H, Vardon P, Harper C. Does physical activity increase the risk of unsafe sun exposure? Health Promot J Austr. 2012;23(1):52–57. [DOI] [PubMed] [Google Scholar]
  • 32. Dunton GF, Liao Y, Intille S, Huh J, Leventhal A. Momentary assessment of contextual influences on affective response during physical activity. Health Psychol. 2015;34(12):1145–1153. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33. Pasco JA, Jacka FN, Williams LJ, Brennan SL, Leslie E, Berk M. Don’t worry, be active: positive affect and habitual physical activity. Aust N Z J Psychiatry. 2011;45(12):1047–1052. [DOI] [PubMed] [Google Scholar]
  • 34. Rhodes RE, Dickau L. Experimental evidence for the intention–behavior relationship in the physical activity domain: A meta-analysis. Health Psychol. 2012;31(6):724–727. [DOI] [PubMed] [Google Scholar]
  • 35. Sheeran P. Intention-behavior relations: A conceptual and empirical review. Eur Rev Soc Psychol. 2002;12(1):1–36. [Google Scholar]
  • 36. Christensen TC, Barrett LF, Bliss-Moreau E, Lebo K, Christensen TC. A practical guide to experience-sampling procedures. J Happiness Stud. 2003;4(1):53–78. [Google Scholar]
  • 37. Hirvensalo M, Lintunen T. Life-course perspective for physical activity and sports participation. Eur Rev Aging Phys Act. 2011;8(1): 13–22. [Google Scholar]
  • 38. Beck KL, Weeks LE, Montelpare WJ, MacDonald DJ. Identifying important factors for older adults’ physical activity participation across individual/group, structured/unstructured contexts. Eur J Ageing. 2016;13(3):209–218. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39. Zimmermann-Sloutskis D, Wanner M, Zimmermann E, Martin BW. Physical activity levels and determinants of change in young adults: A longitudinal panel study. Int J Behav Nutr Phys Act. 2010;7(1):2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40. Craggs C, Corder K, van Sluijs EM, Griffin SJ. Determinants of change in physical activity in children and adolescents: A systematic review. Am J Prev Med. 2011;40(6):645–658. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Translational Behavioral Medicine are provided here courtesy of Oxford University Press

RESOURCES