key: cord-0719331-mwi73fk8 authors: Walters, Scott T.; Businelle, Michael S.; Suchting, Robert; Li, Xiaoyin; Hébert, Emily T.; Mun, Eun-Young title: Using machine learning to identify predictors of imminent drinking and create tailored messages for at-risk drinkers experiencing homelessness date: 2021-04-20 journal: J Subst Abuse Treat DOI: 10.1016/j.jsat.2021.108417 sha: 5af63efa2b1d5229e2123b59b5347b91a6ae3697 doc_id: 719331 cord_uid: mwi73fk8 Adults experiencing homelessness are more likely to have an alcohol use disorder compared to adults in the general population. Although shelter-based treatments are common, completion rates tend to be poor, suggesting a need for more effective approaches that are tailored to this understudied and underserved population. One barrier to developing more effective treatments is the limited knowledge of the triggers of alcohol use among homeless adults. This paper describes the use of ecological momentary assessment (EMA) to identify predictors of “imminent drinking” (i.e., drinking within the next 4 h), among a sample of adults experiencing homelessness and receiving health services at a homeless shelter. A total of 78 mostly male (84.6%) adults experiencing homelessness (mean age = 46.6) who reported hazardous drinking completed up to five EMAs per day over 4 weeks (a total of 4557 completed EMAs). The study used machine learning techniques to create a drinking risk algorithm that predicted 82% of imminent drinking episodes within 4 h of the first drink of the day, and correctly identified 76% of nondrinking episodes. The algorithm included the following 7 predictors of imminent drinking: urge to drink, having alcohol easily available, feeling confident that alcohol would improve mood, feeling depressed, lower commitment to being alcohol free, not interacting with someone drinking alcohol, and being indoors. The research team used the results to develop intervention content (e.g., brief tailored messages) that will be delivered when imminent drinking is detected in an upcoming intervention phase. Specifically, we created three theoretically grounded message tracks focused on urge/craving, social/availability, and negative affect/mood, which are further tailored to a participant’s current drinking goal (i.e., stay sober, drink less, no goal) to support positive change. To our knowledge, this is the first study to develop tailored intervention messages based on likelihood of imminent drinking, current drinking triggers, and drinking goals among adults experiencing homelessness. Adults experiencing homelessness are at greater risk for a host of problems, including disease, violence, and death, compared with housed individuals (Henny, Kidder, Stall, & Wolitski, 2007; Lima et al., 2020; Morton et al., 2018) . Alcohol use is a significant contributor to this increased morbidity and mortality (T.P. T.P. Baggett & Jenkins, 2013; Ku, Scott, Kertesz, & Pitts, 2010; Morrison, 2009 ). In fact, adults experiencing homelessness are eight times more likely than adults in the general population to have an alcohol use disorder (AUD) (Hasin, Stinson, Ogburn, & Grant, 2007; Morrison, 2009 ). There is good evidence that substance use treatment can reduce drinking among adults experiencing homelessness (Bradford, Gaynes, Kim, Kaufman, & Weinberger, 2005) , but compliance tends to be poor (Schonfeld et al., 2000; Scott-Lennox, Rose, Bohlig, & Lennox, 2000) . For instance, in an analysis of fourteen treatment programs for adults experiencing homelessness funded by the NIAAA, not a single program retained more than one-third of clients, despite extensive efforts to do so (Orwin, Garrison-Mogren, Jacobs, & Sonnefeld, 1999) . The most common reasons for discontinuation included lack of motivation, delays in starting treatment, a desire to reconnect with family or friends, dissatisfaction with the program structure or environment, and difficulties arranging transportation. Alternative treatments that are more responsive to the needs of adults experiencing homelessness are sorely needed. This need is even more urgent in light of the COVID-19 pandemic, which disproportionately affects both people experiencing homelessness and those with an AUD (Tsai & Wilson, 2020 ). An intervention delivered via smartphones (smartphone ownership is common among adults experiencing homelessness), may be one way to improve the delivery of alcohol treatment services while, at the same time, facilitating physical distancing to help reduce the spread of the virus (Jarvis et al., 2020; Wasserman, van der Gaag, & Wise, 2020; Zhang, Li, Zhang, Wang, & Molina, 2020) . been studied using retrospective "follow-back" methods that may not adequately capture the complicated drinking patterns of adults experiencing homelessness (Shiffman et al., 1997; A.A. Stone et al., 1998) . Traditional assessment methods may also produce inaccurate estimates of alcohol use due to recall biases and errors in memory, particularly in populations that have cognitive limitations (S. Shiffman et al., 1997; A.A. Stone et al., 1998) . Ecological momentary assessment (EMA), where phone-based prompts are answered several times a day in a participant's natural environment, can better capture the temporal and contextual factors surrounding drinking (Kirchner & Shiffman, 2013; Morgenstern, Kuerbis, & Muench, 2014; S. Shiffman et al., 1997; A.A. Stone, Shiffman, Schwartz, Broderick, & Hufford, 2002) . Studies utilizing EMA, most often among young adults, have identified several predictors of drinking, including negative mood (Arpin, Mohr, & Brannan, 2015; Dvorak & Simons, 2014) , recent cigarette consumption (Jackson, Colby, & Sher, 2010) , and social environment (O'Grady, Cullum, Tennen, & Armeli, 2011) . Many of these factors involve a complex interplay of individual and environmental characteristics, both physical and social (Mohr et al., 2001) . For instance, a poor mood might increase the risk of drinking when a person is alone, whereas a positive mood might increase the risk of drinking when a person is around others. Due to the dynamic nature of these alcohol risk contexts, strategies such as just-intime adaptive interventions (JITAIs) are ideally suited to providing tailored "real-time" intervention messages to nudge individuals away from alcohol misuse in the moments they are most needed (Nahum-Shani et al., 2016) . For instance, a treatment message might be tailored to a person's current mood, urge, commitment to change, whether others are drinking around them, or whether they have already consumed alcohol that day. Treatment messages can also be tailored based on time of day, a person's location or proximity to highrisk locations (e.g., alcohol establishments), or any combination of these things. Developing an efficacious JITAI requires accurate detection of situational, affective, and motivational risk factors that precipitate drinking. Previous research has identified some of these "real-time" risk factors (Stanesby, Labhart, Dietze, Wright, & Kuntsche, 2019) ; however, studies tend to be limited to a small set of variables that are selected based on existing knowledge. An alternative approach is to apply computational tools to empirically select the most parsimonious risk factors from a large set of potential predictors. This method may also be used to identify targets for intervention messages. For instance, if a person's current mood places them at risk for drinking, an intervention might deliver a treatment message that is tailored to mood. This data-driven approach can uncover risk factors that may have been otherwise over-looked. Previous studies have used applied machine learning algorithms to identify predictors of smoking and other health behaviors. One study used a smartphone app to prompt five EMAs per day in a group of homeless individuals who were attempting to quit smoking. Trajectories of negative affect, stress, restlessness, and coping expectancies predicted smoking abstinence (M.S. Businelle et al., 2014) . Another study collected EMA data from smokers seeking treatment at a safety-net hospital tobacco cessation clinic (Bandiera, Atem, Ma, Businelle, & Kendzor, 2016; Kendzor et al., 2015; Watkins et al., 2014) . Using six EMA variables (i.e., urge, stress, cigarette availability, alcohol use, motivation to quit, proximity to others smoking), researchers created a risk estimator that predicted 80% of all smoking lapses within the next 4 h (false positive rate = 17%) (M.S. Businelle et al., 2016b) . The research team subsequently used this risk estimator to create a JITAI that delivered tailored messages based on a person's momentary risk for smoking lapse and reported symptoms (i.e., stress, urge to smoke, motivation to quit, and cigarette availability) (M.S. Businelle et al., 2016a; Hébert et al., 2018; Hébert et al., 2020) . The current study extends this approach to create a JITAI for at-risk drinkers experiencing homelessness. This paper describes the process of identifying risk factors that predicted imminent drinking, development of the risk prediction algorithm, and development of treatment tracks and messages based on key variables. The study design and protocol have been reported elsewhere (M.S. Businelle et al., 2020) . In short, the study uses a three-phase design to develop and test a JITAI to reduce drinking among adults experiencing homelessness. Phase 1 was a 4-week observational study that included in-person self-report surveys, daily smartphone-based EMAs, biochemical alcohol detection at 30-min intervals, and passive geospatial data collection at 5-min intervals. During Phase 2, we developed a risk algorithm and tailored treatment messages based on Phase 1 data. 1 The Phase 3 app will estimate each participant's risk of imminent alcohol use during each EMA and will deliver a tailored treatment message to nudge the participant away from alcohol use. Phase 3 will test the feasibility, acceptability, and preliminary efficacy of the intervention app in a new sample of adults experiencing homelessness. In Phase 3, we will obtain participant feedback about the usefulness of the app messaging. This paper describes the results from Phases 1 and 2 (i.e., identification of predictors of imminent drinking, and development of the risk algorithm, treatment messages, and message tailoring tracks). The study recruited participants from a homeless shelter in a major metropolitan area in the United States. Participants were eligible if they: 1) reported a score of 8 or above on the AUDIT (Saunders, Aasland, Babor, Delafuente, & Grant, 1993) , indicating harmful or hazardous drinking; 2) reported consuming at least 1 standard drink of alcohol in the past week; 3) were receiving health services at the shelter; 4) were willing and able to complete the baseline and follow-up visits; 5) scored ≥4 on the REALM-SF (Arozullah et al., 2007) indicating >6th-grade English literacy level (i.e., a 7th-grade reading level was necessary to complete assessments); and 6) scored ≥24 on the Mini-Mental State Exam (Tombaugh & McIntyre, 1992) , indicating no substantial cognitive impairment. Of the 142 people screened for eligibility, 95 were eligible and completed the baseline assessment, and 78 completed the equipment set-up visit (Fig. 1) . The most common reasons for screening exclusion were not drinking in the past week (47% of those excluded) and not receiving an 8 or above on the AUDIT (27% of those excluded). There were no significant differences between those who completed the baseline assessment and those who completed the set-up visit on age, gender, race, the AUDIT score, or the number of drinking/heavy drinking days in the past month. Table 1 describes participants who completed the set-up visit. Participants were mostly male (84.6%), Black (65.4%), and drinking at harmful levels (AUDIT = 20.7). The study administered in-person assessments at baseline and 4 weeks later. Approximately 5 days after the baseline assessment, participants attended a set-up visit where they received a smartphone and a SCRAM alcohol monitor (for details, see M.S. Businelle et al., 2020) , along with instructions on how to complete the phone-based EMAs. The study provided a phone for participants (Samsung Galaxy S3 or S7), preloaded with the Insight ™ app; participants were able to use the phone for voice, text, and internet for the duration of the study. Over the next 4 weeks, participants completed three types of EMAs: daily diary, random sampling, and event sampling. Daily Diary EMAs were prompted once a day 30 min after the participant's self-reported waking time. Random Sampling EMAs were prompted up to four times each day, during the participant's normal waking hours. Participants were asked to self-initiate Event sampling EMAs if and when they consumed their first drink in a day. Each EMA contained a series of mood questions drawn from the Circumplex Model of Affect (Russell, 1980 ) (i. e., I feel irritable, happy, content, angry, sad, worried, miserable, restless, stressed, hostile, calm, bored, and depressed). In addition, EMAs asked participants about their current location (e.g., shelter, work, outside, bar) and social setting (e.g., alone, with others, with others who are drinking), urges to drink, alcohol/money availability, drinking start/stop time, recent drinking, expectancies, and motivation and self-efficacy to avoid alcohol. Additionally, the Daily Diary EMAs contained questions about the previous day and current experiences, including sleeping arrangements for the previous night, social support and types of social interactions, stressors, other substance use, and treatment attendance. Participants received $25 for completing the baseline assessment, up to $25 per week for completing EMAs (based on percent completed), $25 for completing the 4-week assessment, and $25 for returning the phone and SCRAM in good condition at the end of the study. The study included a total of forty-one variables collected via EMA as potential predictors of imminent drinking (i.e., the first drink of a day occurring within 4 h following completion of a specific EMA). The study measured all forty-one items in each random as well as daily diary EMA. The study assessed alcohol consumption and time of the first drink of the day during each prompted and self-initiated EMA. The research team used a two-stage applied machine learning approach for variable selection and model building to predict first drink of the day. This approach has demonstrated effective performance in prior research (Bauer et al., 2019; R. Suchting, Gowin, Green, Walss-Bass, & Lane, 2018; Suchting, Hébert, Ma, Kendzor, & Businelle, 2019; Walss-Bass, Suchting, Olvera, & Williamson, 2018) . We used successive passes through two algorithms (component-wise gradient boosting and backward elimination) to reduce a set of random and daily EMA predictors of imminent drinking. Component-wise gradient boosting (CGB) is a machine learning algorithm that builds a penalized generalized linear model from zero predictors upward by iteratively fitting an outcome to a set of variables (Hofner, Mayr, Robinzonov, & Schmid, 2014) . The algorithm is flexible with respect to sample size, and may even be applied in high-dimensional data (i.e., p >> n). In the first iteration, the algorithm identifies one predictor that best fits that outcome. Each subsequent iteration then identifies an additional predictor that best fits the residual of the previous iteration. The algorithm repeats until it reaches a stopping criterion, chosen via k-fold cross-validation (i.e., averaging across ten training/test splits of the data), which indicates that the outcome prediction no longer improves. Notably, CGB allows for the inclusion of random effects to account for multilevel data (here, a random intercept for repeated observations). This feature is relatively unique among machine learning algorithms, and allows cross-validation to occur across individuals, rather than training and testing the algorithm for each individual separately. The study applied CGB via the package mboost (Hothorn, Buehlmann, Kneib, Schmid, & Hofner, 2020) in the R statistical computing environment (R Core Team, 2020). The second algorithm, backward elimination (BE), then reduces the set of selected predictors downward by optimizing the Akaike Information Criterion (AIC) (Hastie, Tibshirani, & Friedman, 2013) . Each iteration of this algorithm identifies a predictor that, when removed, provides the lowest AIC. The algorithm terminates when removing any of the predictors will not further reduce the AIC. We applied BE during model fitting for a mixed-effects model via the R package lme4 (Bates, Maechler, Bolker, & Walker, 2015) . Given that EMAs are nested within individuals, we accounted for data clustering by a random effect in the mixed-effects model. The study prompted a total of 5845 EMAs (1268 daily dairies and 4577 random sampling), of which 4557 (78%) were completed (938 daily dairies and 3619 random sampling). In addition, participants self-initiated 425 event sampling assessments before or after drinking events. At the individual level, 71 participants responded to at least one EMA prompt on at least 14 days, and 43 responded to at least one EMA prompt on all 28 days. On average, participants provided 17.7 days of EMA data. We used a total of 2807 EMAs collected within four hours proceeding a drinking episode (n = 205) for model development. The CGB algorithm reduced the set of predictors from thirty-six to eight, and the BE algorithm removed one additional predictor to provide a final model of seven predictors. The final 7-item drinking risk prediction model yielded an area under the receiver operating characteristic curve (AUC) of 0.869. The sensitivity and specificity of the final model were 82% and 76%, respectively. Table 2 shows the odds ratios and 95% bootstrapped CIs for the variables selected by the final model. Three predictors yielded bootstrapped 95% CIs that did not include the null value for an odds ratio (OR = 1.0): (1) a strong desire to drink at that moment, (2) having alcohol available, and (3) being outside (compared to being indoors). Desire and availability were related to 37% and 26% higher odds of imminent drinking, respectively, while being outside demonstrated 47% lower odds. Although the other four predictors did not demonstrate statistical significance with respect to the bootstrapped CIs, their selection by the machine learning algorithm suggests that these predictors provide unique predictive utility, and from an inferential standpoint, may be worthy of future investigation. The study used regression coefficients of the fixed effects for each predictor in the model to calculate the probability of imminent drinking across the full dataset, irrespective of the random effects, so as to generalize to new EMA data for Phase 3. The study adjusted probability threshold tau (τ) to provide the maximum specificity at which sensitivity was at least 0.80. The threshold τ = 0.16 satisfied this condition, yielding sensitivity and specificity values of 0.80 and 0.41, respectively, for Phase 1 EMA data. Given the relatively low cost of false positives, correctly predicting 4 in 5 positive cases was considered appropriate for the development of intervention messages while needing data from only seven EMA items. Four of the seven questions in the risk algorithm enabled us to create three theoretically grounded message tracks (built on theory and clinical expertise, rather than additional statistical tests) that focus on urge/craving, social/availability, and negative affect/mood. Fig. 2 shows the messaging logic for the Phase 3 app, while Fig. 3 provides a visual illustration of two of the app sections. The overall logic was informed by motivational and goal setting theories (Prochaska, DiClemente, & Norcross, 1992; Ryan & Deci, 2000) , and the best predictors of imminent drinking. The message tone emphasizes autonomy, competence, and relatedness. Messages are written at a 6th-grade reading level. The Phase 3 app has 929 total messages, 839 of which are unique (although the variations are slight in many cases). Level 1 (low risk) messages are presented at the end of EMAs when participants 1) report no drinking today, 2) report they are not likely to drink today, and 3) are at low risk for imminent drinking based on the drinking risk prediction algorithm. Level 1 messages focus on general wellness, for instance, spending time with supportive people, setting and achieving goals, healthy nutrition, exercise, planning for high-risk situations, and scheduling recreation activities. Level 1 messages are tailored to the time of day: Early-day messages focus on setting goals, mid-day messages focus on completing activities, and late-day messages focus on reflecting on the day's activities and setting goals for tomorrow. Examples of Level 1 messages include: Level 2 (high risk) messages are presented at the end of EMAs when participants 1) report drinking today, or 2) report they are at least somewhat likely to drink later today, or 3) are at risk of imminent drinking based on the risk prediction algorithm. Level 2 messages (immediate risk) are organized into seven categories based on the person's goal for today (stay sober, drink less, no goal), and leading risk indicator (urge, social/availability, mood). Level 2 messages are tailored in real-time based on EMA responses. When participants indicate that they do not have a drinking goal, they receive a motivation-themed message about the health, interpersonal, intrapersonal, and safety benefits of sobriety or drinking reductions and/or encouraging them to consider hypothetical planning should they become interested in making changes. When participants indicate that they have a goal to stay sober or reduce drinking today, and the highest-rated predictor variable is urge, they receive a message that is focused on distraction, keeping busy, mindfulness, and other strategies to address the craving. Level 2 "urge" messages are further tailored based on whether the participant's goal is to stay sober or drink less today. When participants indicate that they have a goal to stay sober or reduce drinking today, and the highest-rated predictor variable is easy access to alcohol, they receive a message focused on moving to a different location, finding other people who are not drinking, improving coping, and increasing the quality of immediate supports. Level 2 "social/availability" messages are further tailored based on whether the participant's goal is to stay sober or drink less today. When participants indicate that they have a goal to stay sober or reduce drinking today, and the highest-rated predictor variable is negative affect/mood, they receive a message focused on improving mindset and energy, relaxation, coping with affect/mood without drinking, setting goals, and engaging in healthy behaviors. Level 2 "mood" messages are further tailored based on whether the participant's goal is to stay sober or drink less today. Examples of Level 2 messages include: • Make sure you're avoiding "dead time" today. Keep yourself busy with things you enjoy and take your time to do things well. If you're busy and engaged in your work, you're more likely to stay sober. [Level 2; mood, stay sober] • If someone offers you alcohol, respond with a polite but firm refusal. Say, "No thanks. I'm cutting back." [Level 2; social/availability, drink less] Level 3 (getting back on track) messages are presented to participants when they report that they have a goal to stay sober or drink less and they just drank or drank in the past 4 h. Level drinking episode as a learning experience and offering strategies to handle situations differently in the future. Participants who choose a drink less goal receive messages that encourage refusal skills, cutting down or pacing drinks. Examples of Level 3 messages include: • Drinking doesn't have to be all or none! Make a decision right now to change what you are doing for the rest of the day. If things around you are tempting you to drink, move to a different area. • Use this slip as an opportunity for growth. Each time you start again, you are learning something that can be useful in the future! Level 4 (motivation) messages are presented to participants when they report that they have no current drinking goal. In these cases, participants receive messages that encourage them to consider the benefits of sobriety and/or reductions in alcohol use. Examples of Level 4 messages include: • Think about whether drinking is helping you to achieve your goals for the next few weeks. If drinking is not moving you closer to your goals, you might consider making a change. • When was your last sober day? Some people do an experiment by going one day without drinking. This can help them decide if they want to reduce or quit drinking for good. Finally, a variety of "tips" are available at any time. On-demand tips contain information about the benefits of sobriety, and ways to manage mood, urges, pressure to drink, diet, exercise, sleep, and personal safety. This study used a two-stage machine learning approach to develop a prediction algorithm from EMA data among a sample of adults experiencing homelessness. The study incportated this algorithm into a novel JITAI specifically developed for this understudied and underserved population. The algorithm included the following seven predictors of imminent drinking: urge to drink, having alcohol easily available, feeling confident that alcohol would improve mood, feeling depressed, lower commitment to being alcohol free, not interacting with someone drinking alcohol, and being indoors. We created three theoretically grounded message tracks focused on urge and craving, availability of alcohol and social context, and negative affect. We further tailored messages based on a person's current drinking goal for the day (i.e., stay sober, drink less, no goal). If shown to be effective in the Phase 3 trial, this app could be used as an adjunct to treatment services delivered in a shelter, as well as during transitional housing programs, a critical time where level of services are decreasing at the same time as triggers for mental health and substance use problems may be increasing. The creation of messages involved a number of decisions about readability, tone, and content. First, we created messages that could be easily read by someone with a 6th-grade reading level. In a previous study at this facility, 12% of people screened had less than a 7thgrade reading level (<1% of guests at this facility are non-English speakers). Second, we drew from motivational theory in our message tone to emphasize personal autonomy, competence, and relatedness. Third, within tracks, we tailored messages to a person's current drinking goal, for instance, whether their goal was to stay sober or to drink less that day. Sometimes these goal tracks were identical (e.g., tips to avoid being around other people who are drinking), while other times the goal tracks involved only slight wording changes (e.g., "…in your goal to stay sober" vs. "…in your goal to drink less"). However, sometimes the goal tracks were quite different. For instance, the language of "recovery" and "sobriety" may be more familiar to people with an abstinence goal, while suggestions to pace drinks or delay the first drink of the day may be more familiar to people who want to drink moderately. Notably, a person's drinking goal is taken into account at each EMA. Thus, someone can receive an abstinence-oriented message in the morning, and a moderation message later in the day if their goals have changed. Notably, we created a sufficient number of unique messages so that participants are unlikely to see the same message twice even if they have the same risk level (e.g., high risk), same risk factor (e.g., social/availability), and same goal (e.g., stay sober) for several days. Finally, sometimes participants will indicate that they have no drinking goal. During these moments, we believe it is best to deliver messages that highlight potential reasons for reducing or quitting drinking. This study is unique in the way that it combined a data-driven approach with motivational and goal-setting theory to produce message tracks. Notably, the selected predictors across three tracks that the machine learning approach suggested were theoretically coherent. Urge, easy alcohol availability, and negative affect are well-established predictors of drinking (Miller, Westerberg, Harris, & Tonigan, 1996) , and intention is a similarly strong predictor (Cooke, Dahdah, Norman, & French, 2016) . Our findings are also consistent with the small number of studies that have explored these relationships in a more "fine-grained" way using EMA. For instance, Santa Maria et al. (2018) found that urge was a significant predictor of subsequent drug and alcohol use in a sample of homeless youth. Similarly, Jones, Tiplady, Houben, Neder-koorn, and Field (2018) found that planned consumption and craving predicted later-day alcohol consumption in a sample of heavy drinkers in the community who were motivated to reduce their drinking. While most studies have examined predictors independently, there is undoubtedly a complex interplay between craving, mood, and availability. Mayhugh, Rejeski, Petrie, Laurienti, and Gauvin (2018) used EMA to examine drinking among moderate-heavy drinkers recruited from the community. Over the course of the day, increased exposure to alcohol cues led to increased urges to drink. After starting to drink, as would be expected, urges were reduced. However, when participants were given an imposed 3-day period of abstinence, cravings did not increase during this time. Instead, participants used strategies to mitigate the discomfort associated with their craving, such as avoiding alcohol cues. This suggests a complex interplay between cognition and behavior. Because EMA studies can be burdensome due to repeated, sometimes lengthy phone assessments (S. Shiffman, 2009), our results can help to improve future alcohol interventions by limiting the frequency and length of EMAs needed to successfully predict imminent drinking. All things being equal, a shorter assessment (or better yet, data collected passively) will be more attractive for intervention development. A few studies have used machine learning to estimate risk for alcohol use based on passively collected sensor data. For example, Bae, Chung, Ferreira, Dey, and Suffoletto (2018) found that phone usage features such as changes in phone activity, screen duration, call duration, and typing were associated with high-risk drinking among a sample of young adults. Other studies have utilized inertial sensors to detect gait and posture associated with alcohol consumption (Aiello & Agu, 2016) . However, to date, most of these studies have either focused on young adult samples or focused on sensor patterns associated with alcohol use itself, rather than thoughts, feelings, and behaviors that precede alcohol use. Future research could incorporate both EMA methods and passive data to reduce participant burden further while improving the accuracy of predictive models. All but one of the predictors of imminent drinking were in the expected direction. However, we did find one unexpected finding that "Is anyone you are interacting with drinking alcohol?" was negatively associated with drinking. This is especially puzzling because alcohol availability was, as expected, positively associated with drinking. Although we combined social pressure and alcohol availability into a single message track, being around other people who are drinking may be contextually different than being in places where alcohol is available; it takes an active choice to be around people who are drinking, whereas one may be in places where alcohol is close by (e.g., a liquor store) without making an active choice to be there. Also, the word "interacting" may be ambiguous or have a unique meaning for people experiencing homelessness (e.g., being in close proximity vs. having a personal connection). In any case, future research should explore this finding to determine the interplay between availability and social dynamics that increase risk for drinking. Additional qualitative work may help us to determine whether additional predictors or message tracks are necessary for this population. This study had a number of limitations. First, our sample was largely male (84.6%) and Black (65.4%), which limits the generalizability of our findings. However, both groups tend to be overrepresented among homeless adults; the Department of Housing and Urban Development estimates that 60% of homeless adults are male and 40% are Black (U.S. Department of Housing and Urban Development, 2020). Second, the study relied on selfreported measures. Although EMA tends to be a more accurate measure of drinking than retrospective point-in-time measures, the former still suffers from reporting bias and noncompliance (S. Shiffman, 2009) . We attempted to maximize compliance by paying participants based on the percent of EMA prompts they completed, giving the option to "snooze" assessments up to three times for 5 min each, and ensuring confidentiality of responses. (Note: participants were not paid for completing self-initiated "About to Drink" or "Just Drank" event sampling EMAs.) In a separately reported study, we looked at the relationship between self-reported EMA and transdermal alcohol collected via a SCRAM device worn on the ankle (Mun et al., 2021) . In general, we found that EMA was highly correlated with SCRAM-detected alcohol use. Participants used alcohol on 49% of days measured by SCRAM and 38% measured by EMA, where 73% of days were concordant. Furthermore, SCRAM's peak transdermal alcohol concentration estimate was highly correlated with EMA's alcohol use quantity measure (r = 0.46 and 0.78, respectively, at the day and person level for day x person data). This suggests not only that EMA reports were trustworthy, but that missed assessments did not strongly affect our results. Third, development of the risk algorithm itself has inherent limitations. To the extent that the current sample is idiosyncratic, the parameter estimates that the machine learning algorithms determined (and thus the variables selected) may not generalize to future samples. Relatedly, the number of EMAs that we used to develop the algorithm was relatively small; 7.3% of completed EMAs had imminent drinking (205 out of 2807). Statistical significance should be considered preliminary in the current research, as selection algorithms may be problematic with respect to inference after variable selection (Chatterjee & Mukhopadhyay, 2008) . Given that the research team developed the threshold for classifying imminent drinking to maximize the level of specificity when sensitivity was no lower than 0.80, the risk algorithm may yield false positives that result in some unwarranted or overbearing messages. Although superfluous prompts may produce some participant fatigue, ideally, such prompts would still have some positive influence on preventing imminent drinking and be offset by correctly predicting 4 in 5 true positives. Finally, we did not examine potential moderators such as gender, drinking severity, or length of time homeless, primarily because we focused on discovering modifiable daily and intra-day precursors of imminent drinking. Having said that, the complex relationships that exist across different explanatory levels may have yielded other valuable insights despite a significant increase in the complexity of the models. A follow-up study examining potential moderators of the relationships between the final set of predictors and imminent drinking would be a logical step in future research. The current study used machine learning to identify predictors of imminent drinking and create an alcohol use prediction algorithm. A seven-variable model predicted 80% of all drinking episodes within four hours of prompted EMAs. The research team has integrated this algorithm into a novel JITAI for adults experiencing homelessness with at-risk drinking. The resulting app contains hundreds of unique treatment messages to address the three strongest predictors of imminent drinking (i.e., urge to drink, easy availability of alcohol or social pressure to drink, negative affect). JITAI messages are tailored to each participant's current drinking goal (i.e., reduce drinking, stay sober, no drinking goal) and currently relevant drinking triggers. Our next step will be to test the feasibility of this JITAI in a new sample of adults experiencing homelessness. Future research will continue to refine the algorithm and message tracks to larger, more generalizable samples of homeless and domiciled adults. Refer to Web version on PubMed Central for supplementary material. This work was supported by NIAAA grant R34AA024584 awarded to MB and SW. This work was partially supported by the University of Oklahoma Health Sciences Center, Oklahoma Tobacco Settlement Endowment Trust (TSET) grant 092-016-0002, and NCI grant P30CA225520 awarded to the Stephenson Cancer Center, and the work used the mHealth Shared Resource. Walters et al. Page 20 Table 1 Baseline characteristics of participants who completed the equipment set-up visit (N = 78). a 4+ drinks per day for women / 5+ drinks per day for men. Two participants (2.6%) self-reported to be "Multi-racial," one (1.3%) identified as "American Indian/Alaska Native," and two (2.6%) identified as "Other." Walters et al. Page 21 Table 2 Odds ratios and 95% bootstrapped confidence intervals for the final model. Note: Direction of influence for dichotomous predictors is described in paren-theses. All other items were evaluated on a Likert-type scale from 1 (strongly disagree) to 5 (strongly agree). Investigating postural sway features, normalization and personalization in detecting blood alcohol levels of smartphone users Development and validation of a short-form, rapid estimate of adult literacy in medicine Having friends and feeling lonely: A daily process examination of transient loneliness, socialization, and drinking behavior Mobile phone sensors and supervised machine learning to identify alcohol use events in young adults: Implications for just-in-time adaptive interventions Mortality among homeless adults in Boston: Shifts in causes of death over a 15-year period Homelessness and health: Key themes from three decades of research Post-quit stress mediates the relation between social support and smoking cessation among socioeconomically disadvantaged adults. Drug and Alcohol Dependence Fitting linear mixed-effects models using lme4 The use of component-wise gradient boosting to assess the possible role of cognitive measures as markers of vulnerability to pediatric bipolar disorder Can shelter-based interventions improve treatment engagement in homeless individuals with psychiatric and/or substance misuse disorders?: A randomized controlled trial An ecological momentary intervention for smoking cessation: Evaluation of feasibility and effectiveness Using intensive longitudinal data collected via Mobile phone to detect imminent lapse in smokers undergoing a scheduled quit attempt Predicting quit attempts among homeless smokers seeking cessation treatment: An ecological momentary assessment study Reducing drinking among people experiencing homelessness: Protocol for the development and testing of a just-intime adaptive intervention Risk and resampling under model uncertainty How well does the theory of planned behaviour predict alcohol consumption? A systematic review and metaanalysis R: A language and environment for statistical computing Daily associations between anxiety and alcohol use: Variation by sustained attention, set shifting, and gender Prevalence, correlates, disability, and comorbidity of DSM-IV alcohol abuse and dependence in the United States: Results from the national epidemiologic survey on alcohol and related conditions The elements of statistical learning: Data mining, inference, and prediction A Mobile just-in-time adaptive intervention for smoking cessation: Pilot randomized controlled trial An ecological momentary intervention for smoking cessation: The associations of just-in-time, tailored messages with lapse risk factors Physical and sexual abuse among homeless and unstably housed adults living with HIV: Prevalence and associated risks Model-based boosting in R: A hands-on tutorial using the R package mboost Mboost: Model-based boosting Daily patterns of conjoint smoking and drinking in college student smokers Quantifying the impact of physical distance measures on the transmission of COVID-19 in the UK Do daily fluctuations in inhibitory control predict alcohol consumption? An ecological momentary assessment study Financial incentives for abstinence among socioeconomically disadvantaged individuals in smoking cessation treatment The Wiley-Blackwell handbook of addiction psychopharmacology Factors associated with use of urban emergency departments by the U.S. homeless population People experiencing homelessness: Their potential exposure to COVID-19 Differing patterns of stress and craving across the day in moderate-heavy alcohol consumers during their typical drinking routine and an imposed period of alcohol abstinence What predicts relapse? Prospective testing of antecedent models Daily interpersonal experiences, context, and alcohol consumption: Crying in your beer and toasting good times Ecological momentary assessment and alcohol use disorder treatment Homelessness as an independent risk factor for mortality: Results from a retrospective cohort study Prevalence and correlates of youth homelessness in the United States Ecological momentary assessment of alcohol consumption and its concordance with transdermal alcohol detection and timeline follow-back self-report among adults experiencing homelessness Just-in-time adaptive interventions (JITAIs) in mobile health: Key components and design principles for ongoing health behavior support Daily relationship between event-specific drinking norms and alcohol use: A four-year longitudinal study Retention of homeless clients in substance abuse treatment. Findings from the National Institute on Alcohol Abuse and Alcoholism cooperative agreement program In search of how people change. Applications to addictive behaviors A circumplex model of affect Self-determination theory and the facilitation of intrinsic motivation, social development, and well-being Drug use patterns and predictors among homeless youth: Results of an ecological momentary assessment Development of the alcoholuse disorders identification test (Audit): WHO collaborative project on early detection of persons with harmful alcohol consumption Cognitive-behavioral treatment of older veterans with substance abuse problems The impact of women's family status on completion of substance abuse treatment Ecological momentary assessment (EMA) in studies of substance use Remember that? A comparison of real-time versus retrospective recall of smoking lapses The contexts of heavy drinking: A systematic review of the combinations of context-related factors associated with heavy drinking occasions A comparison of coping assessed by ecological momentary assessment and retrospective recall Patient non-compliance with paper diaries Genetic and psychosocial predictors of aggression: Variable selection and model building with component-wise gradient boosting Using elastic net penalized cox proportional hazards regression to identify predictors of imminent smoking lapse The mini-mental state examination: A comprehensive review COVID-19: A potential public health problem for homeless populations The 2019 annual assessment report (AHAR) to congress, part 1: Point-in-time estimates of homelessness Inflammatory markers as predictors of depression and anxiety in adolescents: Statistical model building with component-wise gradient boosting The term "physical distancing" is recommended rather than "social distancing" during the COVID-19 pandemic for reducing feelings of rejection among people with mental health problems Advancing cessation research by integrating EMA and geospatial methodologies: Associations between tobacco retail outlets and real-time smoking urges during a quit attempt Identifying airborne transmission as the dominant route for the spread of COVID-19 The authors wish to thank Zhengqi Tan for his help with data preparation and analyses, Chuck Williams for his study coordination, and the staff and clients of the Bridge Homeless Recovery Center for their participation.Walters et al.Page 12