1 Experiment 1

In this study, children and adults answered questions while playing an iPad game. We varied

In this analysis, we fit hierarchical Bayesian models to characterize the distribution of reaction times, assuming that they follow an ex-gaussian. All models are fit using the package brms.

1.1 Distribution of Response Times

The graphs below show the distribution of normaliszed RTs across conditions. When the answer was less predictable, participants were slower to respond. But there was no interaction in the non-distributional analyses.

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 45 rows containing non-finite values (stat_bin).
## Warning: Removed 6 rows containing missing values (geom_path).

1.2 Analysis

An ex-gaussian distribution convolves a normal distribution with an exponential – this gives it a long and heavy right tail. We aimed to fit an ex-Gaussian to the response time data, comparing adults with children, and hierarchically modeling the mu parameter, the sigma parameter, and the tau parameter. Mu is the mean of the normal and sigma its standard deviation, while tau is the rate of the exponential. We modeled how these varied across conditions, accounting for random subjec intercepts. We print the structure of each model below.

Note that Tau is called Beta in the model, as per brms convention.

1.2.1 Ex-Gaussian analysis of All ages

1.2.1.1  All age groups model

 z <- 1
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }

formula(expt1.fullage)
## rt ~ 1 + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
expt1.full.summary <- convert_stan_to_dataframe(expt1.fullage)


kable(expt1.full.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.10 0.04 1.02 1.18 399.94 1.01 *
sigma_Intercept -2.07 0.11 -2.30 -1.86 1295.10 1.00 *
beta_Intercept -1.65 0.14 -1.93 -1.38 580.34 1.00 *
AgeFive -0.17 0.05 -0.28 -0.06 520.18 1.01 *
AgeThree -0.17 0.05 -0.28 -0.06 575.98 1.00 *
MatchMismatch 0.01 0.02 -0.02 0.04 1491.13 1.00 -
PredUnpred 0.04 0.02 0.00 0.07 1445.95 1.00 *
AgeFive:MatchMismatch 0.00 0.03 -0.06 0.06 1772.46 1.00 -
AgeThree:MatchMismatch 0.04 0.03 -0.02 0.10 2171.02 1.00 -
AgeFive:PredUnpred 0.01 0.03 -0.04 0.07 1983.56 1.00 -
AgeThree:PredUnpred 0.07 0.04 0.00 0.15 2222.78 1.00 -
MatchMismatch:PredUnpred -0.05 0.02 -0.09 0.00 1259.86 1.00 *
AgeFive:MatchMismatch:PredUnpred 0.06 0.04 -0.02 0.15 1786.32 1.00 -
AgeThree:MatchMismatch:PredUnpred -0.01 0.05 -0.11 0.09 1815.12 1.00 -
sigma_AgeFive 0.08 0.17 -0.26 0.40 1902.41 1.00 -
sigma_AgeThree -0.02 0.19 -0.39 0.34 1966.18 1.00 -
sigma_MatchMismatch -0.11 0.10 -0.31 0.10 1671.85 1.00 -
sigma_PredUnpred -0.10 0.12 -0.34 0.13 1722.60 1.00 -
sigma_AgeFive:MatchMismatch 0.03 0.19 -0.34 0.41 3200.00 1.00 -
sigma_AgeThree:MatchMismatch 0.10 0.21 -0.32 0.51 1968.91 1.00 -
sigma_AgeFive:PredUnpred 0.02 0.19 -0.36 0.40 2394.13 1.00 -
sigma_AgeThree:PredUnpred 0.19 0.24 -0.30 0.66 2030.69 1.00 -
sigma_MatchMismatch:PredUnpred -0.07 0.17 -0.39 0.25 1557.22 1.00 -
sigma_AgeFive:MatchMismatch:PredUnpred 0.26 0.30 -0.33 0.83 2095.08 1.00 -
sigma_AgeThree:MatchMismatch:PredUnpred 0.11 0.33 -0.53 0.78 1765.01 1.00 -
beta_AgeFive 1.12 0.17 0.80 1.46 1048.13 1.00 *
beta_AgeThree 1.19 0.17 0.86 1.51 741.15 1.00 *
beta_MatchMismatch -0.07 0.10 -0.28 0.12 1339.73 1.00 -
beta_PredUnpred 0.19 0.11 -0.01 0.40 1374.57 1.00 -
beta_AgeFive:MatchMismatch 0.09 0.13 -0.17 0.35 1438.22 1.00 -
beta_AgeThree:MatchMismatch -0.05 0.13 -0.32 0.21 1516.39 1.00 -
beta_AgeFive:PredUnpred -0.09 0.13 -0.35 0.16 1592.00 1.00 -
beta_AgeThree:PredUnpred -0.11 0.14 -0.40 0.16 1643.78 1.00 -
beta_MatchMismatch:PredUnpred 0.21 0.13 -0.05 0.48 1130.71 1.00 -
beta_AgeFive:MatchMismatch:PredUnpred -0.16 0.17 -0.51 0.19 1399.77 1.00 -
beta_AgeThree:MatchMismatch:PredUnpred 0.01 0.19 -0.35 0.39 1359.47 1.00 -

1.2.1.2 Adults alone model

 z <- 1

expt1.fine.adults.summary <- convert_stan_to_dataframe(expt1.fullage.adult)
formula(expt1.fullage.adult)
## rt ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
kable(expt1.fine.adults.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.10 0.06 0.99 1.22 245.61 1.02 *
sigma_Intercept -2.11 0.12 -2.35 -1.87 825.61 1.01 *
beta_Intercept -1.67 0.16 -1.98 -1.37 453.99 1.01 *
MatchMismatch 0.04 0.02 0.01 0.07 1022.29 1.01 *
PredUnpred 0.05 0.02 0.02 0.09 1006.15 1.01 *
MatchMismatch:PredUnpred -0.06 0.02 -0.11 -0.01 954.81 1.01 *
sigma_MatchMismatch -0.07 0.11 -0.28 0.13 1332.82 1.00 -
sigma_PredUnpred -0.08 0.11 -0.30 0.15 1299.46 1.00 -
sigma_MatchMismatch:PredUnpred -0.12 0.16 -0.44 0.20 1211.66 1.00 -
beta_MatchMismatch -0.12 0.11 -0.33 0.09 1066.73 1.01 -
beta_PredUnpred 0.15 0.11 -0.06 0.38 1164.26 1.00 -
beta_MatchMismatch:PredUnpred 0.26 0.14 -0.02 0.53 1081.80 1.00 -

1.2.1.3 Fives alone model

 z <- 1

expt1.fine.five.summary <- convert_stan_to_dataframe(expt1.fullage.five)
formula(expt1.fullage.five)
## rt ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
kable(expt1.fine.five.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.96 0.04 0.88 1.04 759.17 1.00 *
sigma_Intercept -1.97 0.14 -2.28 -1.70 2043.16 1.00 *
beta_Intercept -0.57 0.14 -0.86 -0.29 631.72 1.01 *
MatchMismatch -0.05 0.03 -0.10 0.01 1670.75 1.00 -
PredUnpred 0.02 0.03 -0.05 0.09 1328.43 1.00 -
MatchMismatch:PredUnpred 0.07 0.05 -0.02 0.16 1305.49 1.00 -
sigma_MatchMismatch -0.16 0.18 -0.52 0.20 2077.65 1.00 -
sigma_PredUnpred -0.15 0.20 -0.55 0.23 1889.48 1.00 -
sigma_MatchMismatch:PredUnpred 0.38 0.27 -0.15 0.93 1686.13 1.00 -
beta_MatchMismatch 0.10 0.09 -0.08 0.28 1666.19 1.00 -
beta_PredUnpred 0.19 0.11 -0.01 0.40 1553.10 1.00 -
beta_MatchMismatch:PredUnpred -0.06 0.13 -0.33 0.20 1411.35 1.00 -

1.2.1.4 Threes alone model (did not converge, do not trust this model)

 z <- 1

expt1.fine.three.summary <- convert_stan_to_dataframe(expt1.fullage.three)
## Warning: There were 17 divergent transitions after warmup. Increasing
## adapt_delta above 0.8 may help. See http://mc-stan.org/misc/
## warnings.html#divergent-transitions-after-warmup
formula(expt1.fullage.three)
## rt ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
kable(expt1.fine.three.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.95 0.05 0.85 1.04 438.40 1.01 *
sigma_Intercept -2.50 0.27 -3.11 -2.03 666.05 1.01 *
beta_Intercept -0.43 0.10 -0.63 -0.22 929.02 1.00 *
MatchMismatch -0.01 0.03 -0.07 0.05 1052.33 1.00 -
PredUnpred 0.12 0.04 0.04 0.21 793.72 1.00 *
MatchMismatch:PredUnpred -0.06 0.05 -0.16 0.04 812.91 1.00 -
sigma_MatchMismatch -0.12 0.35 -0.86 0.53 1055.43 1.00 -
sigma_PredUnpred 0.21 0.35 -0.46 0.89 1036.18 1.00 -
sigma_MatchMismatch:PredUnpred 0.23 0.46 -0.61 1.15 1058.11 1.00 -
beta_MatchMismatch -0.07 0.09 -0.26 0.11 1186.62 1.01 -
beta_PredUnpred 0.02 0.11 -0.21 0.24 1189.02 1.00 -
beta_MatchMismatch:PredUnpred 0.27 0.14 -0.01 0.56 1109.22 1.00 -

1.2.2 Ex Gaussian analysis of Adults versus kids with random effects

Note that these models include random effects.

1.2.2.1 Full model

load("expt1_brms_1sd.RDATA")
z<-1
expt1.gross.summary <- convert_stan_to_dataframe(expt1.grossage)
formula(expt1.grossage)
## rt ~ 1 + Age * Match * Pred + (1 + Match * Pred | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Age * Match * Pred + (1 + Match * Pred | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Age * Match * Pred + (1 + Match * Pred | Subject) + (1 | Time.to.Say.Character.Name)
kable(expt1.gross.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.10 0.04 1.02 1.19 679.47 1 *
sigma_Intercept -2.09 0.12 -2.33 -1.85 2593.17 1 *
beta_Intercept -1.66 0.14 -1.93 -1.39 1719.20 1 *
AgeChild -0.17 0.05 -0.27 -0.07 779.73 1 *
MatchMismatch 0.01 0.02 -0.02 0.05 2093.88 1 -
PredUnpred 0.03 0.02 -0.01 0.07 2361.46 1 -
AgeChild:MatchMismatch 0.02 0.02 -0.03 0.06 3051.34 1 -
AgeChild:PredUnpred 0.05 0.03 0.00 0.11 2838.00 1 -
MatchMismatch:PredUnpred -0.04 0.02 -0.09 0.01 1947.21 1 -
AgeChild:MatchMismatch:PredUnpred 0.03 0.04 -0.04 0.10 2655.26 1 -
sigma_AgeChild 0.02 0.16 -0.29 0.33 2525.27 1 -
sigma_MatchMismatch -0.09 0.11 -0.31 0.12 2664.56 1 -
sigma_PredUnpred -0.13 0.13 -0.38 0.11 2977.72 1 -
sigma_AgeChild:MatchMismatch 0.07 0.16 -0.26 0.39 3336.83 1 -
sigma_AgeChild:PredUnpred 0.11 0.18 -0.24 0.46 3381.63 1 -
sigma_MatchMismatch:PredUnpred -0.06 0.18 -0.42 0.29 2908.07 1 -
sigma_AgeChild:MatchMismatch:PredUnpred 0.20 0.26 -0.33 0.72 2979.17 1 -
beta_AgeChild 1.17 0.15 0.88 1.47 1572.99 1 *
beta_MatchMismatch -0.10 0.12 -0.33 0.12 2035.68 1 -
beta_PredUnpred 0.23 0.12 0.00 0.46 2213.27 1 -
beta_AgeChild:MatchMismatch 0.03 0.13 -0.21 0.30 2271.03 1 -
beta_AgeChild:PredUnpred -0.16 0.13 -0.41 0.10 2533.23 1 -
beta_MatchMismatch:PredUnpred 0.19 0.14 -0.08 0.47 1879.99 1 -
beta_AgeChild:MatchMismatch:PredUnpred -0.05 0.16 -0.37 0.25 2063.05 1 -

1.2.2.2 Adult model

(This model is the same as the adults alone above)

z<-1
formula(expt1.grossage.adult)
## rt ~ 1 + Match * Pred + (1 + Match * Pred | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 + Match * Pred | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 + Match * Pred | Subject) + (1 | Time.to.Say.Character.Name)
expt1.gross.adult.summary <- convert_stan_to_dataframe(expt1.grossage.adult)

kable(expt1.gross.adult.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.10 0.06 0.98 1.23 573.77 1.01 *
sigma_Intercept -2.11 0.13 -2.38 -1.85 2105.23 1.00 *
beta_Intercept -1.67 0.16 -1.99 -1.36 1693.91 1.00 *
MatchMismatch 0.05 0.02 0.01 0.09 2500.59 1.00 *
PredUnpred 0.05 0.02 0.01 0.08 2442.46 1.00 *
MatchMismatch:PredUnpred -0.06 0.02 -0.11 -0.01 2215.23 1.00 *
sigma_MatchMismatch -0.04 0.11 -0.26 0.18 3683.23 1.00 -
sigma_PredUnpred -0.13 0.13 -0.38 0.12 3077.52 1.00 -
sigma_MatchMismatch:PredUnpred -0.15 0.19 -0.54 0.21 3265.05 1.00 -
beta_MatchMismatch -0.19 0.14 -0.48 0.07 2314.63 1.00 -
beta_PredUnpred 0.20 0.13 -0.04 0.46 2709.13 1.00 -
beta_MatchMismatch:PredUnpred 0.27 0.16 -0.06 0.59 2424.66 1.00 -

1.2.2.3 Child model

(This model collapses Fives and Threes)

z<-1
formula(expt1.grossage.child)
## rt ~ 1 + Match * Pred + (1 + Match * Pred || Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 + Match * Pred || Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 + Match * Pred || Subject) + (1 | Time.to.Say.Character.Name)
expt1.gross.child.summary <- convert_stan_to_dataframe(expt1.grossage.child)
## Warning: There were 2 divergent transitions after warmup. Increasing
## adapt_delta above 0.8 may help. See http://mc-stan.org/misc/
## warnings.html#divergent-transitions-after-warmup
kable(expt1.gross.child.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.95 0.03 0.88 1.02 1350.65 1 *
sigma_Intercept -2.22 0.16 -2.55 -1.94 2499.15 1 *
beta_Intercept -0.48 0.09 -0.65 -0.29 2146.99 1 *
MatchMismatch -0.03 0.02 -0.07 0.01 2122.40 1 -
PredUnpred 0.07 0.03 0.01 0.13 1786.56 1 *
MatchMismatch:PredUnpred 0.03 0.03 -0.04 0.10 1945.35 1 -
sigma_MatchMismatch -0.06 0.18 -0.42 0.29 2400.61 1 -
sigma_PredUnpred -0.07 0.20 -0.47 0.34 2313.64 1 -
sigma_MatchMismatch:PredUnpred 0.24 0.26 -0.28 0.73 2364.11 1 -
beta_MatchMismatch 0.00 0.07 -0.15 0.15 3235.45 1 -
beta_PredUnpred 0.08 0.09 -0.09 0.25 2745.36 1 -
beta_MatchMismatch:PredUnpred 0.10 0.11 -0.10 0.32 2443.29 1 -

1.2.3 Ex Gaussian analysis of Adults versus kids without random effects

Note that these models do not include random effects.

1.2.3.1 Full model

load("expt1_brms_1sd.noranef.RDATA")
z<-1
expt1.gross.summary <- convert_stan_to_dataframe(expt1.grossage)
formula(expt1.grossage)
## rt ~ 1 + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
kable(expt1.gross.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.10 0.04 1.02 1.18 261.74 1.01 *
sigma_Intercept -2.07 0.11 -2.29 -1.84 1374.89 1.00 *
beta_Intercept -1.65 0.13 -1.92 -1.40 778.12 1.00 *
AgeChild -0.16 0.05 -0.25 -0.07 354.49 1.00 *
MatchMismatch 0.01 0.02 -0.03 0.04 1362.14 1.00 -
PredUnpred 0.04 0.02 0.00 0.07 1233.76 1.00 *
AgeChild:MatchMismatch 0.02 0.02 -0.03 0.07 1478.97 1.00 -
AgeChild:PredUnpred 0.04 0.03 -0.01 0.09 1729.03 1.00 -
MatchMismatch:PredUnpred -0.05 0.02 -0.09 0.00 1142.20 1.00 *
AgeChild:MatchMismatch:PredUnpred 0.03 0.03 -0.03 0.10 1360.49 1.00 -
sigma_AgeChild 0.03 0.15 -0.27 0.31 1355.99 1.00 -
sigma_MatchMismatch -0.11 0.10 -0.30 0.09 1517.69 1.00 -
sigma_PredUnpred -0.10 0.12 -0.34 0.13 1371.77 1.00 -
sigma_AgeChild:MatchMismatch 0.07 0.16 -0.22 0.38 1624.88 1.00 -
sigma_AgeChild:PredUnpred 0.08 0.17 -0.24 0.42 1567.14 1.00 -
sigma_MatchMismatch:PredUnpred -0.07 0.16 -0.39 0.27 1432.07 1.00 -
sigma_AgeChild:MatchMismatch:PredUnpred 0.20 0.25 -0.30 0.69 1389.73 1.00 -
beta_AgeChild 1.16 0.14 0.88 1.44 796.71 1.00 *
beta_MatchMismatch -0.07 0.10 -0.27 0.13 1244.22 1.00 -
beta_PredUnpred 0.20 0.11 -0.01 0.41 1213.83 1.00 -
beta_AgeChild:MatchMismatch 0.02 0.12 -0.21 0.25 1270.23 1.00 -
beta_AgeChild:PredUnpred -0.10 0.11 -0.32 0.13 1317.49 1.00 -
beta_MatchMismatch:PredUnpred 0.21 0.14 -0.05 0.48 1073.70 1.00 -
beta_AgeChild:MatchMismatch:PredUnpred -0.08 0.15 -0.38 0.21 1101.52 1.00 -

1.2.3.2 Adult model

(This model is the same as the adults alone above)

z<-1
formula(expt1.grossage.adult)
## rt ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
expt1.gross.adult.summary <- convert_stan_to_dataframe(expt1.grossage.adult)

kable(expt1.gross.adult.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.09 0.06 0.98 1.21 152.24 1.02 *
sigma_Intercept -2.11 0.12 -2.36 -1.88 702.50 1.00 *
beta_Intercept -1.65 0.16 -1.96 -1.35 484.24 1.00 *
MatchMismatch 0.04 0.02 0.01 0.07 1009.50 1.00 *
PredUnpred 0.05 0.02 0.02 0.09 689.32 1.00 *
MatchMismatch:PredUnpred -0.06 0.02 -0.11 -0.02 755.43 1.00 *
sigma_MatchMismatch -0.07 0.10 -0.26 0.13 1534.76 1.00 -
sigma_PredUnpred -0.07 0.11 -0.30 0.15 962.30 1.00 -
sigma_MatchMismatch:PredUnpred -0.12 0.16 -0.44 0.18 1042.05 1.00 -
beta_MatchMismatch -0.13 0.11 -0.36 0.08 1125.09 1.00 -
beta_PredUnpred 0.14 0.12 -0.09 0.37 902.37 1.00 -
beta_MatchMismatch:PredUnpred 0.27 0.15 -0.02 0.56 870.01 1.00 -

1.2.3.3 Child model

(This model collapses Fives and Threes)

z<-1
formula(expt1.grossage.child)
## rt ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
expt1.gross.child.summary <- convert_stan_to_dataframe(expt1.grossage.child)

kable(expt1.gross.child.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.96 0.04 0.89 1.03 437.46 1.01 *
sigma_Intercept -2.10 0.14 -2.38 -1.84 1102.94 1.00 *
beta_Intercept -0.49 0.09 -0.67 -0.31 606.97 1.00 *
MatchMismatch -0.03 0.02 -0.08 0.01 961.59 1.00 -
PredUnpred 0.05 0.03 -0.01 0.10 777.71 1.00 -
MatchMismatch:PredUnpred 0.03 0.04 -0.04 0.10 769.41 1.00 -
sigma_MatchMismatch -0.10 0.16 -0.43 0.22 1230.90 1.00 -
sigma_PredUnpred -0.05 0.18 -0.42 0.30 978.02 1.00 -
sigma_MatchMismatch:PredUnpred 0.22 0.23 -0.23 0.68 994.32 1.00 -
beta_MatchMismatch 0.01 0.07 -0.12 0.15 1092.57 1.00 -
beta_PredUnpred 0.11 0.08 -0.05 0.28 614.75 1.00 -
beta_MatchMismatch:PredUnpred 0.10 0.10 -0.11 0.30 973.98 1.00 -

1.2.4 Ex Gaussian analysis that includes length as a predictor

Note that these models do not include random effects.

1.2.4.1 Full model

load("expt1_brms_1sd.noranef_length.RDATA")
z<-1
expt1.gross.summary <- convert_stan_to_dataframe(expt1.grossage.length)
formula(expt1.grossage.length)
## rt ~ 1 + Length.Type + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Length.Type + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Length.Type + Age * Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
kable(expt1.gross.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.04 0.02 0.99 1.09 415.09 1.02 *
sigma_Intercept -2.11 0.08 -2.26 -1.97 1207.15 1.00 *
beta_Intercept -1.00 0.08 -1.16 -0.85 805.96 1.00 *
Length.TypeShort 0.05 0.01 0.02 0.07 837.75 1.00 *
AgeChild -0.07 0.02 -0.11 -0.02 436.87 1.00 *
MatchMismatch 0.00 0.01 -0.01 0.01 2400.00 1.00 -
PredUnpred 0.02 0.01 0.01 0.03 2400.00 1.00 *
AgeChild:MatchMismatch 0.01 0.00 0.00 0.02 2400.00 1.00 -
AgeChild:PredUnpred 0.01 0.00 0.00 0.02 2400.00 1.00 *
MatchMismatch:PredUnpred -0.01 0.01 -0.02 0.00 2400.00 1.00 -
AgeChild:MatchMismatch:PredUnpred 0.00 0.00 0.00 0.01 2400.00 1.00 -
sigma_Length.TypeShort -0.03 0.05 -0.13 0.09 2112.92 1.00 -
sigma_AgeChild 0.07 0.06 -0.05 0.19 1271.66 1.00 -
sigma_MatchMismatch -0.02 0.04 -0.10 0.06 2400.00 1.00 -
sigma_PredUnpred -0.02 0.03 -0.09 0.04 2400.00 1.00 -
sigma_AgeChild:MatchMismatch 0.04 0.03 -0.02 0.10 2400.00 1.00 -
sigma_AgeChild:PredUnpred 0.05 0.03 -0.01 0.11 2400.00 1.00 -
sigma_MatchMismatch:PredUnpred 0.01 0.03 -0.05 0.08 2400.00 1.00 -
sigma_AgeChild:MatchMismatch:PredUnpred 0.03 0.03 -0.03 0.09 2400.00 1.00 -
beta_Length.TypeShort 0.10 0.05 0.01 0.20 1359.15 1.00 *
beta_AgeChild 0.55 0.06 0.42 0.67 659.11 1.00 *
beta_MatchMismatch 0.00 0.02 -0.04 0.05 2400.00 1.00 -
beta_PredUnpred 0.11 0.02 0.07 0.16 2400.00 1.00 *
beta_AgeChild:MatchMismatch 0.00 0.02 -0.04 0.03 2400.00 1.00 -
beta_AgeChild:PredUnpred -0.04 0.02 -0.07 0.00 2400.00 1.00 -
beta_MatchMismatch:PredUnpred 0.04 0.02 0.00 0.09 2400.00 1.00 -
beta_AgeChild:MatchMismatch:PredUnpred -0.01 0.02 -0.05 0.03 2400.00 1.00 -

1.2.4.2 Adult model

(This model is the same as the adults alone above)

z<-1
formula(expt1.grossage.adult.length)
## rt ~ 1 + Length.Type + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Length.Type + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Length.Type + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
expt1.gross.adult.summary <- convert_stan_to_dataframe(expt1.grossage.adult.length)

kable(expt1.gross.adult.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.15 0.06 1.03 1.26 201.28 1.03 *
sigma_Intercept -2.20 0.11 -2.42 -1.99 548.90 1.01 *
beta_Intercept -1.63 0.13 -1.89 -1.37 466.11 1.01 *
Length.TypeShort 0.02 0.01 -0.01 0.05 546.35 1.01 -
MatchMismatch 0.01 0.01 -0.01 0.02 1754.41 1.00 -
PredUnpred 0.01 0.01 0.00 0.02 1310.40 1.00 -
MatchMismatch:PredUnpred -0.02 0.01 -0.03 0.00 1426.72 1.00 *
sigma_Length.TypeShort -0.02 0.06 -0.14 0.10 1491.64 1.00 -
sigma_MatchMismatch -0.06 0.05 -0.15 0.04 1580.40 1.00 -
sigma_PredUnpred -0.07 0.04 -0.15 0.01 1750.31 1.00 -
sigma_MatchMismatch:PredUnpred -0.03 0.04 -0.11 0.05 1922.15 1.00 -
beta_Length.TypeShort 0.18 0.07 0.04 0.32 977.62 1.00 *
beta_MatchMismatch -0.03 0.04 -0.10 0.05 1672.09 1.00 -
beta_PredUnpred 0.14 0.04 0.07 0.21 1782.34 1.00 *
beta_MatchMismatch:PredUnpred 0.07 0.04 0.00 0.14 1933.37 1.00 *

1.2.4.3 Child model

(This model collapses Fives and Threes)

z<-1
formula(expt1.grossage.child.length)
## rt ~ 1 + Length.Type + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name) 
## beta ~ 1 + Length.Type + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
## sigma ~ 1 + Length.Type + Match * Pred + (1 | Subject) + (1 | Time.to.Say.Character.Name)
expt1.gross.child.summary <- convert_stan_to_dataframe(expt1.grossage.child.length)

kable(expt1.gross.child.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.97 0.03 0.91 1.02 597.52 1.00 *
sigma_Intercept -2.12 0.10 -2.33 -1.93 1765.26 1.00 *
beta_Intercept -0.39 0.08 -0.55 -0.25 717.36 1.01 *
Length.TypeShort 0.11 0.02 0.07 0.15 607.10 1.00 *
MatchMismatch -0.02 0.01 -0.03 0.00 1568.91 1.00 -
PredUnpred 0.03 0.01 0.01 0.05 1526.90 1.00 *
MatchMismatch:PredUnpred 0.01 0.01 -0.01 0.02 1479.58 1.00 -
sigma_Length.TypeShort 0.02 0.09 -0.16 0.20 1554.79 1.00 -
sigma_MatchMismatch -0.01 0.06 -0.14 0.12 1878.72 1.00 -
sigma_PredUnpred 0.03 0.06 -0.08 0.14 2400.00 1.00 -
sigma_MatchMismatch:PredUnpred 0.05 0.06 -0.06 0.17 1586.09 1.00 -
beta_Length.TypeShort 0.03 0.05 -0.08 0.13 875.12 1.01 -
beta_MatchMismatch 0.04 0.03 -0.02 0.09 2400.00 1.00 -
beta_PredUnpred 0.08 0.02 0.03 0.13 1800.25 1.00 *
beta_MatchMismatch:PredUnpred 0.03 0.03 -0.02 0.08 1916.91 1.00 -

2 Experiment 2

In this study, children and adults answered questions while playing an iPad game. We varied

In this analysis, we fit hierarchical Bayesian models to characterize the distribution of reaction times, assuming that they follow an ex-gaussian. All models are fit using the package brms.

2.1 Distribution of Respose Times

The graphs below show the distribution of normaliszed RTs across conditions. When the answer was less predictable, participants were slower to respond. But there was no interaction in the non-distributional analyses.

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 126 rows containing non-finite values (stat_bin).
## Warning: Removed 6 rows containing missing values (geom_path).

2.2 Analysis

An ex-gaussian distribution convolves a normal distribution with an exponential – this gives it a long and heavy right tail. We aimed to fit an ex-Gaussian to the response time data, comparing adults with children, and hierarchically modeling the mu parameter, the sigma parameter, and the tau parameter. Mu is the mean of the normal and sigma its standard deviation, while tau is the rate of the exponential. We modeled how these varied across conditions, accounting for random subjec intercepts. We print the structure of each model below.

Note that Tau is called Beta in the model, as per brms convention.

2.2.1 Ex-Gaussian analysis of All ages

In this analysis, we compare Adults, Five-year-olds, and Three-year-olds as separate groups.

2.2.1.1 Full analysis

 z <- 0
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.full.summary <- convert_stan_to_dataframe(expt2.model)

formula(expt2.model)
## rt ~ 1 + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.full.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.48 0.01 0.45 0.50 398.99 1.01 *
sigma_Intercept -3.29 0.10 -3.49 -3.09 1451.21 1.00 *
beta_Intercept -2.72 0.13 -2.96 -2.46 761.53 1.00 *
AgeFive -0.08 0.02 -0.12 -0.04 329.68 1.02 *
AgeThree -0.09 0.02 -0.12 -0.05 600.67 1.01 *
Early.Latelate 0.03 0.01 0.02 0.05 714.33 1.01 *
PredUnpred 0.03 0.02 -0.01 0.07 380.39 1.01 -
AgeFive:Early.Latelate 0.07 0.01 0.05 0.09 1998.77 1.00 *
AgeThree:Early.Latelate 0.06 0.01 0.04 0.08 1932.21 1.00 *
AgeFive:PredUnpred 0.02 0.03 -0.05 0.07 381.40 1.01 -
AgeThree:PredUnpred 0.01 0.03 -0.05 0.06 522.02 1.01 -
Early.Latelate:PredUnpred -0.02 0.01 -0.04 -0.01 2335.89 1.00 *
AgeFive:Early.Latelate:PredUnpred -0.03 0.02 -0.05 0.01 2389.20 1.00 -
AgeThree:Early.Latelate:PredUnpred 0.00 0.02 -0.03 0.03 2125.51 1.00 -
sigma_AgeFive -0.26 0.20 -0.66 0.12 1392.41 1.00 -
sigma_AgeThree 0.09 0.19 -0.28 0.45 1777.78 1.00 -
sigma_Early.Latelate 0.01 0.09 -0.16 0.19 2005.72 1.00 -
sigma_PredUnpred -0.16 0.15 -0.45 0.13 1215.33 1.00 -
sigma_AgeFive:Early.Latelate 0.41 0.21 0.00 0.84 1908.16 1.00 -
sigma_AgeThree:Early.Latelate 0.21 0.21 -0.20 0.60 2006.08 1.00 -
sigma_AgeFive:PredUnpred 0.70 0.26 0.19 1.21 1417.84 1.00 *
sigma_AgeThree:PredUnpred -0.30 0.38 -1.12 0.37 1205.77 1.00 -
sigma_Early.Latelate:PredUnpred 0.10 0.13 -0.15 0.34 2310.25 1.00 -
sigma_AgeFive:Early.Latelate:PredUnpred -0.08 0.27 -0.63 0.44 1944.43 1.00 -
sigma_AgeThree:Early.Latelate:PredUnpred 0.30 0.41 -0.43 1.14 1382.01 1.00 -
beta_AgeFive 1.45 0.17 1.12 1.79 700.22 1.00 *
beta_AgeThree 1.48 0.17 1.14 1.83 748.28 1.00 *
beta_Early.Latelate 0.27 0.08 0.12 0.41 1370.23 1.00 *
beta_PredUnpred 0.37 0.17 0.04 0.72 720.71 1.00 *
beta_AgeFive:Early.Latelate -0.22 0.09 -0.40 -0.03 1473.15 1.00 *
beta_AgeThree:Early.Latelate -0.13 0.10 -0.33 0.06 1670.51 1.00 -
beta_AgeFive:PredUnpred -0.24 0.23 -0.71 0.20 696.97 1.01 -
beta_AgeThree:PredUnpred -0.17 0.25 -0.66 0.33 692.89 1.01 -
beta_Early.Latelate:PredUnpred -0.08 0.09 -0.25 0.10 1761.82 1.00 -
beta_AgeFive:Early.Latelate:PredUnpred 0.28 0.13 0.04 0.53 1641.91 1.00 *
beta_AgeThree:Early.Latelate:PredUnpred 0.28 0.14 0.00 0.55 1924.61 1.00 -

2.2.1.2 Adults alone

expt2.adult.summary <- convert_stan_to_dataframe(expt2.model.adult)

formula(expt2.model.adult)
## rt ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.adult.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.48 0.02 0.44 0.51 273.62 1.00 *
sigma_Intercept -3.26 0.10 -3.47 -3.07 1412.72 1.00 *
beta_Intercept -2.78 0.15 -3.07 -2.49 793.26 1.00 *
Early.Latelate 0.03 0.01 0.02 0.05 863.82 1.01 *
PredUnpred 0.03 0.02 -0.01 0.07 296.23 1.01 -
Early.Latelate:PredUnpred -0.02 0.01 -0.04 -0.01 2586.51 1.00 *
sigma_Early.Latelate -0.01 0.08 -0.17 0.16 2570.25 1.00 -
sigma_PredUnpred -0.17 0.14 -0.45 0.12 1608.94 1.00 -
sigma_Early.Latelate:PredUnpred 0.16 0.12 -0.07 0.40 2792.21 1.00 -
beta_Early.Latelate 0.28 0.09 0.10 0.45 1961.24 1.00 *
beta_PredUnpred 0.40 0.20 -0.01 0.79 537.99 1.01 -
beta_Early.Latelate:PredUnpred -0.14 0.10 -0.33 0.06 2342.84 1.00 -

2.2.1.3 Fives alone

(divergent transitions, don’t trust this model)

expt2.five.summary <- convert_stan_to_dataframe(expt2.model.five)
## Warning: There were 1 divergent transitions after warmup. Increasing
## adapt_delta above 0.8 may help. See http://mc-stan.org/misc/
## warnings.html#divergent-transitions-after-warmup
formula(expt2.model.five)
## rt ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.five.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.40 0.02 0.36 0.43 1065.07 1.00 *
sigma_Intercept -3.74 0.24 -4.28 -3.33 1854.83 1.00 *
beta_Intercept -1.28 0.12 -1.53 -1.04 1315.85 1.00 *
Early.Latelate 0.12 0.01 0.10 0.14 2308.48 1.00 *
PredUnpred 0.04 0.02 -0.01 0.09 1125.86 1.01 -
Early.Latelate:PredUnpred -0.04 0.02 -0.07 -0.01 4140.09 1.00 *
sigma_Early.Latelate 0.53 0.27 0.01 1.05 1698.36 1.00 *
sigma_PredUnpred 0.76 0.28 0.25 1.34 1995.74 1.00 *
sigma_Early.Latelate:PredUnpred -0.19 0.32 -0.81 0.42 1965.59 1.00 -
beta_Early.Latelate 0.08 0.08 -0.08 0.24 3468.52 1.00 -
beta_PredUnpred 0.13 0.17 -0.20 0.47 1181.52 1.00 -
beta_Early.Latelate:PredUnpred 0.23 0.10 0.03 0.42 4367.18 1.00 *

2.2.1.4 Threes alone

(didn’t converge, don’t trust this model)

expt2.three.summary <- convert_stan_to_dataframe(expt2.model.three)
## Warning: The model has not converged (some Rhats are > 1.1). Do not analyse the results! 
## We recommend running more iterations and/or setting stronger priors.
## Warning: There were 4663 divergent transitions after warmup.
## Increasing adapt_delta above 0.8 may help. See http://mc-stan.org/misc/
## warnings.html#divergent-transitions-after-warmup
formula(expt2.model.three)
## rt ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.three.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.39 0.01 0.37 0.41 58.10 1.06 *
sigma_Intercept -4.26 0.72 -6.19 -3.34 19.32 1.11 *
beta_Intercept -1.26 0.10 -1.43 -1.05 36.63 1.10 *
Early.Latelate 0.12 0.01 0.09 0.14 9.08 1.31 *
PredUnpred 0.04 0.02 0.00 0.07 33.03 1.09 *
Early.Latelate:PredUnpred -0.02 0.02 -0.05 0.02 15.90 1.29 -
sigma_Early.Latelate 0.43 0.64 -0.43 2.33 16.88 1.17 -
sigma_PredUnpred -4.86 2.62 -10.07 -0.88 16.12 1.29 *
sigma_Early.Latelate:PredUnpred 5.21 2.63 1.16 10.32 15.91 1.31 *
beta_Early.Latelate 0.12 0.07 -0.02 0.28 63.27 1.04 -
beta_PredUnpred 0.25 0.14 -0.02 0.54 46.58 1.07 -
beta_Early.Latelate:PredUnpred 0.14 0.13 -0.08 0.37 10.26 1.22 -

2.2.2 Ex-Gaussian analysis of gross age comparisons with random slopes

2.2.2.1 Adults versus children

In this analysis, we compare Adults to children.

 z <- 1
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.grossage.summary <- convert_stan_to_dataframe(expt2.model.grossage)

formula(expt2.model.grossage)
## rt ~ 1 + Age * Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Age * Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Age * Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.grossage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.05 0.04 0.97 1.12 471.04 1.00 *
sigma_Intercept -2.41 0.11 -2.64 -2.20 1337.18 1.00 *
beta_Intercept -1.81 0.13 -2.08 -1.55 764.67 1.00 *
AgeChild -0.22 0.04 -0.30 -0.13 442.58 1.01 *
Early.Latelate 0.08 0.02 0.04 0.12 790.64 1.00 *
PredUnpred 0.07 0.05 -0.03 0.17 396.39 1.00 -
AgeChild:Early.Latelate 0.17 0.02 0.12 0.21 1617.45 1.00 *
AgeChild:PredUnpred 0.04 0.07 -0.08 0.17 397.75 1.01 -
Early.Latelate:PredUnpred -0.06 0.02 -0.10 -0.02 1232.13 1.00 *
AgeChild:Early.Latelate:PredUnpred -0.03 0.04 -0.10 0.04 1656.42 1.00 -
sigma_AgeChild -0.10 0.17 -0.43 0.22 1254.83 1.00 -
sigma_Early.Latelate 0.05 0.10 -0.15 0.25 1146.38 1.00 -
sigma_PredUnpred -0.12 0.16 -0.43 0.19 1177.87 1.00 -
sigma_AgeChild:Early.Latelate 0.30 0.17 -0.02 0.64 1645.61 1.00 -
sigma_AgeChild:PredUnpred 0.35 0.24 -0.11 0.81 1215.80 1.00 -
sigma_Early.Latelate:PredUnpred 0.06 0.14 -0.21 0.33 1724.56 1.00 -
sigma_AgeChild:Early.Latelate:PredUnpred 0.08 0.24 -0.39 0.54 1680.38 1.00 -
beta_AgeChild 1.45 0.16 1.14 1.76 510.30 1.00 *
beta_Early.Latelate 0.28 0.10 0.10 0.47 1284.13 1.00 *
beta_PredUnpred 0.37 0.18 0.03 0.73 737.59 1.00 *
beta_AgeChild:Early.Latelate -0.17 0.11 -0.38 0.04 1257.76 1.00 -
beta_AgeChild:PredUnpred -0.19 0.22 -0.62 0.25 683.19 1.01 -
beta_Early.Latelate:PredUnpred -0.07 0.12 -0.30 0.17 1409.65 1.00 -
beta_AgeChild:Early.Latelate:PredUnpred 0.25 0.15 -0.04 0.54 971.40 1.00 -

2.2.2.2 Adults alone

In this analysis, we analyze adults alone.

 z <- 1
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.adult.noage.summary <- convert_stan_to_dataframe(expt2.model.adult.noage)

formula(expt2.model.adult.noage)
## rt ~ 1 + Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.adult.noage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.05 0.05 0.95 1.13 432.41 1.01 *
sigma_Intercept -2.39 0.11 -2.62 -2.18 2019.10 1.00 *
beta_Intercept -1.87 0.16 -2.19 -1.55 800.22 1.00 *
Early.Latelate 0.08 0.02 0.04 0.12 1101.27 1.01 *
PredUnpred 0.07 0.06 -0.04 0.20 480.10 1.01 -
Early.Latelate:PredUnpred -0.06 0.02 -0.10 -0.02 1329.26 1.00 *
sigma_Early.Latelate 0.02 0.10 -0.17 0.23 2449.25 1.00 -
sigma_PredUnpred -0.13 0.16 -0.44 0.17 2142.22 1.00 -
sigma_Early.Latelate:PredUnpred 0.14 0.13 -0.13 0.40 2790.10 1.00 -
beta_Early.Latelate 0.29 0.10 0.10 0.49 2332.32 1.00 *
beta_PredUnpred 0.38 0.21 -0.04 0.79 656.37 1.00 -
beta_Early.Latelate:PredUnpred -0.13 0.11 -0.35 0.10 3143.56 1.00 -

2.2.2.3 Children alone

In this analysis, we analyze children alone.

 z <- 0
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.child.noage.summary <- convert_stan_to_dataframe(expt2.model.child.noage)

formula(expt2.model.child.noage)
## rt ~ 1 + Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 + Early.Late | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.child.noage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 0.83 0.03 0.78 0.89 634.76 1.01 *
sigma_Intercept -2.60 0.17 -2.96 -2.30 1488.74 1.00 *
beta_Intercept -0.34 0.09 -0.52 -0.16 961.51 1.00 *
Early.Latelate 0.31 0.03 0.26 0.37 1565.77 1.00 *
PredUnpred 0.10 0.04 0.03 0.17 952.79 1.01 *
Early.Latelate:PredUnpred -0.07 0.03 -0.14 0.00 2518.40 1.00 -
sigma_Early.Latelate 0.26 0.20 -0.11 0.66 1662.79 1.00 -
sigma_PredUnpred 0.24 0.20 -0.15 0.63 2343.14 1.00 -
sigma_Early.Latelate:PredUnpred 0.25 0.23 -0.20 0.71 2191.30 1.00 -
beta_Early.Latelate 0.10 0.07 -0.05 0.25 2175.33 1.00 -
beta_PredUnpred 0.20 0.12 -0.05 0.43 821.21 1.00 -
beta_Early.Latelate:PredUnpred 0.20 0.10 0.01 0.39 2291.21 1.00 *

2.2.3 Ex-Gaussian analysis of gross age comparisons without random slopes

2.2.3.1 Adults versus children

In this analysis, we compare Adults to children.

 z <- 0
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.grossage.summary <- convert_stan_to_dataframe(expt2.model.grossage)

formula(expt2.model.grossage)
## rt ~ 1 + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.grossage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 2.23 0.04 2.16 2.30 237.24 1.01 *
sigma_Intercept -2.38 0.14 -2.67 -2.12 468.22 1.00 *
beta_Intercept -1.84 0.13 -2.09 -1.59 347.63 1.02 *
AgeChild -0.21 0.04 -0.29 -0.13 259.39 1.01 *
Early.Latelate 0.07 0.02 0.04 0.11 298.60 1.00 *
PredUnpred 0.07 0.05 -0.02 0.16 192.38 1.02 -
AgeChild:Early.Latelate 0.16 0.02 0.13 0.20 1317.16 1.00 *
AgeChild:PredUnpred 0.05 0.06 -0.07 0.17 276.20 1.01 -
Early.Latelate:PredUnpred -0.06 0.01 -0.09 -0.04 967.33 1.00 *
AgeChild:Early.Latelate:PredUnpred -0.03 0.03 -0.08 0.03 1211.35 1.00 -
sigma_AgeChild 0.14 0.19 -0.22 0.52 503.19 1.01 -
sigma_Early.Latelate -0.04 0.09 -0.20 0.14 959.96 1.00 -
sigma_PredUnpred -0.18 0.20 -0.58 0.21 509.61 1.00 -
sigma_AgeChild:Early.Latelate 0.12 0.14 -0.17 0.40 983.68 1.01 -
sigma_AgeChild:PredUnpred 0.20 0.28 -0.36 0.73 539.08 1.01 -
sigma_Early.Latelate:PredUnpred 0.10 0.12 -0.14 0.35 877.56 1.00 -
sigma_AgeChild:Early.Latelate:PredUnpred 0.30 0.21 -0.09 0.71 929.59 1.00 -
beta_AgeChild 1.49 0.15 1.20 1.78 347.61 1.02 *
beta_Early.Latelate 0.29 0.07 0.15 0.44 1093.96 1.00 *
beta_PredUnpred 0.42 0.18 0.07 0.76 216.79 1.03 *
beta_AgeChild:Early.Latelate -0.18 0.08 -0.34 -0.03 912.73 1.00 *
beta_AgeChild:PredUnpred -0.26 0.21 -0.66 0.16 276.80 1.02 -
beta_Early.Latelate:PredUnpred -0.09 0.09 -0.26 0.09 820.22 1.00 -
beta_AgeChild:Early.Latelate:PredUnpred 0.27 0.11 0.05 0.48 829.33 1.00 *

2.2.3.2 Adults alone

In this analysis, we analyze adults alone.

 z <-0
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.adult.noage.summary <- convert_stan_to_dataframe(expt2.model.adult.noage)

formula(expt2.model.adult.noage)
## rt ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.adult.noage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 2.23 0.04 2.14 2.31 224.97 1.01 *
sigma_Intercept -2.31 0.11 -2.53 -2.11 1092.69 1.00 *
beta_Intercept -1.89 0.15 -2.17 -1.60 533.69 1.01 *
Early.Latelate 0.08 0.02 0.04 0.11 625.56 1.01 *
PredUnpred 0.07 0.06 -0.04 0.19 228.36 1.01 -
Early.Latelate:PredUnpred -0.06 0.01 -0.09 -0.04 2019.82 1.00 *
sigma_Early.Latelate -0.04 0.08 -0.20 0.11 1737.34 1.00 -
sigma_PredUnpred -0.22 0.15 -0.52 0.09 1015.35 1.00 -
sigma_Early.Latelate:PredUnpred 0.19 0.12 -0.03 0.44 1874.22 1.00 -
beta_Early.Latelate 0.29 0.09 0.12 0.47 1323.09 1.00 *
beta_PredUnpred 0.43 0.20 0.02 0.82 485.79 1.01 *
beta_Early.Latelate:PredUnpred -0.15 0.10 -0.34 0.05 2025.74 1.00 -

2.2.3.3 Children alone

In this analysis, we analyze children alone.

 z <- 1
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.child.noage.summary <- convert_stan_to_dataframe(expt2.model.child.noage)

formula(expt2.model.child.noage)
## rt ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.child.noage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 1.26 0.03 1.20 1.31 662.05 1.00 *
sigma_Intercept -2.44 0.16 -2.80 -2.14 1100.66 1.00 *
beta_Intercept -0.32 0.08 -0.49 -0.16 586.20 1.00 *
Early.Latelate 0.30 0.03 0.24 0.35 768.37 1.00 *
PredUnpred 0.11 0.04 0.04 0.18 657.39 1.00 *
Early.Latelate:PredUnpred -0.08 0.03 -0.13 -0.02 2098.62 1.00 *
sigma_Early.Latelate -0.07 0.17 -0.42 0.27 1536.13 1.00 -
sigma_PredUnpred 0.16 0.20 -0.22 0.57 1182.11 1.00 -
sigma_Early.Latelate:PredUnpred 0.38 0.22 -0.07 0.83 1311.24 1.00 -
beta_Early.Latelate 0.10 0.06 -0.02 0.22 1760.00 1.00 -
beta_PredUnpred 0.17 0.11 -0.05 0.39 658.29 1.01 -
beta_Early.Latelate:PredUnpred 0.20 0.08 0.06 0.35 3200.00 1.00 *

2.2.4 Ex-Gaussian analysis of gross age comparisons accounting for length

2.2.4.1 Adults versus children

In this analysis, we compare Adults to children.

 z <- 0
 convert_stan_to_dataframe <- function(stan_object){
   sum.df <- data.frame(summary(stan_object)$fixed)
   sum.df$Diff_from_zero <- ifelse((sum.df$l.95..CI * sum.df$u.95..CI) > 0, "*","-")
   return(sum.df)
 }


expt2.model.grossage.summary <- convert_stan_to_dataframe(expt2.model.grossage.length)

formula(expt2.model.grossage.length)
## rt ~ 1 + Length + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Length + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Length + Age * Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.grossage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 2.23 0.02 2.20 2.27 462.25 1.01 *
sigma_Intercept -2.28 0.07 -2.42 -2.14 955.28 1.00 *
beta_Intercept -0.84 0.05 -0.95 -0.73 604.45 1.01 *
LengthShort 0.01 0.01 -0.01 0.03 405.73 1.01 -
AgeChild -0.06 0.02 -0.09 -0.03 399.76 1.00 *
Early.Latelate 0.06 0.01 0.04 0.08 586.03 1.01 *
PredUnpred 0.03 0.02 0.00 0.06 402.67 1.01 *
AgeChild:Early.Latelate 0.04 0.00 0.03 0.04 3200.00 1.00 *
AgeChild:PredUnpred 0.01 0.02 -0.02 0.04 500.00 1.01 -
Early.Latelate:PredUnpred -0.02 0.00 -0.03 -0.01 3200.00 1.00 *
AgeChild:Early.Latelate:PredUnpred 0.00 0.00 -0.01 0.00 3200.00 1.00 -
sigma_LengthShort -0.06 0.03 -0.12 -0.01 3200.00 1.00 *
sigma_AgeChild 0.18 0.07 0.05 0.31 846.97 1.00 *
sigma_Early.Latelate 0.07 0.03 0.01 0.14 2960.48 1.00 *
sigma_PredUnpred 0.03 0.06 -0.09 0.16 1102.68 1.00 -
sigma_AgeChild:Early.Latelate 0.06 0.03 0.01 0.12 3200.00 1.00 *
sigma_AgeChild:PredUnpred 0.09 0.06 -0.03 0.21 1139.00 1.00 -
sigma_Early.Latelate:PredUnpred 0.06 0.03 0.01 0.11 3200.00 1.00 *
sigma_AgeChild:Early.Latelate:PredUnpred 0.04 0.03 -0.01 0.09 3200.00 1.00 -
beta_LengthShort 0.14 0.02 0.10 0.18 2236.93 1.00 *
beta_AgeChild 0.66 0.05 0.57 0.76 696.46 1.00 *
beta_Early.Latelate 0.11 0.02 0.07 0.15 2222.75 1.00 *
beta_PredUnpred 0.15 0.05 0.05 0.25 528.06 1.00 *
beta_AgeChild:Early.Latelate -0.01 0.01 -0.04 0.01 3200.00 1.00 -
beta_AgeChild:PredUnpred -0.02 0.05 -0.13 0.08 586.73 1.01 -
beta_Early.Latelate:PredUnpred 0.01 0.02 -0.02 0.04 3200.00 1.00 -
beta_AgeChild:Early.Latelate:PredUnpred 0.03 0.01 0.01 0.06 3200.00 1.00 *

2.2.4.2 Adults alone

In this analysis, we analyze adults alone.

 z <-0



expt2.model.adult.noage.summary <- convert_stan_to_dataframe(expt2.model.adult.noage.length)

formula(expt2.model.adult.noage.length)
## rt ~ 1 + Length + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Length + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Length + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.adult.noage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 2.29 0.03 2.23 2.35 240.49 1.01 *
sigma_Intercept -2.40 0.07 -2.55 -2.26 942.13 1.00 *
beta_Intercept -1.57 0.10 -1.77 -1.35 421.27 1.01 *
LengthShort 0.01 0.01 -0.01 0.02 394.92 1.00 -
Early.Latelate 0.02 0.01 0.01 0.04 454.86 1.01 *
PredUnpred 0.02 0.03 -0.03 0.08 197.28 1.01 -
Early.Latelate:PredUnpred -0.02 0.00 -0.02 -0.01 3200.00 1.00 *
sigma_LengthShort -0.08 0.03 -0.14 -0.02 3200.00 1.00 *
sigma_Early.Latelate 0.02 0.03 -0.04 0.09 2655.61 1.00 -
sigma_PredUnpred -0.05 0.07 -0.18 0.08 1110.48 1.00 -
sigma_Early.Latelate:PredUnpred 0.05 0.03 -0.01 0.11 3200.00 1.00 -
beta_LengthShort 0.15 0.03 0.09 0.22 1550.91 1.00 *
beta_Early.Latelate 0.11 0.03 0.05 0.18 1763.46 1.00 *
beta_PredUnpred 0.17 0.09 -0.01 0.35 491.99 1.00 -
beta_Early.Latelate:PredUnpred -0.04 0.02 -0.08 0.01 3200.00 1.00 -

2.2.4.3 Children alone

In this analysis, we analyze children alone. Note that we had to trim RTs < -500ms for convergence.

expt2.model.child.noage.summary <- convert_stan_to_dataframe(expt2.model.child.noage.length)

formula(expt2.model.child.noage.length)
## rt ~ 1 + Length + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms) 
## beta ~ 1 + Length + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
## sigma ~ 1 + Length + Early.Late * Pred + (1 | Subject) + (1 | CharacterLength.ms)
kable(expt2.model.child.noage.summary, digits = 2)
Estimate Est.Error l.95..CI u.95..CI Eff.Sample Rhat Diff_from_zero
Intercept 2.21 0.02 2.17 2.25 686.99 1.00 *
sigma_Intercept -2.23 0.09 -2.43 -2.06 1363.21 1.00 *
beta_Intercept -0.14 0.06 -0.26 -0.03 442.67 1.01 *
LengthShort 0.05 0.01 0.02 0.07 1002.92 1.00 *
Early.Latelate 0.13 0.01 0.11 0.16 1020.03 1.00 *
PredUnpred 0.03 0.02 0.00 0.06 614.94 1.00 -
Early.Latelate:PredUnpred -0.02 0.01 -0.03 -0.01 2387.45 1.00 *
sigma_LengthShort 0.04 0.06 -0.08 0.15 2329.24 1.00 -
sigma_Early.Latelate 0.16 0.06 0.05 0.28 1774.10 1.00 *
sigma_PredUnpred 0.16 0.07 0.02 0.30 2070.72 1.00 *
sigma_Early.Latelate:PredUnpred 0.06 0.05 -0.05 0.16 2173.95 1.00 -
beta_LengthShort 0.11 0.03 0.06 0.16 2082.92 1.00 *
beta_Early.Latelate 0.09 0.03 0.04 0.14 1976.10 1.00 *
beta_PredUnpred 0.14 0.06 0.03 0.25 354.05 1.01 *
beta_Early.Latelate:PredUnpred 0.05 0.02 0.02 0.09 3200.00 1.00 *