Section 1

Accuracy improves

mdlA <- lmer(unsigned_pe_1 ~ exam + (1 | cohort_class / pt_id), 
             data = df.retest)
summary(mdlA)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: unsigned_pe_1 ~ exam + (1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 17843.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8676 -0.7264 -0.1637  0.5384  4.6664 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept)  6.6924  2.5870  
##  cohort_class       (Intercept)  0.5313  0.7289  
##  Residual                       55.4286  7.4450  
## Number of obs: 2565, groups:  pt_id:cohort_class, 873; cohort_class, 3
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)   12.8841     0.5543    3.9620  23.245  2.2e-05 ***
## exam          -1.0641     0.1256 1962.7886  -8.475  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##      (Intr)
## exam -0.561

PE -> Updating (no cov)

mdlC <- lmer(next_update_1 ~ pe_1 + (1 + pe_1 | cohort_class / pt_id), 
             data = df.retest)
## boundary (singular) fit: see ?isSingular
# AIC(mdlC)
summary(mdlC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: next_update_1 ~ pe_1 + (1 + pe_1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 12680.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.9073 -0.4996  0.0076  0.5284  3.6268 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev. Corr 
##  pt_id:cohort_class (Intercept) 5.742e-02  0.23963      
##                     pe_1        7.644e-02  0.27647 1.00 
##  cohort_class       (Intercept) 3.566e+00  1.88836      
##                     pe_1        6.968e-03  0.08347 -1.00
##  Residual                       2.250e+02 15.00129      
## Number of obs: 1526, groups:  pt_id:cohort_class, 696; cohort_class, 3
## 
## Fixed effects:
##             Estimate Std. Error     df t value Pr(>|t|)  
## (Intercept)   0.6302     1.1635 2.0272   0.542    0.642  
## pe_1          0.3096     0.0586 2.2242   5.283    0.027 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##      (Intr)
## pe_1 -0.769
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular

PE -> Updating (cov)

mdlA <- lmer(next_update_1 ~ pe_1 + delta_grade + (1 + pe_1 | cohort_class / pt_id), 
             data = df.retest)
## boundary (singular) fit: see ?isSingular
## Warning: Model failed to converge with 1 negative eigenvalue: -8.1e+02
summary(mdlA)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: next_update_1 ~ pe_1 + delta_grade + (1 + pe_1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 11568.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.4035 -0.5586 -0.0129  0.5784  3.7440 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev. Corr 
##  pt_id:cohort_class (Intercept) 0.000e+00  0.00000      
##                     pe_1        6.404e-02  0.25307  NaN 
##  cohort_class       (Intercept) 1.928e-01  0.43907      
##                     pe_1        2.531e-03  0.05031 -1.00
##  Residual                       1.047e+02 10.23092      
## Number of obs: 1526, groups:  pt_id:cohort_class, 696; cohort_class, 3
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.42898    0.37476    2.25619  -1.145  0.35919    
## pe_1           0.68031    0.03924    2.10171  17.335  0.00265 ** 
## delta_grade    0.72445    0.01774 1368.95375  40.835  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) pe_1  
## pe_1        -0.517       
## delta_grade -0.044  0.239
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular

PE Valence Interaction

md <- lmer(next_update_1 ~ unsigned_pe_1_flip*pe_1_sign_f_NAzero + delta_grade + (1  | cohort_class / pt_id), data = df.retest)
summary(md)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## next_update_1 ~ unsigned_pe_1_flip * pe_1_sign_f_NAzero + delta_grade +  
##     (1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 11416.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.0166 -0.5395  0.0024  0.5785  3.5152 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept)   9.7804  3.1274 
##  cohort_class       (Intercept)   0.4964  0.7046 
##  Residual                       106.2767 10.3091 
## Number of obs: 1503, groups:  pt_id:cohort_class, 696; cohort_class, 3
## 
## Fixed effects:
##                                         Estimate Std. Error         df t value
## (Intercept)                             -1.83842    0.62991    3.74586  -2.919
## unsigned_pe_1_flip                       0.74214    0.03679 1497.72828  20.174
## pe_1_sign_f_NAzero                      -0.21158    0.46120 1488.62315  -0.459
## delta_grade                              0.72607    0.01782  920.04470  40.748
## unsigned_pe_1_flip:pe_1_sign_f_NAzero    0.14668    0.03596 1489.93035   4.079
##                                       Pr(>|t|)    
## (Intercept)                             0.0469 *  
## unsigned_pe_1_flip                     < 2e-16 ***
## pe_1_sign_f_NAzero                      0.6465    
## delta_grade                            < 2e-16 ***
## unsigned_pe_1_flip:pe_1_sign_f_NAzero 4.77e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) un__1_ p_1___ dlt_gr
## unsgnd_p_1_  0.005                     
## p_1_sgn__NA -0.013 -0.771              
## delta_grade  0.040  0.260 -0.023       
## u__1_:_1___ -0.585  0.034 -0.022 -0.137
# updating rates still larger for positive PEs
plot_model(md, type = "pred", terms = c("unsigned_pe_1_flip","pe_1_sign_f_NAzero"))

pos rate

B = 0.91

md_pos <- lmer(next_update_1 ~ unsigned_pe_1 + delta_grade + (1 | cohort_class / pt_id), data = df.retest[which(df.retest$pe_1_sign_f_NAzero == "1"),])
## boundary (singular) fit: see ?isSingular
summary(md_pos)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: next_update_1 ~ unsigned_pe_1 + delta_grade + (1 | cohort_class/pt_id)
##    Data: df.retest[which(df.retest$pe_1_sign_f_NAzero == "1"), ]
## 
## REML criterion at convergence: 5837.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7830 -0.5294 -0.0095  0.5291  3.4035 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept) 17.97    4.239   
##  cohort_class       (Intercept)  0.00    0.000   
##  Residual                       95.06    9.750   
## Number of obs: 772, groups:  pt_id:cohort_class, 469; cohort_class, 3
## 
## Fixed effects:
##                Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)    -1.99860    0.65579 562.69097  -3.048  0.00241 ** 
## unsigned_pe_1   0.91140    0.05164 768.99853  17.651  < 2e-16 ***
## delta_grade     0.82571    0.02523 692.54879  32.731  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) uns__1
## unsignd_p_1 -0.763       
## delta_grade  0.058  0.126
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular

neg rate

B = -0.52

md_neg <- lmer(next_update_1 ~ unsigned_pe_1 + delta_grade + (1 | cohort_class / pt_id), data = df.retest[which(df.retest$pe_1_sign_f_NAzero == "-1"),])
summary(md_neg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: next_update_1 ~ unsigned_pe_1 + delta_grade + (1 | cohort_class/pt_id)
##    Data: df.retest[which(df.retest$pe_1_sign_f_NAzero == "-1"), ]
## 
## REML criterion at convergence: 5544.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7767 -0.5233  0.0144  0.5959  2.7901 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept) 18.175   4.263   
##  cohort_class       (Intercept)  1.171   1.082   
##  Residual                       96.765   9.837   
## Number of obs: 731, groups:  pt_id:cohort_class, 490; cohort_class, 3
## 
## Fixed effects:
##                Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)    -1.75137    0.92174   3.91616   -1.90    0.132    
## unsigned_pe_1  -0.52733    0.05216 726.40500  -10.11   <2e-16 ***
## delta_grade     0.63619    0.02478 601.68075   25.68   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) uns__1
## unsignd_p_1 -0.544       
## delta_grade  0.049 -0.385

Section 2

NE & Grades

summary(lmer(grade ~ neurot + (1 | cohort_class / pt_id),
             data = df.retest))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: grade ~ neurot + (1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 21026.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.4604 -0.5707  0.1165  0.6120  2.3976 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept) 154.774  12.441  
##  cohort_class       (Intercept)   2.675   1.635  
##  Residual                       142.705  11.946  
## Number of obs: 2543, groups:  pt_id:cohort_class, 865; cohort_class, 3
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  73.74553    1.74524  15.07561  42.255   <2e-16 ***
## neurot       -0.10023    0.08884 812.90837  -1.128     0.26    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##        (Intr)
## neurot -0.787

NE & Initial Expectations

summary(lmer(pred_1 ~ neurot + (1 | cohort_class / pt_id),
             data = df.retest))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: pred_1 ~ neurot + (1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 20553.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.8675 -0.3970  0.1398  0.5476  3.2732 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept) 116.153  10.777  
##  cohort_class       (Intercept)   9.511   3.084  
##  Residual                       122.224  11.055  
## Number of obs: 2543, groups:  pt_id:cohort_class, 865; cohort_class, 3
## 
## Fixed effects:
##             Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)  77.0892     2.2013   4.1778  35.020 2.56e-06 ***
## neurot       -0.2371     0.0784 779.9783  -3.024  0.00258 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##        (Intr)
## neurot -0.549

NE & Initial PEs

summary(lmer(pe_1 ~ neurot + exam + pe_1_lag1 + grade_lag1 + (1 | cohort_class / pt_id),
             data = df.retest))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## pe_1 ~ neurot + exam + pe_1_lag1 + grade_lag1 + (1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 11724.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.9504 -0.5355  0.0248  0.5614  3.6325 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept)  36.7125  6.0591 
##  cohort_class       (Intercept)   0.5005  0.7075 
##  Residual                       103.6687 10.1818 
## Number of obs: 1515, groups:  pt_id:cohort_class, 690; cohort_class, 3
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)  -10.14825    2.24355  362.35135  -4.523 8.26e-06 ***
## neurot         0.20398    0.06519  314.19837   3.129  0.00192 ** 
## exam           0.04706    0.29691  649.95383   0.159  0.87411    
## pe_1_lag1     -0.04551    0.02840 1429.91167  -1.602  0.10928    
## grade_lag1     0.10039    0.02301 1282.20515   4.362 1.39e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) neurot exam   p_1_l1
## neurot     -0.521                     
## exam       -0.308 -0.013              
## pe_1_lag1   0.490 -0.108  0.004       
## grade_lag1 -0.761  0.098 -0.115 -0.571

NE & Accuracy

summary(lmer(unsigned_pe_1 ~ neurot + exam + unsigned_lag_pe_1 +(1 | cohort_class / pt_id),
             data = df.retest))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## unsigned_pe_1 ~ neurot + exam + unsigned_lag_pe_1 + (1 | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 10377
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9819 -0.7156 -0.1982  0.5155  4.8612 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  pt_id:cohort_class (Intercept)  2.0110  1.418   
##  cohort_class       (Intercept)  0.8949  0.946   
##  Residual                       52.8024  7.267   
## Number of obs: 1515, groups:  pt_id:cohort_class, 690; cohort_class, 3
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          8.73248    1.05036   19.27931   8.314 8.44e-08 ***
## neurot               0.10460    0.03536  286.16455   2.959 0.003349 ** 
## exam                -0.68699    0.20530  940.65575  -3.346 0.000851 ***
## unsigned_lag_pe_1    0.08553    0.02439 1503.29177   3.506 0.000468 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) neurot exam  
## neurot      -0.497              
## exam        -0.619 -0.010       
## unsgnd_l__1 -0.272 -0.076  0.125

NE -> Updating

md <- lmer(next_update_1 ~ pe_1*neurot + delta_grade + (1 + neurot |  cohort_class / pt_id), data = df.retest)
## boundary (singular) fit: see ?isSingular
summary(md)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## next_update_1 ~ pe_1 * neurot + delta_grade + (1 + neurot | cohort_class/pt_id)
##    Data: df.retest
## 
## REML criterion at convergence: 11516.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.9571 -0.5488 -0.0221  0.5797  3.6035 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev. Corr 
##  pt_id:cohort_class (Intercept) 7.190e+00  2.68148      
##                     neurot      1.122e-01  0.33491 -1.00
##  cohort_class       (Intercept) 1.905e+00  1.38014      
##                     neurot      4.874e-03  0.06982 -1.00
##  Residual                       1.070e+02 10.34575      
## Number of obs: 1515, groups:  pt_id:cohort_class, 690; cohort_class, 3
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)  1.590e+00  1.185e+00  2.139e+00   1.342  0.30442    
## pe_1         5.724e-01  6.485e-02  1.259e+03   8.827  < 2e-16 ***
## neurot      -1.280e-01  6.880e-02  2.390e+00  -1.861  0.18264    
## delta_grade  7.352e-01  1.752e-02  1.157e+03  41.968  < 2e-16 ***
## pe_1:neurot  9.832e-03  3.794e-03  1.143e+03   2.592  0.00967 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) pe_1   neurot dlt_gr
## pe_1         0.085                     
## neurot      -0.959 -0.073              
## delta_grade -0.002  0.169 -0.014       
## pe_1:neurot -0.065 -0.932  0.050 -0.026
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular

Overlearning from small PEs

md <- lmer(next_uPE_1 ~ PE1_size*neurot*PE1_sign + exam + (1 + neurot | cohort_class / pt_id), df.retest,
           control = lmerControl(check.nobs.vs.nRE="ignore"))
## boundary (singular) fit: see ?isSingular
summary(md)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: next_uPE_1 ~ PE1_size * neurot * PE1_sign + exam + (1 + neurot |  
##     cohort_class/pt_id)
##    Data: df.retest
## Control: lmerControl(check.nobs.vs.nRE = "ignore")
## 
## REML criterion at convergence: 10213.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.5898 -0.7218 -0.1829  0.5052  4.5241 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev. Corr 
##  pt_id:cohort_class (Intercept) 4.210e-01 0.64881       
##                     neurot      2.357e-02 0.15351  -1.00
##  cohort_class       (Intercept) 2.202e+00 1.48402       
##                     neurot      8.958e-04 0.02993  -1.00
##  Residual                       5.120e+01 7.15539       
## Number of obs: 1492, groups:  pt_id:cohort_class, 690; cohort_class, 3
## 
## Fixed effects:
##                                  Estimate Std. Error         df t value
## (Intercept)                      11.14075    1.45442    7.66903   7.660
## PE1_sizeSmall                    -4.38434    1.57250 1400.65577  -2.788
## neurot                            0.01997    0.07286   46.84745   0.274
## PE1_sign+                        -1.18000    1.70062 1423.13873  -0.694
## exam                             -0.66164    0.20545 1133.69850  -3.220
## PE1_sizeSmall:neurot              0.24492    0.09890 1309.81474   2.476
## PE1_sizeSmall:PE1_sign+           1.55371    2.29932 1408.57987   0.676
## neurot:PE1_sign+                  0.02015    0.10171 1302.83185   0.198
## PE1_sizeSmall:neurot:PE1_sign+   -0.13546    0.14004 1328.75453  -0.967
##                                Pr(>|t|)    
## (Intercept)                    7.47e-05 ***
## PE1_sizeSmall                   0.00537 ** 
## neurot                          0.78524    
## PE1_sign+                       0.48788    
## exam                            0.00132 ** 
## PE1_sizeSmall:neurot            0.01339 *  
## PE1_sizeSmall:PE1_sign+         0.49933    
## neurot:PE1_sign+                0.84301    
## PE1_sizeSmall:neurot:PE1_sign+  0.33356    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) PE1_sS neurot PE1_s+ exam   PE1_sS: PE1_S:P n:PE1_
## PE1_sizSmll -0.526                                                   
## neurot      -0.832  0.625                                            
## PE1_sign+   -0.489  0.461  0.582                                     
## exam        -0.262 -0.016  0.001 -0.012                              
## PE1_szSmll:  0.498 -0.937 -0.673 -0.432 -0.003                       
## PE1_S:PE1_+  0.368 -0.686 -0.427 -0.737 -0.021  0.644                
## nrt:PE1_sg+  0.486 -0.454 -0.658 -0.939 -0.003  0.490   0.693        
## PE1_S::PE1_ -0.352  0.664  0.474  0.680  0.009 -0.709  -0.941  -0.724
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see ?isSingular
plot_model(md, type = "pred", terms = c("PE1_size", "neurot")) + 
  ylim(c(6,13)) + 
  ggtitle(NULL)
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.

plot_model(md, type = "pred", terms = c("PE1_sign", "neurot")) + 
  ylim(c(7,13)) + 
  ggtitle(NULL)
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.