Models predicting Urges

These analayses were conducted using day-level variables.
ICC revealed that 62.6% of the drinking urge (y/n) can be explained between people vs. 37.4% being explained within people

Pain –> Sleep –> Urge

Pain –> Urge

alcurge_pain <- readRDS("alcurge_yn_pain.rds")
summary(alcurge_pain)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: alcurge_today_yn ~ 1 + pain_yesterday_w + pain_b + dayinstudy +  
##     (1 + pain_yesterday_w | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##    895.8    929.1   -440.9    881.8      850 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.1685 -0.5206  0.1299  0.5020  3.5214 
## 
## Random effects:
##  Groups Name             Variance Std.Dev. Corr
##  id     (Intercept)      5.21555  2.2838       
##         pain_yesterday_w 0.03012  0.1735   0.28
## Number of obs: 857, groups:  id, 72
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)   
## (Intercept)       0.644712   0.330685   1.950  0.05122 . 
## pain_yesterday_w -0.046138   0.067756  -0.681  0.49591   
## pain_b            0.429592   0.154418   2.782  0.00540 **
## dayinstudy       -0.008969   0.003174  -2.825  0.00472 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) pn_ys_ pain_b
## pn_ystrdy_w  0.084              
## pain_b       0.033  0.037       
## dayinstudy  -0.344  0.013 -0.019
  • Increases in yesterday’s pain was not significantly associated with odds of experiencing alcohol urge the next day.
  • Person’s overall pain relative to others in the group was associated with higher odds of experiencing alcohol urges over the study period

Sleep –> Urge

alcurge_sleep <- readRDS("alcurge_yn_sleep.rds")
summary(alcurge_sleep)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: alcurge_today_yn ~ 1 + sleeplastnight_w + sleeplastnight_b +  
##     dayinstudy + (1 + sleeplastnight_w | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##    885.2    918.5   -435.6    871.2      850 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8277 -0.5463  0.0755  0.4743  4.0320 
## 
## Random effects:
##  Groups Name             Variance Std.Dev. Corr 
##  id     (Intercept)      5.19744  2.2798        
##         sleeplastnight_w 0.02804  0.1674   -0.08
## Number of obs: 857, groups:  id, 72
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       0.893574   0.343976   2.598 0.009383 ** 
## sleeplastnight_w  0.079018   0.053825   1.468 0.142092    
## sleeplastnight_b  0.702271   0.204356   3.437 0.000589 ***
## dayinstudy       -0.009241   0.003220  -2.870 0.004104 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##              (Intr) slplstnght_w slplstnght_b
## slplstnght_w -0.022                          
## slplstnght_b  0.255 -0.039                   
## dayinstudy   -0.340  0.022       -0.024
  • Increases in sleep disturbance more than the average level of sleep disturbance was not associated with odds of experiencing alcohol urge today
  • Person’s overall sleep disturbance relative to others in the group was associated with higher odds of experiencing alcohol urges over the study period

Pain –> Sleep

sleep_pain <- readRDS("sleep_pain.rds")
summary(sleep_pain)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: Negative Binomial(1.2708)  ( log )
## Formula: sleep_lastnight ~ 1 + pain_yesterday_w + pain_b + dayinstudy +  
##     (1 | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##   3557.8   3586.3  -1772.9   3545.8      851 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.0319 -0.7793 -0.1752  0.4588  5.0220 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  id     (Intercept) 0.3982   0.631   
## Number of obs: 857, groups:  id, 72
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       0.816152   0.100572   8.115 4.85e-16 ***
## pain_yesterday_w  0.018299   0.021300   0.859  0.39028    
## pain_b            0.115298   0.043538   2.648  0.00809 ** 
## dayinstudy       -0.001934   0.001333  -1.450  0.14693    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) pn_ys_ pain_b
## pn_ystrdy_w  0.029              
## pain_b      -0.032  0.000       
## dayinstudy  -0.457 -0.062 -0.015
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## Model is nearly unidentifiable: very large eigenvalue
##  - Rescale variables?
  • Increase in pain yesterday more than usual was not associated with worse sleep quality over night
  • Person’s overall pain relative to others in the group was associated with higher odds of levels of sleep disturbances over the study period

Pain –> Sleep –> cig urge Urge

These analayses were conducted using day-level variables.
ICC revealed that 56.1% of the Cig urge (y/n) can be explained between people vs. 43.9% being explained within people

Pain –> Cig Urge

cigcurge_pain <- readRDS("cigurge_yn_pain.rds")
summary(cigcurge_pain)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: cigurgetoday_yn ~ 1 + pain_yesterday_w + pain_b + dayinstudy +  
##     (1 + pain_yesterday_w | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##    329.4    356.6   -157.7    315.4      354 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.9588 -0.3060  0.1741  0.4186  1.7413 
## 
## Random effects:
##  Groups Name             Variance Std.Dev. Corr
##  id     (Intercept)      4.9464   2.2241       
##         pain_yesterday_w 0.1403   0.3745   0.25
## Number of obs: 361, groups:  id, 30
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       2.159799   0.601725   3.589 0.000332 ***
## pain_yesterday_w -0.043318   0.173820  -0.249 0.803196    
## pain_b            0.167660   0.263901   0.635 0.525224    
## dayinstudy       -0.003966   0.006047  -0.656 0.511916    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) pn_ys_ pain_b
## pn_ystrdy_w  0.089              
## pain_b       0.155 -0.094       
## dayinstudy  -0.402 -0.193  0.031
  • Increases in yesterday’s pain more than usual was not significantly associated with odds of experiencing cigarette urge the next day.
  • Person’s overall pain relative to others in the group was NOT associated with higher odds of experiencing cigarette urges over the study period

Sleep –> cig Urge

cigurge_sleep <- readRDS("cigurge_yn_sleep.rds")
summary(cigurge_sleep)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## cigurgetoday_yn ~ 1 + sleeplastnight_w + sleeplastnight_b + dayinstudy +  
##     (1 + sleeplastnight_w | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##    327.8    355.0   -156.9    313.8      354 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.3398 -0.4337  0.1887  0.4191  2.3110 
## 
## Random effects:
##  Groups Name             Variance Std.Dev. Corr 
##  id     (Intercept)      4.20413  2.0504        
##         sleeplastnight_w 0.04517  0.2125   -0.69
## Number of obs: 361, groups:  id, 30
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       1.993240   0.563498   3.537 0.000404 ***
## sleeplastnight_w -0.086847   0.127210  -0.683 0.494792    
## sleeplastnight_b  0.287561   0.236544   1.216 0.224108    
## dayinstudy        0.001139   0.005840   0.195 0.845423    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##              (Intr) slplstnght_w slplstnght_b
## slplstnght_w -0.232                          
## slplstnght_b  0.337 -0.022                   
## dayinstudy   -0.383 -0.006       -0.081
  • Increases in sleep disturbance more than the average level of sleep disturbance was not associated with odds of experiencing cigarette urge today
  • Person’s overall sleep disturbance relative to others in the group was NOT associated with higher odds of experiencing cigarette urges over the study period

Pain –> Sleep –> can urge Urge

These analayses were conducted using day-level variables.
ICC revealed that 65.8% of the can urge (y/n) can be explained between people vs. 34.2% being explained within people

Pain –> Can Urge

cancurge_pain <- readRDS("canurge_yn_pain.rds")
summary(cancurge_pain)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: canurgetoday_yn ~ 1 + pain_yesterday_w + pain_b + dayinstudy +  
##     (1 | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##    236.0    253.8   -113.0    226.0      256 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8178 -0.3459  0.0622  0.3890  3.2493 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  id     (Intercept) 4.654    2.157   
## Number of obs: 261, groups:  id, 25
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)   
## (Intercept)       0.260062   0.554264   0.469  0.63893   
## pain_yesterday_w -0.094704   0.101604  -0.932  0.35129   
## pain_b            0.863409   0.329012   2.624  0.00868 **
## dayinstudy       -0.001186   0.006421  -0.185  0.85346   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) pn_ys_ pain_b
## pn_ystrdy_w -0.088              
## pain_b       0.008 -0.022       
## dayinstudy  -0.387  0.221  0.028
  • Increases in yesterday’s pain more than usual was not significantly associated with odds of experiencing cannabis urge the next day.
  • Person’s overall pain relative to others in the group was associated with higher odds of experiencing cannabis urges over the study period

Sleep –> Can Urge

canurge_sleep <- readRDS("canurge_yn_sleep.rds")
summary(canurge_sleep)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: 
## canurgetoday_yn ~ 1 + sleeplastnight_w + sleeplastnight_b + dayinstudy +  
##     (1 | id)
##    Data: df
## 
##      AIC      BIC   logLik deviance df.resid 
##    235.7    253.5   -112.9    225.7      256 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5448 -0.3211  0.0725  0.3856  3.5998 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  id     (Intercept) 4.766    2.183   
## Number of obs: 261, groups:  id, 25
## 
## Fixed effects:
##                   Estimate Std. Error z value Pr(>|z|)   
## (Intercept)      0.7280780  0.5988949   1.216  0.22410   
## sleeplastnight_w 0.0204775  0.0767942   0.267  0.78974   
## sleeplastnight_b 0.8820732  0.3277686   2.691  0.00712 **
## dayinstudy       0.0005312  0.0062689   0.085  0.93248   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##              (Intr) slplstnght_w slplstnght_b
## slplstnght_w  0.018                          
## slplstnght_b  0.353  0.011                   
## dayinstudy   -0.337 -0.043        0.045
  • Increases in sleep disturbance more than the average level of sleep disturbance was not associated with odds of experiencing cannabis urge today
  • Person’s overall higher levels of sleep disturbance relative to others in the group was associated with higher odds of experiencing cigarette urges over the study period