H1. Do friend ranks predict WTRs?

conclusion: yes, friend ranks predict WTR, B = -.07, t(96.27) - -10.22, p < .001

h1 <- lmer(wtr ~ rank + (rank|subID), data = long_final)
summary(h1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: wtr ~ rank + (rank | subID)
##    Data: long_final
## 
## REML criterion at convergence: -608.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.6748 -0.4594  0.0023  0.4245  5.5443 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev. Corr 
##  subID    (Intercept) 0.050945 0.2257        
##           rank        0.003025 0.0550   -0.24
##  Residual             0.027067 0.1645        
## Number of obs: 1349, groups:  subID, 99
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  0.791306   0.025422 95.509076   31.13   <2e-16 ***
## rank        -0.070829   0.006933 96.268621  -10.22   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##      (Intr)
## rank -0.415
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1106 rows containing non-finite values (stat_smooth).
## Warning: Removed 1106 rows containing missing values (geom_point).

H2. Do WTRs predict gratitude?

Level 1: grat = Bo + B1wtr + Eij Level 2: Bo = a00 + uoj

conclusion: yes, WTR predicts gratitude, B = 2.84, t(67.49) = 9.28, p < .001

h2<- lmer(grat ~ wtr + (wtr|subID), data = long_final)
summary(h2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: grat ~ wtr + (wtr | subID)
##    Data: long_final
## 
## REML criterion at convergence: 3965.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.5940 -0.5511  0.0469  0.6110  3.0688 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev. Corr 
##  subID    (Intercept) 1.847    1.359         
##           wtr         3.890    1.972    -0.60
##  Residual             1.573    1.254         
## Number of obs: 1118, groups:  subID, 99
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)   1.8537     0.2009 66.9036   9.227 1.52e-13 ***
## wtr           2.8354     0.3056 67.4881   9.279 1.14e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##     (Intr)
## wtr -0.779
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1337 rows containing non-finite values (stat_smooth).
## Warning: Removed 1337 rows containing missing values (geom_point).

H3. Do changes in WTRs predict gratitude each week?

conclusion: yes, change in WTR predicts gratitude at week 5, B = 1.07, t(106.31) = 2.05, p = .043

h4 <- lmer(grat5 ~ wtrDiff + (wtrDiff | subID), data = WTR)
summary(h4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: grat5 ~ wtrDiff + (wtrDiff | subID)
##    Data: WTR
## 
## REML criterion at convergence: 1701.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1717 -0.7211  0.1932  0.7425  1.7150 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev. Corr
##  subID    (Intercept) 0.25276  0.5028       
##           wtrDiff     0.08085  0.2843   1.00
##  Residual             3.07820  1.7545       
## Number of obs: 423, groups:  subID, 53
## 
## Fixed effects:
##             Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)   3.4783     0.1134  46.2588  30.665   <2e-16 ***
## wtrDiff       1.0663     0.5196 106.3070   2.052   0.0426 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##         (Intr)
## wtrDiff 0.070
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1541 rows containing non-finite values (stat_smooth).
## Warning: Removed 1541 rows containing missing values (geom_point).