tot_sweet is a variable that added sweetbev (rr_14) + sweetfood
(rr_12) intake
tot_sweet_w is the within-person component
tot_sweet_b is person’s tot_sweet consumption on average compared to the average of the group
lag_totsweet_w is the totsweet_w at the previous timepoint (t-1) within day
drinknum is the # of drinks that person consumed in the last 3
hours (rr_01)
drinkyn is the binary variable whether that person drank on that
occasion or not
alc_urge is the momentary urge to drink alcohol from 0-10 (rr_02)
age_c is the grand-mean centered age (average age of participant
= 43.32 y.o.)
AI is American Indian & Native Americans
Asian is Asian
NHawaiianPI is Native Hawaiian/Pacific Islander
Black is Black/African American
Multiracial is multiracial
intarm is ther intervention type ( 0 = fitbit only, 1 = fitbit+LPA)
ICC revealed that 72.6% of the drinking episode can be explained between people vs. 27.4% being explained within people
drinkyn <- readRDS("drinkyn.rds")
summary(drinkyn)
## Family: bernoulli
## Links: mu = logit
## Formula: drinkyn ~ 1 + lag_totsweet_w + totsweet_p + intarm + (1 + totsweet_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## sd(Intercept) 3.09 0.46 2.31 4.10 1.00 5533
## sd(totsweet_w) 0.35 0.15 0.06 0.67 1.00 4231
## cor(Intercept,totsweet_w) -0.37 0.26 -0.80 0.23 1.00 11462
## Tail_ESS
## sd(Intercept) 9536
## sd(totsweet_w) 3423
## cor(Intercept,totsweet_w) 7535
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -3.97 0.93 -5.84 -2.16 1.00 6329 8287
## lag_totsweet_w 0.04 0.08 -0.12 0.19 1.00 37509 13388
## totsweet_p -1.36 0.82 -3.10 0.14 1.00 8185 9595
## intarm 0.17 0.87 -1.50 1.87 1.00 4919 8027
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
The results are shown in log odds so we are converting the estimates to Odds Ratio for interpretability.
coef_summary
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -3.97131650 0.9313019 -5.8423515 -2.1583385 1.000165 6328.896
## lag_totsweet_w 0.04184171 0.0799749 -0.1201853 0.1939674 1.000039 37508.975
## totsweet_p -1.35834535 0.8213482 -3.0950916 0.1424445 1.000025 8185.201
## intarm 0.17345127 0.8661883 -1.5031148 1.8738264 1.000787 4918.819
## Tail_ESS oddsratio oddsratio_l_CI oddsratio_u_CI
## Intercept 8286.857 0.0188486 0.002902011 0.1155169
## lag_totsweet_w 13387.728 1.0427294 0.886756137 1.2140567
## totsweet_p 9595.108 0.2570858 0.045270864 1.1530890
## intarm 8027.355 1.1894027 0.222436241 6.5131710
drinkyn_lagAlcUrge <- readRDS("drinkyn_lagAlcUrge.rds")
summary(drinkyn_lagAlcUrge)
## Family: bernoulli
## Links: mu = logit
## Formula: drinkyn ~ 1 + lag_alcurge_w + alcurge_b + intarm + (1 + lag_alcurge_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## sd(Intercept) 2.61 0.43 1.90 3.57 1.00 4181
## sd(lag_alcurge_w) 0.58 0.13 0.37 0.86 1.00 5959
## cor(Intercept,lag_alcurge_w) 0.37 0.21 -0.08 0.72 1.00 5153
## Tail_ESS
## sd(Intercept) 7002
## sd(lag_alcurge_w) 9479
## cor(Intercept,lag_alcurge_w) 8526
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -5.31 0.66 -6.73 -4.16 1.00 4519 7009
## lag_alcurge_w 0.05 0.14 -0.25 0.30 1.00 5727 7937
## alcurge_b 1.06 0.23 0.64 1.52 1.00 4365 6898
## intarm 0.55 0.76 -0.90 2.08 1.00 3523 5815
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
The results are shown in log odds so we are converting the estimates to Odds Ratio for interpretability.
coef2_summary
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -5.3063169 0.6552117 -6.7262709 -4.1571170 1.000443 4519.075
## lag_alcurge_w 0.0531104 0.1371712 -0.2461987 0.2971964 1.000416 5726.818
## alcurge_b 1.0598576 0.2256278 0.6405809 1.5232667 1.001401 4364.604
## intarm 0.5514496 0.7565881 -0.9009878 2.0789845 1.000128 3522.685
## Tail_ESS oddsratio oddsratio_l_CI oddsratio_u_CI
## Intercept 7008.829 0.004960162 0.001198996 0.01565262
## lag_alcurge_w 7936.602 1.054546062 0.781766843 1.34607962
## alcurge_b 6897.969 2.885960118 1.897582923 4.58718559
## intarm 5815.362 1.735767377 0.406168257 7.99634439
drinkyn_AlcUrge <- readRDS("drinkyn_AlcUrge.rds")
summary(drinkyn_AlcUrge)
## Family: bernoulli
## Links: mu = logit
## Formula: drinkyn ~ 1 + alcurge_w + alcurge_b + intarm + (1 + alcurge_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## sd(Intercept) 2.54 0.41 1.85 3.46 1.00 4078
## sd(alcurge_w) 0.70 0.13 0.47 1.00 1.00 6207
## cor(Intercept,alcurge_w) 0.28 0.20 -0.14 0.62 1.00 4645
## Tail_ESS
## sd(Intercept) 7174
## sd(alcurge_w) 9952
## cor(Intercept,alcurge_w) 8098
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -5.58 0.66 -7.00 -4.40 1.00 4666 7582
## alcurge_w 0.07 0.15 -0.24 0.34 1.00 5523 8107
## alcurge_b 1.07 0.23 0.65 1.54 1.00 4216 6900
## intarm 0.92 0.74 -0.50 2.41 1.00 4237 6849
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
The results are shown in log odds so we are converting the estimates to Odds Ratio for interpretability.
coef3_summary
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -5.58188521 0.6644275 -7.0027938 -4.4006022 1.000110 4665.614
## alcurge_w 0.06742547 0.1465668 -0.2371508 0.3438183 1.000180 5523.421
## alcurge_b 1.07038103 0.2260474 0.6488208 1.5364535 1.000519 4215.636
## intarm 0.91992790 0.7366609 -0.5022597 2.4097018 1.000400 4236.636
## Tail_ESS oddsratio oddsratio_l_CI oddsratio_u_CI
## Intercept 7581.991 0.00376546 0.0009093379 0.01226995
## alcurge_w 8107.284 1.06975053 0.7888723041 1.41032230
## alcurge_b 6900.322 2.91649057 1.9132832748 4.64807680
## intarm 6849.079 2.50910948 0.6051616127 11.13064132
ICC revealed that 51.7% of the drinking urge can be explained between people vs. 48.3% being explained within people
drinkurge_LagSweet_brm <- readRDS("drinkurge_LagSweet_brm.rds")
summary(drinkurge_LagSweet_brm)
## Family: zero_inflated_negbinomial
## Links: mu = log; shape = identity; zi = identity
## Formula: alc_urge ~ 1 + lag_totsweet_w + totsweet_b + intarm + dayinstudy + (1 + lag_totsweet_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.78 0.18 1.46 2.17 1.00
## sd(lag_totsweet_w) 0.11 0.05 0.03 0.21 1.00
## cor(Intercept,lag_totsweet_w) -0.73 0.24 -0.99 -0.12 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 2413 5316
## sd(lag_totsweet_w) 3931 5240
## cor(Intercept,lag_totsweet_w) 5146 7430
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.10 0.29 -0.69 0.45 1.00 1326 2727
## lag_totsweet_w 0.08 0.03 0.02 0.15 1.00 6029 9594
## totsweet_b 0.21 0.29 -0.35 0.78 1.00 2249 4100
## intarm 0.16 0.39 -0.61 0.94 1.00 1110 2241
## dayinstudy -0.00 0.00 -0.00 -0.00 1.00 18872 14319
##
## Family Specific Parameters:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## shape 14.37 4.86 8.27 26.45 1.00 15624 10832
## zi 0.41 0.01 0.38 0.43 1.00 17815 14212
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
drinkurge_coefsummary
## Estimate Est.Error l-95% CI u-95% CI Rhat
## Intercept -0.100674096 0.2913051702 -0.687807552 0.453185585 1.002173
## lag_totsweet_w 0.078632606 0.0327591850 0.017077058 0.145289826 1.000115
## totsweet_b 0.208376166 0.2866117883 -0.348491471 0.777727766 1.000367
## intarm 0.163544093 0.3861033112 -0.605480936 0.944377667 1.001945
## dayinstudy -0.001965248 0.0005412377 -0.003042806 -0.000906283 1.000030
## Bulk_ESS Tail_ESS oddsratio oddsratio_l_CI oddsratio_u_CI
## Intercept 1326.228 2726.834 0.9042277 0.5026770 1.5733161
## lag_totsweet_w 6029.263 9593.819 1.0818068 1.0172237 1.1563747
## totsweet_b 2249.456 4100.336 1.2316764 0.7057519 2.1765211
## intarm 1110.453 2240.883 1.1776773 0.5458119 2.5712127
## dayinstudy 18872.002 14319.410 0.9980367 0.9969618 0.9990941
drinkurge_Sweet_brm <- readRDS("drinkurge_sweet_brm.rds")
summary(drinkurge_Sweet_brm)
## Family: zero_inflated_negbinomial
## Links: mu = log; shape = identity; zi = identity
## Formula: alc_urge ~ 1 + totsweet_w + totsweet_b + intarm + dayinstudy + (1 + totsweet_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## sd(Intercept) 1.77 0.18 1.45 2.18 1.00 2297
## sd(totsweet_w) 0.04 0.03 0.00 0.12 1.00 3812
## cor(Intercept,totsweet_w) 0.04 0.54 -0.92 0.94 1.00 10434
## Tail_ESS
## sd(Intercept) 4091
## sd(totsweet_w) 5240
## cor(Intercept,totsweet_w) 10074
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.02 0.30 -0.61 0.57 1.00 1198 2202
## totsweet_w -0.01 0.02 -0.06 0.04 1.00 9635 8770
## totsweet_b 0.13 0.31 -0.47 0.75 1.00 1951 3721
## intarm 0.06 0.41 -0.79 0.86 1.00 1017 1756
## dayinstudy -0.00 0.00 -0.00 -0.00 1.00 18977 14536
##
## Family Specific Parameters:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## shape 13.88 4.83 8.24 25.25 1.00 11991 9655
## zi 0.41 0.01 0.38 0.43 1.00 15484 12401
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
drinkurge1_coefsummary
## Estimate Est.Error l-95% CI u-95% CI Rhat
## Intercept -0.023374302 0.3005448135 -0.609413397 0.5682809873 1.0008308
## totsweet_w -0.006677018 0.0237058113 -0.057116061 0.0378474234 1.0001179
## totsweet_b 0.134994926 0.3108597027 -0.465001572 0.7498038000 1.0021507
## intarm 0.058926741 0.4139674360 -0.793107848 0.8600455837 1.0020581
## dayinstudy -0.002026564 0.0005371555 -0.003077399 -0.0009819024 0.9999589
## Bulk_ESS Tail_ESS oddsratio oddsratio_l_CI oddsratio_u_CI
## Intercept 1198.262 2201.740 0.9768968 0.5436697 1.7652300
## totsweet_w 9635.411 8770.453 0.9933452 0.9444844 1.0385728
## totsweet_b 1951.198 3721.255 1.1445310 0.6281341 2.1165847
## intarm 1016.979 1756.051 1.0606975 0.4524365 2.3632684
## dayinstudy 18976.735 14536.198 0.9979755 0.9969273 0.9990186
drinkurge_LagSweetUrge_brm <- readRDS("drinkurge3_zinb.rds")
summary(drinkurge_LagSweetUrge_brm)
## Family: zero_inflated_negbinomial
## Links: mu = log; shape = identity; zi = identity
## Formula: alc_urge ~ 1 + lag_totsweeturge_w + totsweeturge_b + intarm + dayinstudy + (1 + totsweeturge_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.60 0.16 1.31 1.95 1.00
## sd(totsweeturge_w) 0.10 0.02 0.06 0.15 1.00
## cor(Intercept,totsweeturge_w) -0.36 0.21 -0.71 0.11 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 3289 6199
## sd(totsweeturge_w) 3434 5940
## cor(Intercept,totsweeturge_w) 3698 7139
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept 0.03 0.27 -0.52 0.53 1.00 1962 3911
## lag_totsweeturge_w 0.02 0.01 0.01 0.04 1.00 25446 13698
## totsweeturge_b 0.35 0.08 0.19 0.51 1.00 2843 4731
## intarm 0.14 0.36 -0.56 0.86 1.00 1998 4142
## dayinstudy -0.00 0.00 -0.00 -0.00 1.00 19035 14527
##
## Family Specific Parameters:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## shape 25.81 18.07 11.09 69.35 1.00 14284 9273
## zi 0.40 0.01 0.37 0.43 1.00 20425 14165
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
drinkurge_LagSweetUrge
## Estimate Est.Error l-95% CI u-95% CI
## Intercept 0.027000750 0.2679405098 -0.520015569 0.5313847340
## lag_totsweeturge_w 0.023104735 0.0069462080 0.009503327 0.0369366474
## totsweeturge_b 0.350881208 0.0814303748 0.194276774 0.5136263895
## intarm 0.136488143 0.3596156246 -0.557252762 0.8617809263
## dayinstudy -0.001638064 0.0005368161 -0.002687779 -0.0005898716
## Rhat Bulk_ESS Tail_ESS oddsratio oddsratio_l_CI
## Intercept 1.001173 1962.170 3911.200 1.0273686 0.5945113
## lag_totsweeturge_w 1.000090 25445.646 13697.981 1.0233737 1.0095486
## totsweeturge_b 1.000563 2842.798 4730.576 1.4203186 1.2144324
## intarm 1.000664 1998.181 4141.766 1.1462413 0.5727805
## dayinstudy 1.000070 19035.304 14526.858 0.9983633 0.9973158
## oddsratio_u_CI
## Intercept 1.7012865
## lag_totsweeturge_w 1.0376273
## totsweeturge_b 1.6713412
## intarm 2.3673731
## dayinstudy 0.9994103
drinkurge_LagCurr_Urge_brm <- readRDS("alcurge_lag_cur_SweetUrge.rds")
summary(drinkurge_LagCurr_Urge_brm)
## Family: gaussian
## Links: mu = identity; sigma = identity
## Formula: alc_urge ~ 1 + lag_totsweeturge_w + totsweeturge_w + totsweeturge_b + intarm + dayinstudy + (1 + totsweeturge_w | id)
## Data: df (Number of observations: 4554)
## Draws: 2 chains, each with iter = 10000; warmup = 1000; thin = 1;
## total post-warmup draws = 18000
##
## Group-Level Effects:
## ~id (Number of levels: 77)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.54 0.13 1.30 1.83 1.00
## sd(totsweeturge_w) 0.19 0.03 0.14 0.24 1.00
## cor(Intercept,totsweeturge_w) -0.01 0.16 -0.31 0.31 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 2069 3891
## sd(totsweeturge_w) 4756 8492
## cor(Intercept,totsweeturge_w) 4016 7416
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept 1.69 0.26 1.17 2.20 1.00 1211 1921
## lag_totsweeturge_w 0.05 0.01 0.03 0.07 1.00 23885 14254
## totsweeturge_w 0.08 0.03 0.03 0.14 1.00 3885 7403
## totsweeturge_b 0.36 0.09 0.19 0.52 1.00 1469 3328
## intarm -0.29 0.35 -0.98 0.40 1.00 1130 2138
## dayinstudy -0.00 0.00 -0.00 0.00 1.00 20474 13517
##
## Family Specific Parameters:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma 1.59 0.02 1.56 1.62 1.00 23202 13879
##
## Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
drinkurge_LagCurSweetUrge
## Estimate Est.Error l-95% CI u-95% CI Rhat
## Intercept 1.6877227058 0.258137240 1.173647092 2.19653479 1.0009134
## lag_totsweeturge_w 0.0482231543 0.011438662 0.025763176 0.07028792 1.0001920
## totsweeturge_w 0.0823255350 0.028370984 0.026100820 0.13770471 1.0005518
## totsweeturge_b 0.3558223777 0.085406680 0.187191689 0.52182402 1.0031308
## intarm -0.2935925582 0.351505281 -0.979990269 0.40332077 1.0001651
## dayinstudy -0.0005446699 0.000794239 -0.002107086 0.00103048 0.9999963
## Bulk_ESS Tail_ESS oddsratio oddsratio_l_CI oddsratio_u_CI
## Intercept 1210.584 1921.117 5.4071530 3.2337650 8.993794
## lag_totsweeturge_w 23884.973 14253.795 1.0494048 1.0260979 1.072817
## totsweeturge_w 3884.965 7402.793 1.0858092 1.0264444 1.147637
## totsweeturge_b 1468.999 3327.680 1.4273540 1.2058584 1.685099
## intarm 1129.666 2138.399 0.7455802 0.3753148 1.496787
## dayinstudy 20474.005 13516.787 0.9994555 0.9978951 1.001031