1 PREPARATION

1.1 Illustration for three-level data analysis

Finch, W. H., Bolin, J. E., & Kelley, K. (2019: 80). Multilevel modeling using r. CRC Press. https://books.google.com/books?id=JxemDwAAQBAJ

https://www.alexanderdemos.org/Mixed5.html#3_Level_Random_intercepts_model

1.2 Loading data

1.3 Primary analysis

1.3.1 ICC

## 
## Hierarchical Linear Model (HLM)
## (also known as) Linear Mixed Model (LMM)
## (also known as) Multilevel Linear Model (MLM)
## 
## Model Information:
## Formula: X ~ 1 + (1 | L3/L2)
## Level-1 Observations: N = 1412
## Level-2 Groups/Clusters: L2:L3, 231; L3, 20
## 
## Model Fit:
## AIC = 3450.175
## BIC = 3471.186
## R_(m)² = 0.00000  (Marginal R²: fixed effects)
## R_(c)² = 0.05753  (Conditional R²: fixed + random effects)
## Omega² = 0.09620  (= 1 - proportion of unexplained variance)
## 
## Fixed Effects:
## Unstandardized Coefficients (b or γ):
## Outcome Variable: X
## ───────────────────────────────────────────────────────────────
##                b/γ    S.E.      t  df     p     [95% CI of b/γ]
## ───────────────────────────────────────────────────────────────
## (Intercept)  4.203 (0.026) 162.32 8.7 <.001 ***  [4.144, 4.262]
## ───────────────────────────────────────────────────────────────
## 'df' is estimated by Satterthwaite approximation.
## 
## Random Effects:
## ──────────────────────────────────────────
##  Cluster  K   Parameter   Variance     ICC
## ──────────────────────────────────────────
##  L2:L3    231 (Intercept)  0.03860 0.05723
##  L3        20 (Intercept)  0.00020 0.00029
##  Residual                  0.63558        
## ──────────────────────────────────────────
## 
## Hierarchical Linear Model (HLM)
## (also known as) Linear Mixed Model (LMM)
## (also known as) Multilevel Linear Model (MLM)
## 
## Model Information:
## Formula: M1 ~ 1 + (1 | L3/L2)
## Level-1 Observations: N = 1412
## Level-2 Groups/Clusters: L2:L3, 231; L3, 20
## 
## Model Fit:
## AIC = 3951.789
## BIC = 3972.801
## R_(m)² = 0.00000  (Marginal R²: fixed effects)
## R_(c)² = 0.05450  (Conditional R²: fixed + random effects)
## Omega² = 0.08917  (= 1 - proportion of unexplained variance)
## 
## Fixed Effects:
## Unstandardized Coefficients (b or γ):
## Outcome Variable: M1
## ───────────────────────────────────────────────────────────────
##                b/γ    S.E.     t   df     p     [95% CI of b/γ]
## ───────────────────────────────────────────────────────────────
## (Intercept)  3.598 (0.040) 89.99 17.7 <.001 ***  [3.514, 3.682]
## ───────────────────────────────────────────────────────────────
## 'df' is estimated by Satterthwaite approximation.
## 
## Random Effects:
## ──────────────────────────────────────────
##  Cluster  K   Parameter   Variance     ICC
## ──────────────────────────────────────────
##  L2:L3    231 (Intercept)  0.04138 0.04292
##  L3        20 (Intercept)  0.01116 0.01157
##  Residual                  0.91143        
## ──────────────────────────────────────────
## 
## Hierarchical Linear Model (HLM)
## (also known as) Linear Mixed Model (LMM)
## (also known as) Multilevel Linear Model (MLM)
## 
## Model Information:
## Formula: M2 ~ 1 + (1 | L3/L2)
## Level-1 Observations: N = 1412
## Level-2 Groups/Clusters: L2:L3, 231; L3, 20
## 
## Model Fit:
## AIC = 3473.099
## BIC = 3494.110
## R_(m)² = 0.00000  (Marginal R²: fixed effects)
## R_(c)² = 0.00127  (Conditional R²: fixed + random effects)
## Omega² = 0.00223  (= 1 - proportion of unexplained variance)
## 
## Fixed Effects:
## Unstandardized Coefficients (b or γ):
## Outcome Variable: M2
## ────────────────────────────────────────────────────────────────
##                b/γ    S.E.      t   df     p     [95% CI of b/γ]
## ────────────────────────────────────────────────────────────────
## (Intercept)  4.682 (0.023) 201.04 12.7 <.001 ***  [4.632, 4.733]
## ────────────────────────────────────────────────────────────────
## 'df' is estimated by Satterthwaite approximation.
## 
## Random Effects:
## ──────────────────────────────────────────
##  Cluster  K   Parameter   Variance     ICC
## ──────────────────────────────────────────
##  L2:L3    231 (Intercept)  0.00000 0.00000
##  L3        20 (Intercept)  0.00087 0.00127
##  Residual                  0.67817        
## ──────────────────────────────────────────
## 
## Hierarchical Linear Model (HLM)
## (also known as) Linear Mixed Model (LMM)
## (also known as) Multilevel Linear Model (MLM)
## 
## Model Information:
## Formula: Y ~ 1 + (1 | L3/L2)
## Level-1 Observations: N = 1412
## Level-2 Groups/Clusters: L2:L3, 231; L3, 20
## 
## Model Fit:
## AIC = 4195.747
## BIC = 4216.758
## R_(m)² = 0.00000  (Marginal R²: fixed effects)
## R_(c)² = 0.01386  (Conditional R²: fixed + random effects)
## Omega² = 0.02185  (= 1 - proportion of unexplained variance)
## 
## Fixed Effects:
## Unstandardized Coefficients (b or γ):
## Outcome Variable: Y
## ───────────────────────────────────────────────────────────────
##                b/γ    S.E.     t   df     p     [95% CI of b/γ]
## ───────────────────────────────────────────────────────────────
## (Intercept)  1.973 (0.039) 50.70 14.8 <.001 ***  [1.889, 2.056]
## ───────────────────────────────────────────────────────────────
## 'df' is estimated by Satterthwaite approximation.
## 
## Random Effects:
## ──────────────────────────────────────────
##  Cluster  K   Parameter   Variance     ICC
## ──────────────────────────────────────────
##  L2:L3    231 (Intercept)  0.00529 0.00465
##  L3        20 (Intercept)  0.01048 0.00921
##  Residual                  1.12104        
## ──────────────────────────────────────────
## 
## Hierarchical Linear Model (HLM)
## (also known as) Linear Mixed Model (LMM)
## (also known as) Multilevel Linear Model (MLM)
## 
## Model Information:
## Formula: W ~ 1 + (1 | L3/L2)
## Level-1 Observations: N = 1412
## Level-2 Groups/Clusters: L2:L3, 231; L3, 20
## 
## Model Fit:
## AIC = 3208.095
## BIC = 3229.106
## R_(m)² = 0.00000  (Marginal R²: fixed effects)
## R_(c)² = 0.08532  (Conditional R²: fixed + random effects)
## Omega² = 0.12400  (= 1 - proportion of unexplained variance)
## 
## Fixed Effects:
## Unstandardized Coefficients (b or γ):
## Outcome Variable: W
## ───────────────────────────────────────────────────────────────
##                b/γ    S.E.     t   df     p     [95% CI of b/γ]
## ───────────────────────────────────────────────────────────────
## (Intercept)  2.922 (0.038) 77.88 14.9 <.001 ***  [2.842, 3.002]
## ───────────────────────────────────────────────────────────────
## 'df' is estimated by Satterthwaite approximation.
## 
## Random Effects:
## ──────────────────────────────────────────
##  Cluster  K   Parameter   Variance     ICC
## ──────────────────────────────────────────
##  L2:L3    231 (Intercept)  0.03562 0.06171
##  L3        20 (Intercept)  0.01362 0.02360
##  Residual                  0.52795        
## ──────────────────────────────────────────

1.3.2 Multilevel correlations and descriptive analysis

## Descriptive Statistics:
## ──────────────────────────────────────────────────────────────────
##        N (NA)   Mean    SD | Median   Min    Max Skewness Kurtosis
## ──────────────────────────────────────────────────────────────────
## L2  1412      120.22 70.45 | 121.00  1.00 253.00    -0.02    -1.06
## L3  1412       11.02  5.76 |  13.00  1.00  21.00    -0.31    -1.26
## X   1412        4.20  0.82 |   4.00  1.00   6.00    -0.50     1.41
## M1  1412        3.59  0.98 |   3.62  1.00   6.00    -0.00    -0.04
## M2  1412        4.68  0.82 |   5.00  1.00   6.00    -0.72     2.07
## Y   1412        1.97  1.07 |   1.59  1.00   6.00     0.98     0.07
## W   1412        2.93  0.76 |   3.00  1.00   6.00     0.07     1.10
## C2  1412        1.70  0.46 |   2.00  1.00   2.00    -0.87    -1.25
## C3  1412       34.78  8.63 |  34.00 20.00  58.00     0.36    -0.80
## C4  1412        2.80  0.61 |   3.00  1.00   4.00    -0.19     0.15
## C6  1411    1   2.37  4.07 |   1.00  0.03  40.00     4.09    20.91
## C7  1412        3.23  2.12 |   3.00  1.00   8.00     0.49    -1.01
## ──────────────────────────────────────────────────────────────────
## Correlations below and above the diagonal represent
## within-level and between-level correlations, respectively:
## ────────────────────────────────────────────────────────────────────────────
##     L3      X     M1     M2      Y      W     C2     C3     C4     C6     C7
## ────────────────────────────────────────────────────────────────────────────
## L3     -0.067 -0.032  0.165  0.048  0.015  0.062  0.153 -0.343  0.009  0.016
## X       1.000  0.346  0.166 -0.044  0.214 -0.033 -0.152  0.112 -0.034 -0.097
## M1      0.312  1.000  0.053  0.069  0.346  0.012 -0.187  0.134 -0.066  0.004
## M2      0.215  0.112  1.000 -0.169 -0.026 -0.009  0.217 -0.184  0.151  0.165
## Y      -0.029  0.052 -0.175  1.000  0.101 -0.106 -0.190 -0.014 -0.101 -0.024
## W       0.232  0.287  0.029  0.053  1.000  0.019 -0.186  0.020  0.004 -0.077
## C2     -0.018 -0.109  0.109 -0.106  0.010  1.000  0.198 -0.196  0.190  0.171
## C3     -0.171 -0.161  0.028 -0.075 -0.092  0.095  1.000 -0.578  0.187  0.196
## C4      0.107  0.105 -0.036  0.062 -0.014 -0.097 -0.554  1.000 -0.104 -0.282
## C6     -0.089 -0.045  0.023 -0.043 -0.036  0.018  0.285 -0.196  1.000 -0.045
## C7      0.047 -0.016  0.146 -0.036  0.001  0.067  0.325 -0.154  0.058  1.000
## ────────────────────────────────────────────────────────────────────────────
## 
## Within-Level Correlation [95% CI]:
## ──────────────────────────────────────────────
##                   r         [95% CI]     p    
## ──────────────────────────────────────────────
## L3.wg-X.wg                                    
## L3.wg-M1.wg                                   
## L3.wg-M2.wg                                   
## L3.wg-Y.wg                                    
## L3.wg-W.wg                                    
## L3.wg-C2.wg                                   
## L3.wg-C3.wg                                   
## L3.wg-C4.wg                                   
## L3.wg-C6.wg                                   
## L3.wg-C7.wg                                   
## X.wg-M1.wg    0.312 [ 0.264,  0.358] <.001 ***
## X.wg-M2.wg    0.215 [ 0.164,  0.264] <.001 ***
## X.wg-Y.wg    -0.029 [-0.081,  0.023]  .275    
## X.wg-W.wg     0.232 [ 0.182,  0.281] <.001 ***
## X.wg-C2.wg   -0.018 [-0.070,  0.034]  .504    
## X.wg-C3.wg   -0.171 [-0.221, -0.120] <.001 ***
## X.wg-C4.wg    0.107 [ 0.055,  0.158] <.001 ***
## X.wg-C6.wg   -0.089 [-0.141, -0.037] <.001 ***
## X.wg-C7.wg    0.047 [-0.005,  0.099]  .079 .  
## M1.wg-M2.wg   0.112 [ 0.061,  0.164] <.001 ***
## M1.wg-Y.wg    0.052 [-0.000,  0.104]  .051 .  
## M1.wg-W.wg    0.287 [ 0.238,  0.334] <.001 ***
## M1.wg-C2.wg  -0.109 [-0.161, -0.058] <.001 ***
## M1.wg-C3.wg  -0.161 [-0.211, -0.109] <.001 ***
## M1.wg-C4.wg   0.105 [ 0.053,  0.156] <.001 ***
## M1.wg-C6.wg  -0.045 [-0.097,  0.007]  .090 .  
## M1.wg-C7.wg  -0.016 [-0.068,  0.036]  .552    
## M2.wg-Y.wg   -0.175 [-0.225, -0.124] <.001 ***
## M2.wg-W.wg    0.029 [-0.023,  0.081]  .277    
## M2.wg-C2.wg   0.109 [ 0.057,  0.160] <.001 ***
## M2.wg-C3.wg   0.028 [-0.024,  0.080]  .294    
## M2.wg-C4.wg  -0.036 [-0.088,  0.016]  .172    
## M2.wg-C6.wg   0.023 [-0.029,  0.075]  .382    
## M2.wg-C7.wg   0.146 [ 0.095,  0.197] <.001 ***
## Y.wg-W.wg     0.053 [ 0.001,  0.105]  .047 *  
## Y.wg-C2.wg   -0.106 [-0.157, -0.054] <.001 ***
## Y.wg-C3.wg   -0.075 [-0.126, -0.023]  .005 ** 
## Y.wg-C4.wg    0.062 [ 0.009,  0.113]  .021 *  
## Y.wg-C6.wg   -0.043 [-0.094,  0.010]  .110    
## Y.wg-C7.wg   -0.036 [-0.088,  0.016]  .174    
## W.wg-C2.wg    0.010 [-0.042,  0.063]  .697    
## W.wg-C3.wg   -0.092 [-0.143, -0.040] <.001 ***
## W.wg-C4.wg   -0.014 [-0.066,  0.038]  .605    
## W.wg-C6.wg   -0.036 [-0.088,  0.016]  .176    
## W.wg-C7.wg    0.001 [-0.051,  0.054]  .960    
## C2.wg-C3.wg   0.095 [ 0.043,  0.146] <.001 ***
## C2.wg-C4.wg  -0.097 [-0.148, -0.045] <.001 ***
## C2.wg-C6.wg   0.018 [-0.035,  0.070]  .506    
## C2.wg-C7.wg   0.067 [ 0.015,  0.118]  .012 *  
## C3.wg-C4.wg  -0.554 [-0.589, -0.517] <.001 ***
## C3.wg-C6.wg   0.285 [ 0.236,  0.332] <.001 ***
## C3.wg-C7.wg   0.325 [ 0.277,  0.371] <.001 ***
## C4.wg-C6.wg  -0.196 [-0.245, -0.145] <.001 ***
## C4.wg-C7.wg  -0.154 [-0.205, -0.103] <.001 ***
## C6.wg-C7.wg   0.058 [ 0.006,  0.110]  .028 *  
## ──────────────────────────────────────────────
## 
## Between-Level Correlation [95% CI]:
## ──────────────────────────────────────────────
##                   r         [95% CI]     p    
## ──────────────────────────────────────────────
## L3.bg-X.bg   -0.067 [-0.195,  0.063]  .310    
## L3.bg-M1.bg  -0.032 [-0.161,  0.097]  .626    
## L3.bg-M2.bg   0.165 [ 0.037,  0.288]  .012 *  
## L3.bg-Y.bg    0.048 [-0.082,  0.176]  .471    
## L3.bg-W.bg    0.015 [-0.114,  0.144]  .815    
## L3.bg-C2.bg   0.062 [-0.067,  0.190]  .347    
## L3.bg-C3.bg   0.153 [ 0.025,  0.277]  .020 *  
## L3.bg-C4.bg  -0.343 [-0.452, -0.224] <.001 ***
## L3.bg-C6.bg   0.009 [-0.120,  0.138]  .887    
## L3.bg-C7.bg   0.016 [-0.113,  0.145]  .803    
## X.bg-M1.bg    0.346 [ 0.227,  0.455] <.001 ***
## X.bg-M2.bg    0.166 [ 0.038,  0.289]  .012 *  
## X.bg-Y.bg    -0.044 [-0.172,  0.086]  .510    
## X.bg-W.bg     0.214 [ 0.087,  0.334]  .001 ** 
## X.bg-C2.bg   -0.033 [-0.162,  0.096]  .616    
## X.bg-C3.bg   -0.152 [-0.275, -0.023]  .021 *  
## X.bg-C4.bg    0.112 [-0.017,  0.238]  .090 .  
## X.bg-C6.bg   -0.034 [-0.163,  0.095]  .603    
## X.bg-C7.bg   -0.097 [-0.223,  0.033]  .143    
## M1.bg-M2.bg   0.053 [-0.077,  0.181]  .426    
## M1.bg-Y.bg    0.069 [-0.061,  0.196]  .299    
## M1.bg-W.bg    0.346 [ 0.227,  0.455] <.001 ***
## M1.bg-C2.bg   0.012 [-0.117,  0.141]  .856    
## M1.bg-C3.bg  -0.187 [-0.308, -0.059]  .004 ** 
## M1.bg-C4.bg   0.134 [ 0.005,  0.259]  .042 *  
## M1.bg-C6.bg  -0.066 [-0.194,  0.063]  .316    
## M1.bg-C7.bg   0.004 [-0.125,  0.133]  .955    
## M2.bg-Y.bg   -0.169 [-0.292, -0.041]  .010 *  
## M2.bg-W.bg   -0.026 [-0.155,  0.103]  .694    
## M2.bg-C2.bg  -0.009 [-0.138,  0.120]  .894    
## M2.bg-C3.bg   0.217 [ 0.090,  0.337] <.001 ***
## M2.bg-C4.bg  -0.184 [-0.306, -0.057]  .005 ** 
## M2.bg-C6.bg   0.151 [ 0.022,  0.275]  .022 *  
## M2.bg-C7.bg   0.165 [ 0.036,  0.288]  .012 *  
## Y.bg-W.bg     0.101 [-0.029,  0.227]  .126    
## Y.bg-C2.bg   -0.106 [-0.232,  0.023]  .108    
## Y.bg-C3.bg   -0.190 [-0.312, -0.063]  .004 ** 
## Y.bg-C4.bg   -0.014 [-0.143,  0.115]  .829    
## Y.bg-C6.bg   -0.101 [-0.227,  0.029]  .127    
## Y.bg-C7.bg   -0.024 [-0.153,  0.105]  .718    
## W.bg-C2.bg    0.019 [-0.110,  0.148]  .772    
## W.bg-C3.bg   -0.186 [-0.308, -0.059]  .004 ** 
## W.bg-C4.bg    0.020 [-0.109,  0.149]  .757    
## W.bg-C6.bg    0.004 [-0.125,  0.133]  .949    
## W.bg-C7.bg   -0.077 [-0.204,  0.052]  .242    
## C2.bg-C3.bg   0.198 [ 0.071,  0.319]  .002 ** 
## C2.bg-C4.bg  -0.196 [-0.317, -0.069]  .003 ** 
## C2.bg-C6.bg   0.190 [ 0.062,  0.311]  .004 ** 
## C2.bg-C7.bg   0.171 [ 0.043,  0.294]  .009 ** 
## C3.bg-C4.bg  -0.578 [-0.658, -0.485] <.001 ***
## C3.bg-C6.bg   0.187 [ 0.060,  0.309]  .004 ** 
## C3.bg-C7.bg   0.196 [ 0.069,  0.317]  .003 ** 
## C4.bg-C6.bg  -0.104 [-0.230,  0.026]  .116    
## C4.bg-C7.bg  -0.282 [-0.397, -0.159] <.001 ***
## C6.bg-C7.bg  -0.045 [-0.173,  0.084]  .493    
## ──────────────────────────────────────────────
## 
## Intraclass Correlation:
## ─────────────────────────────────────────────────────────────────────────
##          L3     X    M1     M2     Y     W    C2    C3    C4    C6     C7
## ─────────────────────────────────────────────────────────────────────────
## ICC1  1.000 0.053 0.058 -0.003 0.019 0.087 0.005 0.208 0.137 0.017 -0.029
## ICC2  1.000 0.254 0.272 -0.020 0.104 0.369 0.029 0.617 0.493 0.097 -0.211
## ─────────────────────────────────────────────────────────────────────────
## Correlations below and above the diagonal represent
## within-level and between-level correlations, respectively:
## ────────────────────────────────────────────────────────────────────────────────
##         L2      X     M1     M2      Y      W     C2     C3     C4     C6     C7
## ────────────────────────────────────────────────────────────────────────────────
## L2   1.000 -0.188 -0.123  0.596  0.168  0.047  0.065  0.280 -0.506  0.031  0.016
## X    0.014  1.000 -0.011 -0.283 -0.259  0.102 -0.252 -0.425  0.560 -0.067 -0.444
## M1   0.048  0.328  1.000 -0.354  0.235  0.562 -0.187 -0.356  0.399 -0.510 -0.245
## M2  -0.025  0.214  0.110  1.000  0.062 -0.209  0.366  0.579 -0.773  0.361  0.320
## Y    0.073 -0.027  0.051 -0.178  1.000  0.245 -0.232 -0.289 -0.208 -0.219  0.325
## W    0.049  0.232  0.291  0.023  0.057  1.000 -0.149 -0.458  0.107 -0.079 -0.029
## C2  -0.011 -0.014 -0.083  0.084 -0.102  0.018  1.000  0.443 -0.498  0.374  0.473
## C3  -0.167 -0.153 -0.157  0.051 -0.094 -0.093  0.095  1.000 -0.605  0.144  0.220
## C4   0.085  0.083  0.095 -0.036  0.061 -0.014 -0.090 -0.553  1.000 -0.262 -0.475
## C6   0.066 -0.079 -0.039  0.040 -0.050 -0.026  0.039  0.270 -0.176  1.000  0.286
## C7  -0.089  0.037 -0.004  0.146 -0.046 -0.012  0.066  0.297 -0.154  0.035  1.000
## ────────────────────────────────────────────────────────────────────────────────
## 
## Within-Level Correlation [95% CI]:
## ──────────────────────────────────────────────
##                   r         [95% CI]     p    
## ──────────────────────────────────────────────
## L2.wg-X.wg    0.014 [-0.038,  0.067]  .588    
## L2.wg-M1.wg   0.048 [-0.004,  0.100]  .072 .  
## L2.wg-M2.wg  -0.025 [-0.077,  0.027]  .344    
## L2.wg-Y.wg    0.073 [ 0.021,  0.124]  .006 ** 
## L2.wg-W.wg    0.049 [-0.003,  0.101]  .067 .  
## L2.wg-C2.wg  -0.011 [-0.063,  0.042]  .693    
## L2.wg-C3.wg  -0.167 [-0.217, -0.116] <.001 ***
## L2.wg-C4.wg   0.085 [ 0.033,  0.137]  .001 ** 
## L2.wg-C6.wg   0.066 [ 0.013,  0.117]  .014 *  
## L2.wg-C7.wg  -0.089 [-0.141, -0.037] <.001 ***
## X.wg-M1.wg    0.328 [ 0.280,  0.373] <.001 ***
## X.wg-M2.wg    0.214 [ 0.164,  0.263] <.001 ***
## X.wg-Y.wg    -0.027 [-0.079,  0.025]  .315    
## X.wg-W.wg     0.232 [ 0.182,  0.281] <.001 ***
## X.wg-C2.wg   -0.014 [-0.066,  0.038]  .598    
## X.wg-C3.wg   -0.153 [-0.204, -0.102] <.001 ***
## X.wg-C4.wg    0.083 [ 0.031,  0.134]  .002 ** 
## X.wg-C6.wg   -0.079 [-0.131, -0.027]  .003 ** 
## X.wg-C7.wg    0.037 [-0.015,  0.089]  .159    
## M1.wg-M2.wg   0.110 [ 0.058,  0.161] <.001 ***
## M1.wg-Y.wg    0.051 [-0.002,  0.102]  .057 .  
## M1.wg-W.wg    0.291 [ 0.243,  0.338] <.001 ***
## M1.wg-C2.wg  -0.083 [-0.135, -0.031]  .002 ** 
## M1.wg-C3.wg  -0.157 [-0.208, -0.106] <.001 ***
## M1.wg-C4.wg   0.095 [ 0.043,  0.146] <.001 ***
## M1.wg-C6.wg  -0.039 [-0.091,  0.013]  .139    
## M1.wg-C7.wg  -0.004 [-0.056,  0.048]  .883    
## M2.wg-Y.wg   -0.178 [-0.228, -0.127] <.001 ***
## M2.wg-W.wg    0.023 [-0.029,  0.075]  .379    
## M2.wg-C2.wg   0.084 [ 0.032,  0.136]  .002 ** 
## M2.wg-C3.wg   0.051 [-0.001,  0.103]  .055 .  
## M2.wg-C4.wg  -0.036 [-0.088,  0.016]  .171    
## M2.wg-C6.wg   0.040 [-0.012,  0.092]  .135    
## M2.wg-C7.wg   0.146 [ 0.094,  0.196] <.001 ***
## Y.wg-W.wg     0.057 [ 0.005,  0.109]  .031 *  
## Y.wg-C2.wg   -0.102 [-0.154, -0.050] <.001 ***
## Y.wg-C3.wg   -0.094 [-0.145, -0.042] <.001 ***
## Y.wg-C4.wg    0.061 [ 0.009,  0.113]  .022 *  
## Y.wg-C6.wg   -0.050 [-0.102,  0.002]  .061 .  
## Y.wg-C7.wg   -0.046 [-0.098,  0.006]  .085 .  
## W.wg-C2.wg    0.018 [-0.034,  0.070]  .493    
## W.wg-C3.wg   -0.093 [-0.145, -0.041] <.001 ***
## W.wg-C4.wg   -0.014 [-0.066,  0.038]  .590    
## W.wg-C6.wg   -0.026 [-0.078,  0.026]  .321    
## W.wg-C7.wg   -0.012 [-0.064,  0.040]  .648    
## C2.wg-C3.wg   0.095 [ 0.043,  0.147] <.001 ***
## C2.wg-C4.wg  -0.090 [-0.142, -0.038] <.001 ***
## C2.wg-C6.wg   0.039 [-0.013,  0.091]  .142    
## C2.wg-C7.wg   0.066 [ 0.014,  0.118]  .013 *  
## C3.wg-C4.wg  -0.553 [-0.588, -0.516] <.001 ***
## C3.wg-C6.wg   0.270 [ 0.221,  0.318] <.001 ***
## C3.wg-C7.wg   0.297 [ 0.249,  0.344] <.001 ***
## C4.wg-C6.wg  -0.176 [-0.226, -0.125] <.001 ***
## C4.wg-C7.wg  -0.154 [-0.204, -0.102] <.001 ***
## C6.wg-C7.wg   0.035 [-0.017,  0.087]  .186    
## ──────────────────────────────────────────────
## 
## Between-Level Correlation [95% CI]:
## ──────────────────────────────────────────────
##                   r         [95% CI]     p    
## ──────────────────────────────────────────────
## L2.bg-X.bg   -0.188 [-0.582,  0.277]  .426    
## L2.bg-M1.bg  -0.123 [-0.536,  0.338]  .605    
## L2.bg-M2.bg   0.596 [ 0.209,  0.822]  .006 ** 
## L2.bg-Y.bg    0.168 [-0.296,  0.568]  .479    
## L2.bg-W.bg    0.047 [-0.404,  0.479]  .845    
## L2.bg-C2.bg   0.065 [-0.388,  0.494]  .784    
## L2.bg-C3.bg   0.280 [-0.185,  0.643]  .232    
## L2.bg-C4.bg  -0.506 [-0.775, -0.082]  .023 *  
## L2.bg-C6.bg   0.031 [-0.418,  0.467]  .898    
## L2.bg-C7.bg   0.016 [-0.429,  0.455]  .946    
## X.bg-M1.bg   -0.011 [-0.451,  0.434]  .963    
## X.bg-M2.bg   -0.283 [-0.645,  0.182]  .226    
## X.bg-Y.bg    -0.259 [-0.629,  0.207]  .270    
## X.bg-W.bg     0.102 [-0.357,  0.521]  .669    
## X.bg-C2.bg   -0.252 [-0.625,  0.214]  .283    
## X.bg-C3.bg   -0.425 [-0.730,  0.022]  .062 .  
## X.bg-C4.bg    0.560 [ 0.157,  0.804]  .010 *  
## X.bg-C6.bg   -0.067 [-0.495,  0.387]  .778    
## X.bg-C7.bg   -0.444 [-0.741, -0.002]  .050 *  
## M1.bg-M2.bg  -0.354 [-0.689,  0.105]  .126    
## M1.bg-Y.bg    0.235 [-0.232,  0.613]  .319    
## M1.bg-W.bg    0.562 [ 0.159,  0.805]  .010 ** 
## M1.bg-C2.bg  -0.187 [-0.581,  0.279]  .430    
## M1.bg-C3.bg  -0.356 [-0.690,  0.103]  .124    
## M1.bg-C4.bg   0.399 [-0.053,  0.715]  .081 .  
## M1.bg-C6.bg  -0.510 [-0.777, -0.087]  .022 *  
## M1.bg-C7.bg  -0.245 [-0.620,  0.222]  .298    
## M2.bg-Y.bg    0.062 [-0.391,  0.491]  .794    
## M2.bg-W.bg   -0.209 [-0.596,  0.258]  .377    
## M2.bg-C2.bg   0.366 [-0.091,  0.696]  .112    
## M2.bg-C3.bg   0.579 [ 0.183,  0.813]  .007 ** 
## M2.bg-C4.bg  -0.773 [-0.906, -0.503] <.001 ***
## M2.bg-C6.bg   0.361 [-0.097,  0.693]  .118    
## M2.bg-C7.bg   0.320 [-0.142,  0.668]  .169    
## Y.bg-W.bg     0.245 [-0.222,  0.620]  .298    
## Y.bg-C2.bg   -0.232 [-0.612,  0.235]  .325    
## Y.bg-C3.bg   -0.289 [-0.648,  0.177]  .217    
## Y.bg-C4.bg   -0.208 [-0.596,  0.258]  .379    
## Y.bg-C6.bg   -0.219 [-0.603,  0.248]  .354    
## Y.bg-C7.bg    0.325 [-0.137,  0.671]  .161    
## W.bg-C2.bg   -0.149 [-0.555,  0.314]  .531    
## W.bg-C3.bg   -0.458 [-0.749, -0.019]  .042 *  
## W.bg-C4.bg    0.107 [-0.352,  0.524]  .654    
## W.bg-C6.bg   -0.079 [-0.504,  0.377]  .741    
## W.bg-C7.bg   -0.029 [-0.466,  0.419]  .903    
## C2.bg-C3.bg   0.443 [ 0.001,  0.741]  .050 .  
## C2.bg-C4.bg  -0.498 [-0.771, -0.071]  .026 *  
## C2.bg-C6.bg   0.374 [-0.082,  0.700]  .104    
## C2.bg-C7.bg   0.473 [ 0.038,  0.757]  .035 *  
## C3.bg-C4.bg  -0.605 [-0.826, -0.222]  .005 ** 
## C3.bg-C6.bg   0.144 [-0.319,  0.552]  .544    
## C3.bg-C7.bg   0.220 [-0.246,  0.604]  .351    
## C4.bg-C6.bg  -0.262 [-0.631,  0.205]  .265    
## C4.bg-C7.bg  -0.475 [-0.758, -0.041]  .034 *  
## C6.bg-C7.bg   0.286 [-0.179,  0.647]  .222    
## ──────────────────────────────────────────────
## 
## Intraclass Correlation:
## ────────────────────────────────────────────────────────────────────────
##          L2     X    M1     M2     Y     W    C2    C3    C4    C6    C7
## ────────────────────────────────────────────────────────────────────────
## ICC1  0.993 0.009 0.015 -0.000 0.009 0.027 0.023 0.126 0.139 0.004 0.034
## ICC2  1.000 0.394 0.521 -0.030 0.379 0.661 0.622 0.910 0.920 0.215 0.710
## ────────────────────────────────────────────────────────────────────────
## Descriptive Statistics:
## ────────────────────────────────────────────────────────────────
##              N  Mean   SD | Median   Min   Max Skewness Kurtosis
## ────────────────────────────────────────────────────────────────
## L3         231 11.33 5.87 |  13.00  1.00 21.00    -0.29    -1.35
## X_meanL2   231  4.20 0.41 |   4.21  2.92  5.15    -0.22     0.13
## M1_meanL2  231  3.59 0.50 |   3.55  1.69  5.09     0.02     0.59
## M2_meanL2  231  4.68 0.37 |   4.75  3.50  5.67    -0.30     0.29
## Y_meanL2   231  1.96 0.52 |   1.95  1.00  4.58     0.90     2.89
## W_meanL2   231  2.92 0.41 |   2.92  1.80  4.56     0.11     0.70
## C2_meanL2  231  1.70 0.22 |   1.71  1.00  2.00    -0.53     0.24
## C3_meanL2  231 34.86 5.25 |  34.67 23.00 51.86     0.34    -0.36
## C4_meanL2  231  2.76 0.34 |   2.80  1.75  3.67    -0.17    -0.11
## C6_meanL2  231  2.20 1.83 |   1.67  0.14 16.52     2.97    16.17
## C7_meanL2  231  3.27 0.94 |   3.33  1.00  6.00    -0.16     0.41
## ────────────────────────────────────────────────────────────────
## Correlations below and above the diagonal represent
## within-level and between-level correlations, respectively:
## ───────────────────────────────────────────────────────────────────────────────────────────────────────────
##            X_meanL2 M1_meanL2 M2_meanL2 Y_meanL2 W_meanL2 C2_meanL2 C3_meanL2 C4_meanL2 C6_meanL2 C7_meanL2
## ───────────────────────────────────────────────────────────────────────────────────────────────────────────
## X_meanL2      1.000    -0.080     0.027   -0.410    0.193     0.072    -0.226     0.368     0.036    -0.237
## M1_meanL2     0.398     1.000    -0.163    0.275    0.550     0.042    -0.170     0.127    -0.319    -0.069
## M2_meanL2     0.231     0.038     1.000   -0.074   -0.091     0.437     0.584    -0.722     0.389     0.213
## Y_meanL2     -0.018     0.042    -0.201    1.000    0.056    -0.064    -0.146    -0.228    -0.008     0.304
## W_meanL2      0.212     0.267     0.012    0.100    1.000    -0.038    -0.348    -0.014     0.012    -0.147
## C2_meanL2    -0.054     0.084    -0.083   -0.106    0.037     1.000     0.358    -0.468     0.312     0.595
## C3_meanL2    -0.128    -0.166     0.105   -0.113   -0.109     0.060     1.000    -0.620     0.020     0.066
## C4_meanL2     0.036     0.045     0.005    0.054   -0.040    -0.008    -0.572     1.000    -0.353    -0.278
## C6_meanL2    -0.036    -0.021     0.076   -0.095    0.046     0.140     0.174    -0.119     1.000     0.164
## C7_meanL2    -0.035     0.057     0.123   -0.134   -0.075     0.081     0.265    -0.135     0.030     1.000
## ───────────────────────────────────────────────────────────────────────────────────────────────────────────
## 
## Within-Level Correlation [95% CI]:
## ──────────────────────────────────────────────
##                   r         [95% CI]     p    
## ──────────────────────────────────────────────
## X_L2.-M1_L2   0.398 [ 0.283,  0.501] <.001 ***
## X_L2.-M2_L2   0.231 [ 0.105,  0.350] <.001 ***
## X_L2.-Y_L2.  -0.018 [-0.147,  0.111]  .787    
## X_L2.-W_L2.   0.212 [ 0.085,  0.332]  .001 ** 
## X_L2.-C2_L2  -0.054 [-0.182,  0.076]  .414    
## X_L2.-C3_L2  -0.128 [-0.253,  0.001]  .053 .  
## X_L2.-C4_L2   0.036 [-0.094,  0.164]  .589    
## X_L2.-C6_L2  -0.036 [-0.164,  0.094]  .586    
## X_L2.-C7_L2  -0.035 [-0.164,  0.094]  .594    
## M1_L2-M2_L2   0.038 [-0.091,  0.167]  .561    
## M1_L2-Y_L2.   0.042 [-0.088,  0.170]  .530    
## M1_L2-W_L2.   0.267 [ 0.143,  0.383] <.001 ***
## M1_L2-C2_L2   0.084 [-0.046,  0.210]  .205    
## M1_L2-C3_L2  -0.166 [-0.289, -0.038]  .012 *  
## M1_L2-C4_L2   0.045 [-0.084,  0.173]  .494    
## M1_L2-C6_L2  -0.021 [-0.150,  0.108]  .745    
## M1_L2-C7_L2   0.057 [-0.072,  0.185]  .386    
## M2_L2-Y_L2.  -0.201 [-0.321, -0.073]  .002 ** 
## M2_L2-W_L2.   0.012 [-0.117,  0.141]  .855    
## M2_L2-C2_L2  -0.083 [-0.210,  0.046]  .208    
## M2_L2-C3_L2   0.105 [-0.024,  0.231]  .111    
## M2_L2-C4_L2   0.005 [-0.124,  0.134]  .939    
## M2_L2-C6_L2   0.076 [-0.053,  0.203]  .249    
## M2_L2-C7_L2   0.123 [-0.006,  0.248]  .061 .  
## Y_L2.-W_L2.   0.100 [-0.030,  0.226]  .131    
## Y_L2.-C2_L2  -0.106 [-0.232,  0.023]  .108    
## Y_L2.-C3_L2  -0.113 [-0.239,  0.016]  .086 .  
## Y_L2.-C4_L2   0.054 [-0.076,  0.182]  .414    
## Y_L2.-C6_L2  -0.095 [-0.221,  0.035]  .151    
## Y_L2.-C7_L2  -0.134 [-0.258, -0.005]  .042 *  
## W_L2.-C2_L2   0.037 [-0.092,  0.166]  .572    
## W_L2.-C3_L2  -0.109 [-0.234,  0.021]  .100 .  
## W_L2.-C4_L2  -0.040 [-0.168,  0.089]  .544    
## W_L2.-C6_L2   0.046 [-0.084,  0.174]  .490    
## W_L2.-C7_L2  -0.075 [-0.202,  0.054]  .255    
## C2_L2-C3_L2   0.060 [-0.070,  0.188]  .365    
## C2_L2-C4_L2  -0.008 [-0.137,  0.121]  .899    
## C2_L2-C6_L2   0.140 [ 0.012,  0.265]  .033 *  
## C2_L2-C7_L2   0.081 [-0.049,  0.208]  .222    
## C3_L2-C4_L2  -0.572 [-0.653, -0.478] <.001 ***
## C3_L2-C6_L2   0.174 [ 0.045,  0.296]  .008 ** 
## C3_L2-C7_L2   0.265 [ 0.141,  0.381] <.001 ***
## C4_L2-C6_L2  -0.119 [-0.245,  0.010]  .070 .  
## C4_L2-C7_L2  -0.135 [-0.259, -0.006]  .041 *  
## C6_L2-C7_L2   0.030 [-0.100,  0.158]  .651    
## ──────────────────────────────────────────────
## 
## Between-Level Correlation [95% CI]:
## ──────────────────────────────────────────────
##                   r         [95% CI]     p    
## ──────────────────────────────────────────────
## X_L2.-M1_L2  -0.080 [-0.504,  0.376]  .739    
## X_L2.-M2_L2   0.027 [-0.421,  0.464]  .911    
## X_L2.-Y_L2.  -0.410 [-0.722,  0.040]  .073 .  
## X_L2.-W_L2.   0.193 [-0.273,  0.585]  .415    
## X_L2.-C2_L2   0.072 [-0.383,  0.499]  .763    
## X_L2.-C3_L2  -0.226 [-0.608,  0.240]  .337    
## X_L2.-C4_L2   0.368 [-0.089,  0.697]  .110    
## X_L2.-C6_L2   0.036 [-0.413,  0.471]  .882    
## X_L2.-C7_L2  -0.237 [-0.615,  0.230]  .315    
## M1_L2-M2_L2  -0.163 [-0.565,  0.301]  .492    
## M1_L2-Y_L2.   0.275 [-0.191,  0.639]  .241    
## M1_L2-W_L2.   0.550 [ 0.142,  0.798]  .012 *  
## M1_L2-C2_L2   0.042 [-0.408,  0.475]  .861    
## M1_L2-C3_L2  -0.170 [-0.570,  0.294]  .473    
## M1_L2-C4_L2   0.127 [-0.335,  0.539]  .595    
## M1_L2-C6_L2  -0.319 [-0.668,  0.143]  .170    
## M1_L2-C7_L2  -0.069 [-0.496,  0.386]  .774    
## M2_L2-Y_L2.  -0.074 [-0.500,  0.381]  .758    
## M2_L2-W_L2.  -0.091 [-0.513,  0.367]  .704    
## M2_L2-C2_L2   0.437 [-0.006,  0.737]  .054 .  
## M2_L2-C3_L2   0.584 [ 0.191,  0.816]  .007 ** 
## M2_L2-C4_L2  -0.722 [-0.883, -0.411] <.001 ***
## M2_L2-C6_L2   0.389 [-0.065,  0.709]  .090 .  
## M2_L2-C7_L2   0.213 [-0.253,  0.599]  .367    
## Y_L2.-W_L2.   0.056 [-0.397,  0.486]  .816    
## Y_L2.-C2_L2  -0.064 [-0.492,  0.390]  .790    
## Y_L2.-C3_L2  -0.146 [-0.553,  0.317]  .540    
## Y_L2.-C4_L2  -0.228 [-0.609,  0.239]  .334    
## Y_L2.-C6_L2  -0.008 [-0.449,  0.436]  .972    
## Y_L2.-C7_L2   0.304 [-0.160,  0.658]  .192    
## W_L2.-C2_L2  -0.038 [-0.473,  0.411]  .873    
## W_L2.-C3_L2  -0.348 [-0.685,  0.111]  .132    
## W_L2.-C4_L2  -0.014 [-0.453,  0.432]  .955    
## W_L2.-C6_L2   0.012 [-0.433,  0.452]  .960    
## W_L2.-C7_L2  -0.147 [-0.553,  0.316]  .537    
## C2_L2-C3_L2   0.358 [-0.101,  0.691]  .122    
## C2_L2-C4_L2  -0.468 [-0.754, -0.032]  .038 *  
## C2_L2-C6_L2   0.312 [-0.151,  0.663]  .180    
## C2_L2-C7_L2   0.595 [ 0.207,  0.821]  .006 ** 
## C3_L2-C4_L2  -0.620 [-0.834, -0.244]  .004 ** 
## C3_L2-C6_L2   0.020 [-0.426,  0.459]  .932    
## C3_L2-C7_L2   0.066 [-0.388,  0.494]  .783    
## C4_L2-C6_L2  -0.353 [-0.688,  0.106]  .127    
## C4_L2-C7_L2  -0.278 [-0.641,  0.188]  .236    
## C6_L2-C7_L2   0.164 [-0.300,  0.566]  .488    
## ──────────────────────────────────────────────
## 
## Intraclass Correlation:
## ──────────────────────────────────────────────────────────────────────────────────────────────────────
##       X_meanL2 M1_meanL2 M2_meanL2 Y_meanL2 W_meanL2 C2_meanL2 C3_meanL2 C4_meanL2 C6_meanL2 C7_meanL2
## ──────────────────────────────────────────────────────────────────────────────────────────────────────
## ICC1     0.017     0.024    -0.016    0.017    0.066     0.114     0.260     0.411    -0.015     0.233
## ICC2     0.169     0.218    -0.216    0.171    0.448     0.597     0.802     0.890    -0.210     0.779
## ──────────────────────────────────────────────────────────────────────────────────────────────────────

2 THREE-LEVEL ANALYSIS

2.1 Within-level interaction effect

2.1.1 Hypothesis 1

## ────────────────────────────────────────────────────
##                    Estimate    S.E.      t     p    
## ────────────────────────────────────────────────────
## (Intercept)           4.075 (0.245) 16.636 <.001 ***
## C2                   -0.155 (0.054) -2.887  .004 ** 
## C3                   -0.012 (0.004) -3.192  .001 ** 
## C4                    0.050 (0.049)  1.026  .305    
## C6                    0.002 (0.006)  0.299  .765    
## C7                    0.009 (0.012)  0.765  .444    
## X.GroCL2              0.287 (0.035)  8.174 <.001 ***
## W.GroCL2              0.296 (0.038)  7.793 <.001 ***
## X.GroCL2:W.GroCL2     0.042 (0.043)  0.985  .325    
## ────────────────────────────────────────────────────
## 
## ****************** PART 1. Regression Model Summary ******************
## 
## PROCESS Model Code : 1 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Simple Moderation
## -    Outcome (Y) : M1
## -  Predictor (X) : X.GroCL2
## -  Mediators (M) : -
## - Moderators (W) : W.GroCL2
## - Covariates (C) : C2, C3, C4, C6, C7
## -   HLM Clusters : L2, L3
## 
## Formula of Outcome:
## -    M1 ~ C2 + C3 + C4 + C6 + C7 + X.GroCL2*W.GroCL2 + (1|L3/L2)
## 
## CAUTION:
##   Fixed effect (coef.) of a predictor involved in an interaction
##   denotes its "simple effect/slope" at the other predictor = 0.
##   Only when all predictors in an interaction are mean-centered
##   can the fixed effect denote the "main effect"!
##   
## Model Summary
## 
## ──────────────────────────────────────────────────
##                         (1) M1        (2) M1      
## ──────────────────────────────────────────────────
## (Intercept)                4.328 ***     4.166 ***
##                           (0.257)       (0.252)   
## C2                        -0.157 **     -0.165 ** 
##                           (0.054)       (0.053)   
## C3                        -0.015 ***    -0.012 ** 
##                           (0.004)       (0.004)   
## C4                        -0.001         0.029    
##                           (0.051)       (0.050)   
## C6                         0.003         0.003    
##                           (0.006)       (0.006)   
## C7                         0.010         0.010    
##                           (0.012)       (0.012)   
## X.GroCL2                   0.343 ***     0.288 ***
##                           (0.033)       (0.034)   
## W.GroCL2                                 0.295 ***
##                                         (0.036)   
## X.GroCL2:W.GroCL2                        0.045    
##                                         (0.043)   
## ──────────────────────────────────────────────────
## Marginal R^2               0.096         0.134    
## Conditional R^2            0.165         0.210    
## AIC                     3844.253      3792.180    
## BIC                     3896.774      3855.204    
## Num. obs.               1411          1411        
## Num. groups: L2:L3       231           231        
## Num. groups: L3           20            20        
## Var: L2:L3 (Intercept)     0.057         0.066    
## Var: L3 (Intercept)        0.009         0.008    
## Var: Residual              0.807         0.764    
## ──────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
## 
## ************ PART 2. Mediation/Moderation Effect Estimate ************
## 
## Package Use : ‘interactions’ (v1.1.5)
## Effect Type : Simple Moderation (Model 1)
## Sample Size : 1411 (1 missing observations deleted)
## Random Seed : -
## Simulations : -
## 
## Interaction Effect on "M1" (Y)
## ────────────────────────────────────────────
##                         F df1  df2     p    
## ────────────────────────────────────────────
## X.GroCL2 * W.GroCL2  1.14   1 1392  .286    
## ────────────────────────────────────────────
## 
## Simple Slopes: "X.GroCL2" (X) ==> "M1" (Y)
## ────────────────────────────────────────────────────────────
##  "W.GroCL2"    Effect    S.E.     t     p           [95% CI]
## ────────────────────────────────────────────────────────────
##  -0.662 (- SD)  0.258 (0.041) 6.360 <.001 *** [0.178, 0.337]
##  -0.000 (Mean)  0.288 (0.034) 8.565 <.001 *** [0.222, 0.354]
##  0.662 (+ SD)   0.318 (0.047) 6.778 <.001 *** [0.226, 0.410]
## ────────────────────────────────────────────────────────────

2.1.2 Plot

2.2 Multilevel mediation effect

## 
## ****************** PART 1. Regression Model Summary ******************
## 
## PROCESS Model Code : 6 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Serial Multiple Mediation (2 meds)
## -    Outcome (Y) : Y
## -  Predictor (X) : X.GroCL2
## -  Mediators (M) : M1.GroCL2, M2.GroCL2
## - Moderators (W) : -
## - Covariates (C) : C2, C3, C4, C6, C7
## -   HLM Clusters : -
## 
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
## 
## Formula of Mediator:
## -    M1.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + X.GroCL2
## -    M2.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + X.GroCL2 + M1.GroCL2
## Formula of Outcome:
## -    Y ~ C2 + C3 + C4 + C6 + C7 + X.GroCL2 + M1.GroCL2 + M2.GroCL2
## 
## CAUTION:
##   Fixed effect (coef.) of a predictor involved in an interaction
##   denotes its "simple effect/slope" at the other predictor = 0.
##   Only when all predictors in an interaction are mean-centered
##   can the fixed effect denote the "main effect"!
##   
## Model Summary
## 
## ─────────────────────────────────────────────────────────────────────
##              (1) Y         (2) M1.GroCL2  (3) M2.GroCL2  (4) Y       
## ─────────────────────────────────────────────────────────────────────
## (Intercept)     1.966 ***    -0.002         -0.001          1.966 ***
##                (0.028)       (0.022)        (0.019)        (0.028)   
## C2             -0.226 ***    -0.165 ***      0.158 ***     -0.183 ** 
##                (0.062)       (0.048)        (0.043)        (0.062)   
## C3             -0.013 **     -0.008 *       -0.001         -0.013 ** 
##                (0.004)       (0.003)        (0.003)        (0.004)   
## C4             -0.051         0.012         -0.027         -0.058    
##                (0.056)       (0.044)        (0.039)        (0.055)   
## C6             -0.008         0.002          0.005         -0.007    
##                (0.007)       (0.006)        (0.005)        (0.007)   
## C7              0.001         0.001          0.042 ***      0.010    
##                (0.014)       (0.011)        (0.010)        (0.014)   
## X.GroCL2       -0.065         0.354 ***      0.200 ***     -0.040    
##                (0.039)       (0.030)        (0.028)        (0.041)   
## M1.GroCL2                                    0.055 *        0.061    
##                                             (0.024)        (0.034)   
## M2.GroCL2                                                  -0.216 ***
##                                                            (0.038)   
## ─────────────────────────────────────────────────────────────────────
## R^2             0.023         0.111          0.075          0.046    
## Adj. R^2        0.018         0.107          0.070          0.040    
## Num. obs.    1411          1411           1411           1411        
## ─────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
## 
## ************ PART 2. Mediation/Moderation Effect Estimate ************
## 
## Package Use : ‘lavaan’ (v0.6.16)
## Effect Type : Serial Multiple Mediation (2 meds) (Model 6)
## Sample Size : 1411 (1 missing observations deleted)
## Random Seed : set.seed(1223)
## Simulations : 100 (Monte Carlo)
## 
## Running 100 simulations (lavaan model)...
## LAVAAN Syntax:
## M1.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + a1*X.GroCL2
## M2.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + a2*X.GroCL2 + d12*M1.GroCL2
## Y ~ C2 + C3 + C4 + C6 + C7 + c.*X.GroCL2 + b1*M1.GroCL2 + b2*M2.GroCL2
## Indirect_All := a1*b1 + a2*b2 + a1*d12*b2
## Ind_X_M1_Y := a1*b1
## Ind_X_M2_Y := a2*b2
## Ind_X_M1_M2_Y := a1*d12*b2
## Direct := c.
## Total := c. + a1*b1 + a2*b2 + a1*d12*b2
## ──────────────────────────────────────────────────────────────────────────
##                  Estimate    S.E.      z     p        [Boot 95% CI]   Beta
## ──────────────────────────────────────────────────────────────────────────
##   Indirect_All     -0.026 (0.016) -1.564  .118     [-0.054,  0.010] -0.018
##   Ind_X_M1_Y        0.022 (0.013)  1.706  .088 .   [-0.001,  0.050]  0.015
##   Ind_X_M2_Y       -0.043 (0.012) -3.657 <.001 *** [-0.071, -0.026] -0.030
##   Ind_X_M1_M2_Y    -0.004 (0.002) -1.729  .084 .   [-0.009, -0.000] -0.003
##   Direct           -0.040 (0.041) -0.967  .334     [-0.123,  0.031] -0.027
##   Total            -0.065 (0.042) -1.551  .121     [-0.150, -0.001] -0.045
## ──────────────────────────────────────────────────────────────────────────
## Reset to: Percentile Bootstrap Confidence Interval
## (SE and CI are estimated based on 100 Bootstrap samples.)
## 
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)

2.3 Multilevel moderated mediation effect

2.3.1 W moderates Ind_X_M1_M2

## 
## ****************** PART 1. Regression Model Summary ******************
## 
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## -    Outcome (Y) : M2.GroCL2
## -  Predictor (X) : X.GroCL2
## -  Mediators (M) : M1.GroCL2
## - Moderators (W) : W.GroCL2
## - Covariates (C) : C2, C3, C4, C6, C7
## -   HLM Clusters : L2
## 
## Formula of Mediator:
## -    M1.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + X.GroCL2*W.GroCL2 + (1|L2)
## Formula of Outcome:
## -    M2.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + X.GroCL2 + W.GroCL2 + M1.GroCL2 + (1|L2)
## 
## CAUTION:
##   Fixed effect (coef.) of a predictor involved in an interaction
##   denotes its "simple effect/slope" at the other predictor = 0.
##   Only when all predictors in an interaction are mean-centered
##   can the fixed effect denote the "main effect"!
##   
## Model Summary
## 
## ────────────────────────────────────────────────────────────────
##                      (1) M2.GroCL2  (2) M1.GroCL2  (3) M2.GroCL2
## ────────────────────────────────────────────────────────────────
## (Intercept)            -0.294          0.362         -0.306     
##                        (0.195)        (0.214)        (0.195)    
## C2                      0.149 ***     -0.171 ***      0.160 *** 
##                        (0.043)        (0.047)        (0.043)    
## C3                     -0.001         -0.006         -0.001     
##                        (0.003)        (0.003)        (0.003)    
## C4                     -0.026          0.037         -0.031     
##                        (0.039)        (0.043)        (0.039)    
## C6                      0.005          0.002          0.005     
##                        (0.005)        (0.005)        (0.005)    
## C7                      0.042 ***      0.002          0.042 *** 
##                        (0.010)        (0.011)        (0.010)    
## X.GroCL2                0.219 ***      0.298 ***      0.206 *** 
##                        (0.027)        (0.031)        (0.029)    
## W.GroCL2                               0.299 ***     -0.045     
##                                       (0.033)        (0.031)    
## X.GroCL2:W.GroCL2                      0.051                    
##                                       (0.038)                   
## M1.GroCL2                                             0.064 **  
##                                                      (0.024)    
## ────────────────────────────────────────────────────────────────
## Marginal R^2            0.071          0.160          0.076     
## Conditional R^2         0.071          0.160          0.076     
## AIC                  3170.083       3440.462       3177.224     
## BIC                  3217.352       3498.235       3234.996     
## Num. obs.            1411           1411           1411         
## Num. groups: L2       231            231            231         
## Var: L2 (Intercept)     0.000          0.000          0.000     
## Var: Residual           0.531          0.639          0.529     
## ────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
## 
## ************ PART 2. Mediation/Moderation Effect Estimate ************
## 
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 1411 (1 missing observations deleted)
## Random Seed : set.seed(1223)
## Simulations : 100 (Monte Carlo)
## 
## Direct Effect: "X.GroCL2" (X) ==> "M2.GroCL2" (Y)
## ──────────────────────────────────────────────────────────
##              Effect    S.E.     t     p           [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c')   0.206 (0.029) 7.224 <.001 *** [0.150, 0.262]
## ──────────────────────────────────────────────────────────
## 
## Interaction Effect on "M1.GroCL2" (M)
## ────────────────────────────────────────────
##                         F df1  df2     p    
## ────────────────────────────────────────────
## X.GroCL2 * W.GroCL2  1.82   1 1402  .178    
## ────────────────────────────────────────────
## 
## Simple Slopes: "X.GroCL2" (X) ==> "M1.GroCL2" (M)
## (Conditional Effects [a] of X on M)
## ────────────────────────────────────────────────────────────
##  "W.GroCL2"    Effect    S.E.     t     p           [95% CI]
## ────────────────────────────────────────────────────────────
##  -0.662 (- SD)  0.265 (0.037) 7.228 <.001 *** [0.193, 0.337]
##  -0.000 (Mean)  0.298 (0.031) 9.732 <.001 *** [0.238, 0.358]
##  0.662 (+ SD)   0.332 (0.042) 7.877 <.001 *** [0.249, 0.414]
## ────────────────────────────────────────────────────────────
## 
## Running 100 * 3 simulations...
## Indirect Path: "X.GroCL2" (X) ==> "M1.GroCL2" (M) ==> "M2.GroCL2" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ────────────────────────────────────────────────────────────
##  "W.GroCL2"    Effect    S.E.     z     p      [MCMC 95% CI]
## ────────────────────────────────────────────────────────────
##  -0.662 (- SD)  0.017 (0.007) 2.555  .011 *   [0.005, 0.030]
##  -0.000 (Mean)  0.019 (0.008) 2.526  .012 *   [0.006, 0.033]
##  0.662 (+ SD)   0.021 (0.009) 2.382  .017 *   [0.007, 0.039]
## ────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 100 Monte Carlo samples.)
## 
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)

2.3.2 W moderates Ind_X_M1_Y

## 
## ****************** PART 1. Regression Model Summary ******************
## 
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## -    Outcome (Y) : Y
## -  Predictor (X) : X.GroCL2
## -  Mediators (M) : M1.GroCL2
## - Moderators (W) : W.GroCL2
## - Covariates (C) : C2, C3, C4, C6, C7, M2.GroCL2
## -   HLM Clusters : L2
## 
## Formula of Mediator:
## -    M1.GroCL2 ~ C2 + C3 + C4 + C6 + C7 + M2.GroCL2 + X.GroCL2*W.GroCL2 + (1|L2)
## Formula of Outcome:
## -    Y ~ C2 + C3 + C4 + C6 + C7 + M2.GroCL2 + X.GroCL2 + W.GroCL2 + M1.GroCL2 + (1|L2)
## 
## CAUTION:
##   Fixed effect (coef.) of a predictor involved in an interaction
##   denotes its "simple effect/slope" at the other predictor = 0.
##   Only when all predictors in an interaction are mean-centered
##   can the fixed effect denote the "main effect"!
##   
## Model Summary
## 
## ──────────────────────────────────────────────────────────────
##                      (1) Y         (2) M1.GroCL2  (3) Y       
## ──────────────────────────────────────────────────────────────
## (Intercept)             2.887 ***     0.383          2.827 ***
##                        (0.280)       (0.214)        (0.281)   
## C2                     -0.194 **     -0.183 ***     -0.187 ** 
##                        (0.062)       (0.047)        (0.062)   
## C3                     -0.013 **     -0.005         -0.012 ** 
##                        (0.004)       (0.003)        (0.004)   
## C4                     -0.055         0.040         -0.049    
##                        (0.056)       (0.043)        (0.056)   
## C6                     -0.007         0.001         -0.007    
##                        (0.007)       (0.005)        (0.007)   
## C7                      0.010        -0.002          0.010    
##                        (0.014)       (0.011)        (0.014)   
## M2.GroCL2              -0.212 ***     0.077 **      -0.214 ***
##                        (0.038)       (0.029)        (0.038)   
## X.GroCL2               -0.019         0.281 ***     -0.049    
##                        (0.039)       (0.031)        (0.042)   
## W.GroCL2                              0.301 ***      0.065    
##                                      (0.033)        (0.044)   
## X.GroCL2:W.GroCL2                     0.052                   
##                                      (0.038)                  
## M1.GroCL2                                            0.049    
##                                                     (0.035)   
## ──────────────────────────────────────────────────────────────
## Marginal R^2            0.043         0.164          0.047    
## Conditional R^2         0.046         0.164          0.051    
## AIC                  4185.598      3440.757       4193.497    
## BIC                  4238.119      3503.782       4256.522    
## Num. obs.            1411          1411           1411        
## Num. groups: L2       231           231            231        
## Var: L2 (Intercept)     0.004         0.000          0.005    
## Var: Residual           1.087         0.636          1.083    
## ──────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
## 
## ************ PART 2. Mediation/Moderation Effect Estimate ************
## 
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 1411 (1 missing observations deleted)
## Random Seed : set.seed(1223)
## Simulations : 100 (Monte Carlo)
## 
## Direct Effect: "X.GroCL2" (X) ==> "Y" (Y)
## ─────────────────────────────────────────────────────────────
##              Effect    S.E.      t     p             [95% CI]
## ─────────────────────────────────────────────────────────────
## Direct (c')  -0.049 (0.042) -1.182  .237     [-0.130,  0.032]
## ─────────────────────────────────────────────────────────────
## 
## Interaction Effect on "M1.GroCL2" (M)
## ────────────────────────────────────────────
##                         F df1  df2     p    
## ────────────────────────────────────────────
## X.GroCL2 * W.GroCL2  1.90   1 1401  .169    
## ────────────────────────────────────────────
## 
## Simple Slopes: "X.GroCL2" (X) ==> "M1.GroCL2" (M)
## (Conditional Effects [a] of X on M)
## ────────────────────────────────────────────────────────────
##  "W.GroCL2"    Effect    S.E.     t     p           [95% CI]
## ────────────────────────────────────────────────────────────
##  -0.662 (- SD)  0.247 (0.037) 6.642 <.001 *** [0.174, 0.320]
##  -0.000 (Mean)  0.281 (0.031) 8.989 <.001 *** [0.220, 0.342]
##  0.662 (+ SD)   0.315 (0.043) 7.419 <.001 *** [0.232, 0.399]
## ────────────────────────────────────────────────────────────
## 
## Running 100 * 3 simulations...
## Indirect Path: "X.GroCL2" (X) ==> "M1.GroCL2" (M) ==> "Y" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────
##  "W.GroCL2"    Effect    S.E.     z     p       [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────
##  -0.662 (- SD)  0.013 (0.009) 1.339  .181     [-0.004, 0.034]
##  -0.000 (Mean)  0.014 (0.011) 1.359  .174     [-0.005, 0.037]
##  0.662 (+ SD)   0.016 (0.012) 1.343  .179     [-0.006, 0.042]
## ─────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 100 Monte Carlo samples.)
## 
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)

2.3.3 W moderates Ind_X_M2_Y (No need)

2.3.4 W moderates Ind_X_M1_M2_Y

2.3.5 Hypothesis 2: Observation based social learning

2.4 Summary of analysis

2.4.1 Regression table

2.4.2 Hypothesis 3: Moderated mediation