Main Regression (support for null!)
#first center trialNumber
triads_all$trialNumber = scale(triads_all$trialNumber,center=T,scale=F)
freq_m <- glmer(thematic_score ~ stimulus_type + (stimulus_type | subject) + (stimulus_type | trialID),
data=triads_all, family=binomial, glmerControl(optimizer="bobyqa"))
summary(freq_m) #no effects
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ stimulus_type + (stimulus_type | subject) +
## (stimulus_type | trialID)
## Data: triads_all
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6347.8 6401.2 -3165.9 6331.8 5872
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0289 -0.6353 0.2801 0.6017 5.8237
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4952 1.2228
## stimulus_typetriadText 0.8307 0.9114 -0.47
## subject (Intercept) 2.3907 1.5462
## stimulus_typetriadText 1.2172 1.1033 -0.74
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.5399 0.2337 2.310 0.0209 *
## stimulus_typetriadText -0.1672 0.1790 -0.934 0.3503
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## stmls_typtT -0.642
m <- brm(thematic_score ~ stimulus_type + (stimulus_type | subject) + (stimulus_type | trialID),
data=triads_all, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.001802 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 18.02 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 45.6643 seconds (Warm-up)
## Chain 1: 35.098 seconds (Sampling)
## Chain 1: 80.7623 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.001159 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 11.59 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 47.3887 seconds (Warm-up)
## Chain 2: 34.4378 seconds (Sampling)
## Chain 2: 81.8265 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.00204 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 20.4 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 42.6534 seconds (Warm-up)
## Chain 3: 34.339 seconds (Sampling)
## Chain 3: 76.9925 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.000869 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 8.69 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 42.5474 seconds (Warm-up)
## Chain 4: 33.209 seconds (Sampling)
## Chain 4: 75.7564 seconds (Total)
## Chain 4:
summary(m)
## Family: bernoulli
## Links: mu = logit
## Formula: thematic_score ~ stimulus_type + (stimulus_type | subject) + (stimulus_type | trialID)
## Data: triads_all (Number of observations: 5880)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Group-Level Effects:
## ~subject (Number of levels: 70)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.58 0.15 1.30 1.90 1.00
## sd(stimulus_typetriadText) 1.13 0.13 0.90 1.40 1.00
## cor(Intercept,stimulus_typetriadText) -0.71 0.08 -0.84 -0.54 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 897 1887
## sd(stimulus_typetriadText) 1580 2397
## cor(Intercept,stimulus_typetriadText) 1494 2096
##
## ~trialID (Number of levels: 84)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.25 0.12 1.04 1.50 1.00
## sd(stimulus_typetriadText) 0.94 0.11 0.74 1.17 1.00
## cor(Intercept,stimulus_typetriadText) -0.44 0.12 -0.65 -0.17 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1234 1924
## sd(stimulus_typetriadText) 1542 2217
## cor(Intercept,stimulus_typetriadText) 2246 2594
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept 0.53 0.24 0.08 1.01 1.01 672
## stimulus_typetriadText -0.17 0.18 -0.53 0.20 1.00 1168
## Tail_ESS
## Intercept 1301
## stimulus_typetriadText 1826
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
null_m <- brm(thematic_score ~ 1 + (stimulus_type | subject) + (stimulus_type | trialID),
data=triads_all, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.001841 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 18.41 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 43.2535 seconds (Warm-up)
## Chain 1: 35.2912 seconds (Sampling)
## Chain 1: 78.5447 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.000944 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 9.44 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 45.7694 seconds (Warm-up)
## Chain 2: 35.4574 seconds (Sampling)
## Chain 2: 81.2268 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.001802 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 18.02 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 43.6636 seconds (Warm-up)
## Chain 3: 34.4863 seconds (Sampling)
## Chain 3: 78.1499 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.002721 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 27.21 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 46.2773 seconds (Warm-up)
## Chain 4: 35.2256 seconds (Sampling)
## Chain 4: 81.5028 seconds (Total)
## Chain 4:
summary(null_m)
## Family: bernoulli
## Links: mu = logit
## Formula: thematic_score ~ 1 + (stimulus_type | subject) + (stimulus_type | trialID)
## Data: triads_all (Number of observations: 5880)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Group-Level Effects:
## ~subject (Number of levels: 70)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.56 0.15 1.29 1.89 1.00
## sd(stimulus_typetriadText) 1.12 0.12 0.90 1.38 1.00
## cor(Intercept,stimulus_typetriadText) -0.71 0.08 -0.85 -0.52 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1119 2255
## sd(stimulus_typetriadText) 1356 2280
## cor(Intercept,stimulus_typetriadText) 1711 2491
##
## ~trialID (Number of levels: 84)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.24 0.12 1.03 1.50 1.00
## sd(stimulus_typetriadText) 0.93 0.11 0.73 1.16 1.00
## cor(Intercept,stimulus_typetriadText) -0.43 0.12 -0.65 -0.18 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1609 2530
## sd(stimulus_typetriadText) 1589 2174
## cor(Intercept,stimulus_typetriadText) 2025 2544
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept 0.41 0.19 0.03 0.77 1.00 749 1616
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
BF_stim_type = bayes_factor(m, null_m)
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
BF_stim_type #Estimated Bayes factor in favor of m over null_m: 0.03202
## Estimated Bayes factor in favor of m over null_m: 0.22467
BF_stim_type_flip = bayes_factor(null_m, m) #checking that results input flips automatically...yes
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
BF_stim_type_flip #Estimated Bayes factor in favor of null_m over m: 3.07736 <-decent support for null!
## Estimated Bayes factor in favor of null_m over m: 18.00624
Condition means
cond_ms <- tibble(triads_all) %>% select(subject, stimulus_type, thematic_score) %>%
group_by(subject, stimulus_type) %>%
summarize(pct_theme = mean(thematic_score)) %>%
group_by(stimulus_type) %>%
summarize(pct_theme = mean(pct_theme))
## `summarise()` regrouping output by 'subject' (override with `.groups` argument)
## `summarise()` ungrouping output (override with `.groups` argument)
##Plot results by subject
sub_cond <- triads_all %>% group_by(subject, stimulus_type) %>%
summarise(pct_them = mean(thematic_score))
## `summarise()` regrouping output by 'subject' (override with `.groups` argument)
sub_cond %>% ggplot(aes(x=stimulus_type, y=pct_them, group=subject)) +
geom_line() + geom_point() +
theme_classic()
## Check for order effects
m1 <- glmer(thematic_score ~ stimulus_type * trialNumber + (stimulus_type | subject) + (stimulus_type | trialID),
data=triads_all, family=binomial, glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)))
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
## - Rescale variables?
summary(m1) #effect of trialNumber and interaction with stimulus_type. need to fix very large eigenvalue error?
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ stimulus_type * trialNumber + (stimulus_type |
## subject) + (stimulus_type | trialID)
## Data: triads_all
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 6347.3 6414.1 -3163.7 6327.3 5870
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0111 -0.6316 0.2774 0.6000 6.0030
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.5016 1.2254
## stimulus_typetriadText 0.8301 0.9111 -0.47
## subject (Intercept) 2.3887 1.5455
## stimulus_typetriadText 1.2211 1.1050 -0.74
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.544428 0.233821 2.328 0.0199 *
## stimulus_typetriadText -0.169364 0.179161 -0.945 0.3445
## trialNumber 0.003450 0.001679 2.055 0.0399 *
## stimulus_typetriadText:trialNumber -0.004859 0.002410 -2.017 0.0437 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) stml_T trlNmb
## stmls_typtT -0.644
## trialNumber 0.011 -0.011
## stmls_tyT:N -0.009 0.003 -0.810
## optimizer (bobyqa) convergence code: 0 (OK)
## Model is nearly unidentifiable: very large eigenvalue
## - Rescale variables?
##Plot results by order (1st vs 2nd half–a between subjects comparison)
bw_subs <- tibble(triads_all) %>% select(subject, pageNumber, thematic_score, stimulus_type) %>%
mutate(half=ifelse(pageNumber<5,"early","late")) %>% #split half by pageNumber
group_by(subject, stimulus_type, half) %>%
summarize(pct_theme = mean(thematic_score), #for each half
n = n())
## `summarise()` regrouping output by 'subject', 'stimulus_type' (override with `.groups` argument)
bw_subs %>% ggplot(aes(x=half, y=pct_theme, group=subject)) +
facet_wrap(.~stimulus_type) +
geom_line() + geom_point() +
theme_classic()
## geom_path: Each group consists of only one observation. Do you need to adjust
## the group aesthetic?
## geom_path: Each group consists of only one observation. Do you need to adjust
## the group aesthetic?

##Plot results by early (1st 18 triads vs the rest–a within subjects comparison, but where late includes both stim types)
first18 <- tibble(triads_all) %>% select(subject, pageNumber, thematic_score) %>%
mutate(trials=ifelse(pageNumber<3,"initial_18","the_rest")) %>% #split by pageNumber (early/late split cross-cuts conditions)
group_by(subject, trials) %>%
summarize(pct_theme = mean(thematic_score), #for each section
n = n())
## `summarise()` regrouping output by 'subject' (override with `.groups` argument)
first18 %>% ggplot(aes(x=trials, y=pct_theme, group=subject)) +
geom_line() + geom_point() +
theme_classic()

##EXPLORATORY DEMOGRAPHICS
demogs <- read_csv(here("data/anon_demogs.csv")) #US/IT toggle
##
## ── Column specification ────────────────────────────────────────────────────────
## cols(
## subject = col_character(),
## region_grewup = col_character(),
## coast_grewup = col_character(),
## abroadexp = col_character(),
## abroad_num_fct = col_character(),
## multilingual = col_character(),
## age = col_double(),
## gender = col_character(),
## race_white = col_logical(),
## education_fct = col_character(),
## ses = col_double()
## )
#demogs <- read_csv(here("data/anon_demogs_IT.csv")) #US/IT toggle
#first center age
demogs$age = scale(demogs$age,center=T,scale=F)
setequal(triads_all$subject,demogs$subject)
## [1] TRUE
data_demog <- left_join(triads_all, demogs)
## Joining, by = "subject"
#Regional (effects!)
data_demog$region_grewup = as.factor(data_demog$region_grewup)
data_demog$region_grewup = relevel(data_demog$region_grewup, "West") #set west as reference level
data_demog$coast_grewup = as.factor(data_demog$coast_grewup)
data_demog$coast_grewup = relevel(data_demog$coast_grewup, "WestCoast") #set west as reference coast
m_region <- glmer(thematic_score ~ region_grewup + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_region) #south sig more thematic than west (est 1.05); south most thematic > northeast > midwest > west
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ region_grewup + (stimulus_type | subject) +
## (stimulus_type | trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6341.5 6408.3 -3160.8 6321.5 5870
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0174 -0.6343 0.2800 0.5994 5.9463
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4968 1.223
## stimulus_typetriadText 0.8336 0.913 -0.47
## subject (Intercept) 2.3471 1.532
## stimulus_typetriadText 1.2368 1.112 -0.79
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2616 0.2880 -0.908 0.363770
## region_grewupMidwest 0.3785 0.4133 0.916 0.359764
## region_grewupNortheast 0.7254 0.3916 1.853 0.063933 .
## region_grewupSouth 1.0547 0.3166 3.332 0.000863 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) rgn_gM rgn_gN
## rgn_grwpMdw -0.571
## rgn_grwpNrt -0.620 0.432
## rgn_grwpSth -0.736 0.513 0.552
m_region <- glmer(thematic_score ~ coast_grewup + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_region) #east sig more thematic than west (est 1.04), trending west-inland diff; east > inland > west
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula:
## thematic_score ~ coast_grewup + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6343.6 6403.7 -3162.8 6325.6 5871
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0469 -0.6357 0.2800 0.6006 5.9804
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.5065 1.2274
## stimulus_typetriadText 0.8357 0.9142 -0.48
## subject (Intercept) 2.5753 1.6048
## stimulus_typetriadText 1.2519 1.1189 -0.80
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3396 0.3533 -0.961 0.33646
## coast_grewupEastCoast 1.0444 0.3837 2.722 0.00649 **
## coast_grewupInland 0.6780 0.3839 1.766 0.07737 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cst_EC
## cst_grwpEsC -0.813
## cst_grwpInl -0.810 0.749
#bayesian version
mb_region <- brm(thematic_score ~ region_grewup + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## recompiling to avoid crashing R session
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.001722 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 17.22 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 46.4064 seconds (Warm-up)
## Chain 1: 32.0065 seconds (Sampling)
## Chain 1: 78.4128 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.001388 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 13.88 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 45.957 seconds (Warm-up)
## Chain 2: 34.0221 seconds (Sampling)
## Chain 2: 79.9791 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.001096 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 10.96 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 47.498 seconds (Warm-up)
## Chain 3: 32.7589 seconds (Sampling)
## Chain 3: 80.2568 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.001299 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 12.99 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 43.4692 seconds (Warm-up)
## Chain 4: 28.2744 seconds (Sampling)
## Chain 4: 71.7436 seconds (Total)
## Chain 4:
summary(mb_region)
## Family: bernoulli
## Links: mu = logit
## Formula: thematic_score ~ region_grewup + (stimulus_type | subject) + (stimulus_type | trialID)
## Data: data_demog (Number of observations: 5880)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Group-Level Effects:
## ~subject (Number of levels: 70)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.57 0.16 1.28 1.92 1.00
## sd(stimulus_typetriadText) 1.13 0.13 0.91 1.41 1.00
## cor(Intercept,stimulus_typetriadText) -0.75 0.07 -0.87 -0.58 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 673 1400
## sd(stimulus_typetriadText) 1129 2109
## cor(Intercept,stimulus_typetriadText) 1206 2374
##
## ~trialID (Number of levels: 84)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.24 0.12 1.04 1.49 1.00
## sd(stimulus_typetriadText) 0.94 0.11 0.74 1.19 1.00
## cor(Intercept,stimulus_typetriadText) -0.44 0.12 -0.64 -0.18 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1058 2431
## sd(stimulus_typetriadText) 1093 1867
## cor(Intercept,stimulus_typetriadText) 1531 2199
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -0.24 0.30 -0.81 0.35 1.00 677
## region_grewupMidwest 0.36 0.45 -0.52 1.24 1.00 745
## region_grewupNortheast 0.71 0.42 -0.14 1.55 1.00 669
## region_grewupSouth 1.05 0.34 0.41 1.73 1.00 620
## Tail_ESS
## Intercept 1393
## region_grewupMidwest 1417
## region_grewupNortheast 1152
## region_grewupSouth 1484
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
mb_region_null <- brm(thematic_score ~ 1 + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## recompiling to avoid crashing R session
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.00148 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 14.8 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 39.551 seconds (Warm-up)
## Chain 1: 29.6107 seconds (Sampling)
## Chain 1: 69.1618 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.000814 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 8.14 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 38.0362 seconds (Warm-up)
## Chain 2: 29.4294 seconds (Sampling)
## Chain 2: 67.4656 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.00091 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 9.1 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 37.4045 seconds (Warm-up)
## Chain 3: 29.5966 seconds (Sampling)
## Chain 3: 67.0011 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '1d61a5087b725bca945e4771d3ebb308' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.000891 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 8.91 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 42.0391 seconds (Warm-up)
## Chain 4: 29.7053 seconds (Sampling)
## Chain 4: 71.7444 seconds (Total)
## Chain 4:
summary(mb_region_null)
## Family: bernoulli
## Links: mu = logit
## Formula: thematic_score ~ 1 + (stimulus_type | subject) + (stimulus_type | trialID)
## Data: data_demog (Number of observations: 5880)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Group-Level Effects:
## ~subject (Number of levels: 70)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.57 0.16 1.30 1.93 1.00
## sd(stimulus_typetriadText) 1.13 0.13 0.91 1.42 1.00
## cor(Intercept,stimulus_typetriadText) -0.71 0.08 -0.84 -0.53 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1097 1572
## sd(stimulus_typetriadText) 1383 2163
## cor(Intercept,stimulus_typetriadText) 1690 2430
##
## ~trialID (Number of levels: 84)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.25 0.12 1.04 1.51 1.00
## sd(stimulus_typetriadText) 0.94 0.11 0.74 1.17 1.00
## cor(Intercept,stimulus_typetriadText) -0.44 0.12 -0.65 -0.19 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1427 2138
## sd(stimulus_typetriadText) 1539 2533
## cor(Intercept,stimulus_typetriadText) 1757 3025
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept 0.41 0.19 0.04 0.77 1.00 792 1268
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
BF_region = bayes_factor(mb_region, mb_region_null)
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 62
## Iteration: 63
## Iteration: 64
## Iteration: 65
## Iteration: 66
## Iteration: 67
## Iteration: 68
## Iteration: 69
## Iteration: 70
## Iteration: 71
## Iteration: 72
## Iteration: 73
## Iteration: 74
## Iteration: 75
## Iteration: 76
## Iteration: 77
## Iteration: 78
## Iteration: 79
## Iteration: 80
## Iteration: 81
## Iteration: 82
## Iteration: 83
## Iteration: 84
## Iteration: 85
## Iteration: 86
## Iteration: 87
## Iteration: 88
## Iteration: 89
## Iteration: 90
## Iteration: 91
## Iteration: 92
## Iteration: 93
## Iteration: 94
## Iteration: 95
## Iteration: 96
## Iteration: 97
## Iteration: 98
## Iteration: 99
## Iteration: 100
## Iteration: 101
## Iteration: 102
## Iteration: 103
## Iteration: 104
## Iteration: 105
## Iteration: 106
## Iteration: 107
## Iteration: 108
## Iteration: 109
## Iteration: 110
## Iteration: 111
## Iteration: 112
## Iteration: 113
## Iteration: 114
## Iteration: 115
## Iteration: 116
## Iteration: 117
## Iteration: 118
## Iteration: 119
## Iteration: 120
## Iteration: 121
## Iteration: 122
## Iteration: 123
## Iteration: 124
## Iteration: 125
## Iteration: 126
## Iteration: 127
## Iteration: 128
## Iteration: 129
## Iteration: 130
## Iteration: 131
## Iteration: 132
## Iteration: 133
## Iteration: 134
## Iteration: 135
## Iteration: 136
## Iteration: 137
## Iteration: 138
## Iteration: 139
## Iteration: 140
## Iteration: 141
## Iteration: 142
## Iteration: 143
## Iteration: 144
## Iteration: 145
## Iteration: 146
## Iteration: 147
## Iteration: 148
## Iteration: 149
## Iteration: 150
## Iteration: 151
## Iteration: 152
## Iteration: 153
## Iteration: 154
## Iteration: 155
## Iteration: 156
## Iteration: 157
## Iteration: 158
## Iteration: 159
## Iteration: 160
## Iteration: 161
## Iteration: 162
## Iteration: 163
## Iteration: 164
## Iteration: 165
## Iteration: 166
## Iteration: 167
## Iteration: 168
## Iteration: 169
## Iteration: 170
## Iteration: 171
## Iteration: 172
## Iteration: 173
## Iteration: 174
## Iteration: 175
## Iteration: 176
## Iteration: 177
## Iteration: 178
## Iteration: 179
## Iteration: 180
## Iteration: 181
## Iteration: 182
## Iteration: 183
## Iteration: 184
## Iteration: 185
## Iteration: 186
## Iteration: 187
## Iteration: 188
## Iteration: 189
## Iteration: 190
## Iteration: 191
## Iteration: 192
## Iteration: 193
## Iteration: 194
## Iteration: 195
## Iteration: 196
## Iteration: 197
## Iteration: 198
## Iteration: 199
## Iteration: 200
## Iteration: 201
## Iteration: 202
## Iteration: 203
## Iteration: 204
## Iteration: 205
## Iteration: 206
## Iteration: 207
## Iteration: 208
## Iteration: 209
## Iteration: 210
## Iteration: 211
## Iteration: 212
## Iteration: 213
## Iteration: 214
## Iteration: 215
## Iteration: 216
## Iteration: 217
## Iteration: 218
## Iteration: 219
## Iteration: 220
## Iteration: 221
## Iteration: 222
## Iteration: 223
## Iteration: 224
## Iteration: 225
## Iteration: 226
## Iteration: 227
## Iteration: 228
## Iteration: 229
## Iteration: 230
## Iteration: 231
## Iteration: 232
## Iteration: 233
## Iteration: 234
## Iteration: 235
## Iteration: 236
## Iteration: 237
## Iteration: 238
## Iteration: 239
## Iteration: 240
## Iteration: 241
## Iteration: 242
## Iteration: 243
## Iteration: 244
## Iteration: 245
## Iteration: 246
## Iteration: 247
## Iteration: 248
## Iteration: 249
## Iteration: 250
## Iteration: 251
## Iteration: 252
## Iteration: 253
## Iteration: 254
## Iteration: 255
## Iteration: 256
## Iteration: 257
## Iteration: 258
## Iteration: 259
## Iteration: 260
## Iteration: 261
## Iteration: 262
## Iteration: 263
## Iteration: 264
## Iteration: 265
## Iteration: 266
## Iteration: 267
## Iteration: 268
## Iteration: 269
## Iteration: 270
## Iteration: 271
## Iteration: 272
## Iteration: 273
## Iteration: 274
## Iteration: 275
## Iteration: 276
## Iteration: 277
## Iteration: 278
## Iteration: 279
## Iteration: 280
## Iteration: 281
## Iteration: 282
## Iteration: 283
## Iteration: 284
## Iteration: 285
## Iteration: 286
## Iteration: 287
## Iteration: 288
## Iteration: 289
## Iteration: 290
## Iteration: 291
## Iteration: 292
## Iteration: 293
## Iteration: 294
## Iteration: 295
## Iteration: 296
## Iteration: 297
## Iteration: 298
## Iteration: 299
## Iteration: 300
## Iteration: 301
## Iteration: 302
## Iteration: 303
## Iteration: 304
## Iteration: 305
## Iteration: 306
## Iteration: 307
## Iteration: 308
## Iteration: 309
## Iteration: 310
## Iteration: 311
## Iteration: 312
## Iteration: 313
## Iteration: 314
## Iteration: 315
## Iteration: 316
## Iteration: 317
## Iteration: 318
## Iteration: 319
## Iteration: 320
## Iteration: 321
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 62
## Iteration: 63
## Iteration: 64
## Iteration: 65
## Iteration: 66
## Iteration: 67
## Iteration: 68
## Iteration: 69
## Iteration: 70
## Iteration: 71
## Iteration: 72
## Iteration: 73
## Iteration: 74
## Iteration: 75
## Iteration: 76
## Iteration: 77
## Iteration: 78
## Iteration: 79
## Iteration: 80
## Iteration: 81
## Iteration: 82
## Iteration: 83
## Iteration: 84
## Iteration: 85
## Iteration: 86
## Iteration: 87
## Iteration: 88
## Iteration: 89
## Iteration: 90
## Iteration: 91
## Iteration: 92
## Iteration: 93
## Iteration: 94
## Iteration: 95
## Iteration: 96
## Iteration: 97
## Iteration: 98
## Iteration: 99
## Iteration: 100
## Iteration: 101
## Iteration: 102
## Iteration: 103
## Iteration: 104
## Iteration: 105
## Iteration: 106
## Iteration: 107
## Iteration: 108
## Iteration: 109
## Iteration: 110
## Iteration: 111
## Iteration: 112
## Iteration: 113
## Iteration: 114
## Iteration: 115
## Iteration: 116
## Iteration: 117
## Iteration: 118
## Iteration: 119
## Iteration: 120
## Iteration: 121
## Iteration: 122
## Iteration: 123
## Iteration: 124
## Iteration: 125
## Iteration: 126
## Iteration: 127
## Iteration: 128
## Iteration: 129
## Iteration: 130
## Iteration: 131
## Iteration: 132
## Iteration: 133
## Iteration: 134
## Iteration: 135
## Iteration: 136
## Iteration: 137
## Iteration: 138
## Iteration: 139
## Iteration: 140
## Iteration: 141
## Iteration: 142
## Iteration: 143
## Iteration: 144
## Iteration: 145
## Iteration: 146
## Iteration: 147
## Iteration: 148
## Iteration: 149
## Iteration: 150
## Iteration: 151
## Iteration: 152
## Iteration: 153
## Iteration: 154
## Iteration: 155
## Iteration: 156
## Iteration: 157
## Iteration: 158
## Iteration: 159
## Iteration: 160
## Iteration: 161
## Iteration: 162
## Iteration: 163
## Iteration: 164
## Iteration: 165
## Iteration: 166
## Iteration: 167
## Iteration: 168
## Iteration: 169
## Iteration: 170
## Iteration: 171
## Iteration: 172
## Iteration: 173
## Iteration: 174
## Iteration: 175
## Iteration: 176
## Iteration: 177
## Iteration: 178
## Iteration: 179
## Iteration: 180
## Iteration: 181
## Iteration: 182
## Iteration: 183
## Iteration: 184
## Iteration: 185
## Iteration: 186
## Iteration: 187
## Iteration: 188
## Iteration: 189
## Iteration: 190
## Iteration: 191
## Iteration: 192
## Iteration: 193
## Iteration: 194
## Iteration: 195
## Iteration: 196
## Iteration: 197
## Iteration: 198
## Iteration: 199
## Iteration: 200
## Iteration: 201
## Iteration: 202
## Iteration: 203
## Iteration: 204
## Iteration: 205
## Iteration: 206
## Iteration: 207
## Iteration: 208
BF_region #Estimated Bayes factor in favor of mb_region over mb_region_null: 1.68470
## Estimated Bayes factor in favor of mb_region over mb_region_null: 503.86468
data_demog %>% group_by(subject, region_grewup) %>%
summarise(thematic = mean(thematic_score)) %>%
ggplot(aes(x=region_grewup, y=thematic)) +
geom_point() + theme_classic()
## `summarise()` regrouping output by 'subject' (override with `.groups` argument)

data_demog %>% group_by(subject, region_grewup) %>%
summarise(thematic = mean(thematic_score)) %>%
ggplot(aes(x=region_grewup, y=thematic)) +
geom_violin() + theme_classic()
## `summarise()` regrouping output by 'subject' (override with `.groups` argument)

#Culture exposure (no effects)
m_abroadexp <- glmer(thematic_score ~ abroadexp + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_abroadexp) #no sig effect, but exp abroad -> more taxonomic
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula:
## thematic_score ~ abroadexp + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6347.2 6400.7 -3165.6 6331.2 5872
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9912 -0.6359 0.2806 0.6016 5.8788
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4899 1.2206
## stimulus_typetriadText 0.8349 0.9137 -0.46
## subject (Intercept) 2.3703 1.5396
## stimulus_typetriadText 1.2301 1.1091 -0.74
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.4535 0.1847 2.456 0.0141 *
## abroadexpYes -0.5235 0.4343 -1.205 0.2280
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## abroadexpYs -0.240
travel_levels = c('0',
'1',
'2',
'3-5',
'6+')
data_demog$abroad_num_fct = factor(data_demog$abroad_num_fct, travel_levels)
m_abroad_num_fct <- glmer(thematic_score ~ abroad_num_fct + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_abroad_num_fct) #no effect, or linear relationship
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ abroad_num_fct + (stimulus_type | subject) +
## (stimulus_type | trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6352.5 6426.0 -3165.3 6330.5 5869
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9813 -0.6343 0.2810 0.6008 5.8603
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.489 1.2202
## stimulus_typetriadText 0.835 0.9138 -0.46
## subject (Intercept) 2.343 1.5308
## stimulus_typetriadText 1.229 1.1084 -0.74
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.24327 0.26821 0.907 0.364
## abroad_num_fct1 0.41822 0.37097 1.127 0.260
## abroad_num_fct2 0.31684 0.35688 0.888 0.375
## abroad_num_fct3-5 -0.03367 0.38584 -0.087 0.930
## abroad_num_fct6+ -0.04164 0.59753 -0.070 0.944
##
## Correlation of Fixed Effects:
## (Intr) abr__1 abr__2 a__3-5
## abrd_nm_fc1 -0.566
## abrd_nm_fc2 -0.599 0.423
## abrd_nm_3-5 -0.548 0.401 0.411
## abrd_nm_f6+ -0.363 0.244 0.277 0.242
m_multilingual <- glmer(thematic_score ~ multilingual + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_multilingual) #multilingual trending toward more taxonomic
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula:
## thematic_score ~ multilingual + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6345.2 6398.6 -3164.6 6329.2 5872
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0010 -0.6366 0.2799 0.6009 5.9021
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4929 1.2218
## stimulus_typetriadText 0.8364 0.9146 -0.47
## subject (Intercept) 2.3854 1.5445
## stimulus_typetriadText 1.2367 1.1121 -0.76
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.4988 0.1854 2.690 0.00714 **
## multilingualYes -0.6972 0.3678 -1.896 0.05797 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## multilnglYs -0.282
#Personal characteristics (gender effect replicates Talhelm et al 2015)
m_age <- glmer(thematic_score ~ age + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_age) #no effect
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ age + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6347.2 6400.7 -3165.6 6331.2 5872
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.0027 -0.6363 0.2809 0.6003 5.9180
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4943 1.2224
## stimulus_typetriadText 0.8356 0.9141 -0.47
## subject (Intercept) 2.4485 1.5648
## stimulus_typetriadText 1.2363 1.1119 -0.75
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.39703 0.17959 2.211 0.0271 *
## age 0.01389 0.01152 1.206 0.2279
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## age -0.013
data_demog$gender = as.factor(data_demog$gender)
data_demog$gender = relevel(data_demog$gender, "Female") #set female as reference level
m_gender <- glmer(thematic_score ~ gender + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_gender) #F sig more thematic than M
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula:
## thematic_score ~ gender + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6344.4 6404.5 -3163.2 6326.4 5871
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9895 -0.6360 0.2802 0.5999 5.9001
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4910 1.2211
## stimulus_typetriadText 0.8357 0.9142 -0.46
## subject (Intercept) 2.3136 1.5210
## stimulus_typetriadText 1.2320 1.1099 -0.76
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.7381 0.2341 3.153 0.00161 **
## genderDecline -1.9486 1.0874 -1.792 0.07313 .
## genderMale -0.5301 0.2615 -2.027 0.04269 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) gndrDc
## genderDecln -0.156
## genderMale -0.655 0.120
m_race <- glmer(thematic_score ~ race_white + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_race) #no effect
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula:
## thematic_score ~ race_white + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6347.2 6400.6 -3165.6 6331.2 5872
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9951 -0.6364 0.2802 0.6011 5.8853
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4909 1.2210
## stimulus_typetriadText 0.8352 0.9139 -0.46
## subject (Intercept) 2.3929 1.5469
## stimulus_typetriadText 1.2319 1.1099 -0.74
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.05735 0.33105 0.173 0.862
## race_whiteTRUE 0.41944 0.34032 1.232 0.218
##
## Correlation of Fixed Effects:
## (Intr)
## rac_whtTRUE -0.840
#SES (effect of subjective SES)
ed_levels = c('8th grade/junior high or less',
'Some high school',
'High school graduate',
'One or more years of college, no degree',
'Two-year college degree/vocational school',
"Four-/Five-year college Bachelor's degree",
'At least some graduate school')
data_demog$education_fct = factor(data_demog$education_fct, ed_levels)
m_ed <- glmer(thematic_score ~ education_fct + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_ed) #no effect, or linear relationship
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ education_fct + (stimulus_type | subject) +
## (stimulus_type | trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6352.0 6425.5 -3165.0 6330.0 5869
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9579 -0.6357 0.2813 0.6008 5.7962
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4789 1.2161
## stimulus_typetriadText 0.8345 0.9135 -0.46
## subject (Intercept) 2.1758 1.4751
## stimulus_typetriadText 1.2177 1.1035 -0.71
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error
## (Intercept) -0.09843 0.43976
## education_fctOne or more years of college, no degree 0.30315 0.64381
## education_fctTwo-year college degree/vocational school 0.41283 0.57192
## education_fctFour-/Five-year college Bachelor's degree 0.66618 0.46504
## education_fctAt least some graduate school 0.22174 0.61117
## z value Pr(>|z|)
## (Intercept) -0.224 0.823
## education_fctOne or more years of college, no degree 0.471 0.638
## education_fctTwo-year college degree/vocational school 0.722 0.470
## education_fctFour-/Five-year college Bachelor's degree 1.433 0.152
## education_fctAt least some graduate school 0.363 0.717
##
## Correlation of Fixed Effects:
## (Intr) eomyocnd e_Tcds e_FcBd
## e_Oomyoc,nd -0.630
## edct_T-cd/s -0.689 0.472
## e_F-/F-cB'd -0.891 0.605 0.642
## edctn_Alsgs -0.658 0.449 0.501 0.626
data_demog$ses = as.numeric(data_demog$ses)
m_ses <- glmer(thematic_score ~ ses + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(m_ses) #higher subj ses is more thematic (est 0.16) weird...interact with region?
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ ses + (stimulus_type | subject) + (stimulus_type |
## trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6342.9 6396.4 -3163.5 6326.9 5872
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9097 -0.6368 0.2817 0.6019 5.7337
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4718 1.2132
## stimulus_typetriadText 0.8363 0.9145 -0.45
## subject (Intercept) 2.0117 1.4183
## stimulus_typetriadText 1.2102 1.1001 -0.70
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.56473 0.43397 -1.301 0.1932
## ses 0.16515 0.06786 2.434 0.0149 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## ses -0.914
data_demog %>% group_by(subject, ses) %>%
summarise(thematic = mean(thematic_score)) %>%
ggplot(aes(x=jitter(ses), y=thematic)) +
geom_point() + theme_classic() +
geom_smooth(method="lm")
## `summarise()` regrouping output by 'subject' (override with `.groups` argument)
## `geom_smooth()` using formula 'y ~ x'

#Big regression
freq_big <- glmer(thematic_score ~ region_grewup * ses + gender + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=binomial, glmerControl(optimizer="bobyqa"))
summary(freq_big) #sig effects of region_grewupSouth and SES
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: thematic_score ~ region_grewup * ses + gender + (stimulus_type |
## subject) + (stimulus_type | trialID)
## Data: data_demog
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 6341.1 6447.9 -3154.5 6309.1 5864
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.9721 -0.6365 0.2801 0.6009 5.9048
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## trialID (Intercept) 1.4819 1.2173
## stimulus_typetriadText 0.8353 0.9139 -0.46
## subject (Intercept) 1.9443 1.3944
## stimulus_typetriadText 1.2223 1.1056 -0.78
## Number of obs: 5880, groups: trialID, 84; subject, 70
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.8415 0.9476 -1.943 0.0520 .
## region_grewupMidwest 1.8494 1.1925 1.551 0.1209
## region_grewupNortheast 1.8500 1.1571 1.599 0.1099
## region_grewupSouth 2.4785 1.0473 2.367 0.0180 *
## ses 0.2888 0.1367 2.112 0.0347 *
## genderDecline -1.7505 1.0575 -1.655 0.0979 .
## genderMale -0.2788 0.2740 -1.018 0.3089
## region_grewupMidwest:ses -0.2373 0.1972 -1.203 0.2290
## region_grewupNortheast:ses -0.1352 0.1998 -0.677 0.4987
## region_grewupSouth:ses -0.2395 0.1599 -1.498 0.1340
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) rgn_gM rgn_gN rgn_gS ses gndrDc gndrMl rgn_M: rgn_N:
## rgn_grwpMdw -0.532
## rgn_grwpNrt -0.665 0.445
## rgn_grwpSth -0.828 0.488 0.581
## ses -0.946 0.537 0.664 0.802
## genderDecln -0.070 0.001 -0.247 0.050 0.037
## genderMale -0.501 -0.032 0.142 0.347 0.381 0.184
## rgn_grwpMd: 0.453 -0.945 -0.388 -0.419 -0.511 0.006 0.063
## rgn_grwpNr: 0.598 -0.369 -0.944 -0.514 -0.645 0.216 -0.168 0.354
## rgn_grwpSt: 0.807 -0.463 -0.562 -0.960 -0.844 -0.046 -0.349 0.438 0.543
m_big <- brm(thematic_score ~ region_grewup * ses + gender + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## recompiling to avoid crashing R session
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.00121 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 12.1 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 128.054 seconds (Warm-up)
## Chain 1: 114.966 seconds (Sampling)
## Chain 1: 243.02 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.000999 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 9.99 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 131.635 seconds (Warm-up)
## Chain 2: 115.123 seconds (Sampling)
## Chain 2: 246.758 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.000815 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 8.15 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 130.869 seconds (Warm-up)
## Chain 3: 113.253 seconds (Sampling)
## Chain 3: 244.121 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.000861 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 8.61 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 117.122 seconds (Warm-up)
## Chain 4: 113.782 seconds (Sampling)
## Chain 4: 230.904 seconds (Total)
## Chain 4:
summary(m_big)
## Family: bernoulli
## Links: mu = logit
## Formula: thematic_score ~ region_grewup * ses + gender + (stimulus_type | subject) + (stimulus_type | trialID)
## Data: data_demog (Number of observations: 5880)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Group-Level Effects:
## ~subject (Number of levels: 70)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.46 0.16 1.18 1.82 1.00
## sd(stimulus_typetriadText) 1.13 0.12 0.90 1.39 1.00
## cor(Intercept,stimulus_typetriadText) -0.71 0.09 -0.85 -0.52 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 880 1718
## sd(stimulus_typetriadText) 1534 2331
## cor(Intercept,stimulus_typetriadText) 1182 2346
##
## ~trialID (Number of levels: 84)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.24 0.12 1.03 1.49 1.00
## sd(stimulus_typetriadText) 0.95 0.11 0.75 1.17 1.00
## cor(Intercept,stimulus_typetriadText) -0.43 0.12 -0.64 -0.19 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1194 2448
## sd(stimulus_typetriadText) 1681 2258
## cor(Intercept,stimulus_typetriadText) 1930 2744
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -2.05 1.10 -4.29 0.12 1.00 812
## region_grewupMidwest 1.95 1.38 -0.76 4.69 1.01 1160
## region_grewupNortheast 2.03 1.30 -0.39 4.78 1.00 873
## region_grewupSouth 2.62 1.20 0.36 5.08 1.00 925
## ses 0.32 0.16 0.01 0.64 1.00 837
## genderDecline -1.83 1.22 -4.23 0.61 1.00 2457
## genderMale -0.26 0.31 -0.88 0.34 1.00 711
## region_grewupMidwest:ses -0.25 0.23 -0.70 0.20 1.00 1289
## region_grewupNortheast:ses -0.16 0.22 -0.63 0.27 1.00 884
## region_grewupSouth:ses -0.26 0.18 -0.63 0.09 1.00 902
## Tail_ESS
## Intercept 1316
## region_grewupMidwest 1878
## region_grewupNortheast 1193
## region_grewupSouth 1336
## ses 1105
## genderDecline 2942
## genderMale 1719
## region_grewupMidwest:ses 1772
## region_grewupNortheast:ses 1431
## region_grewupSouth:ses 1539
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
#m_big without interaction for comparison to null models
m_big2 <- brm(thematic_score ~ region_grewup + ses + gender + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## recompiling to avoid crashing R session
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.001709 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 17.09 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 47.4729 seconds (Warm-up)
## Chain 1: 28.8542 seconds (Sampling)
## Chain 1: 76.3271 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.000896 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 8.96 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 46.9383 seconds (Warm-up)
## Chain 2: 28.4554 seconds (Sampling)
## Chain 2: 75.3936 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.00105 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 10.5 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 46.9649 seconds (Warm-up)
## Chain 3: 29.7916 seconds (Sampling)
## Chain 3: 76.7565 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.001078 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 10.78 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 47.8129 seconds (Warm-up)
## Chain 4: 29.4202 seconds (Sampling)
## Chain 4: 77.233 seconds (Total)
## Chain 4:
summary(m_big2)
## Family: bernoulli
## Links: mu = logit
## Formula: thematic_score ~ region_grewup + ses + gender + (stimulus_type | subject) + (stimulus_type | trialID)
## Data: data_demog (Number of observations: 5880)
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
## total post-warmup samples = 4000
##
## Group-Level Effects:
## ~subject (Number of levels: 70)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.48 0.15 1.22 1.82 1.01
## sd(stimulus_typetriadText) 1.13 0.12 0.91 1.39 1.01
## cor(Intercept,stimulus_typetriadText) -0.73 0.08 -0.86 -0.55 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 796 1564
## sd(stimulus_typetriadText) 1291 2476
## cor(Intercept,stimulus_typetriadText) 1163 1830
##
## ~trialID (Number of levels: 84)
## Estimate Est.Error l-95% CI u-95% CI Rhat
## sd(Intercept) 1.25 0.12 1.04 1.51 1.00
## sd(stimulus_typetriadText) 0.94 0.11 0.74 1.17 1.00
## cor(Intercept,stimulus_typetriadText) -0.43 0.12 -0.64 -0.18 1.00
## Bulk_ESS Tail_ESS
## sd(Intercept) 1179 2172
## sd(stimulus_typetriadText) 1269 2430
## cor(Intercept,stimulus_typetriadText) 1507 2302
##
## Population-Level Effects:
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -0.75 0.59 -1.93 0.34 1.01 760
## region_grewupMidwest 0.43 0.42 -0.37 1.27 1.00 874
## region_grewupNortheast 0.99 0.42 0.17 1.83 1.00 829
## region_grewupSouth 0.99 0.32 0.35 1.60 1.00 912
## ses 0.12 0.07 -0.01 0.26 1.00 768
## genderDecline -1.90 1.10 -4.03 0.29 1.00 1807
## genderMale -0.37 0.27 -0.88 0.17 1.00 746
## Tail_ESS
## Intercept 1320
## region_grewupMidwest 1395
## region_grewupNortheast 1325
## region_grewupSouth 1291
## ses 1566
## genderDecline 2118
## genderMale 1209
##
## Samples were drawn using sampling(NUTS). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
m_null_region <- brm(thematic_score ~ ses + gender + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## recompiling to avoid crashing R session
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.001285 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 12.85 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 43.9577 seconds (Warm-up)
## Chain 1: 28.0912 seconds (Sampling)
## Chain 1: 72.0489 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.000942 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 9.42 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 44.1302 seconds (Warm-up)
## Chain 2: 27.8429 seconds (Sampling)
## Chain 2: 71.9732 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.000719 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 7.19 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 90.7545 seconds (Warm-up)
## Chain 3: 27.647 seconds (Sampling)
## Chain 3: 118.401 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.000822 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 8.22 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 46.6787 seconds (Warm-up)
## Chain 4: 28.6832 seconds (Sampling)
## Chain 4: 75.3619 seconds (Total)
## Chain 4:
m_null_ses <- brm(thematic_score ~ region_grewup + age + gender + (stimulus_type | subject) + (stimulus_type | trialID),
data=data_demog, family=bernoulli(link='logit'), save_all_pars=TRUE)
## Warning: Argument 'save_all_pars' is deprecated. Please use argument 'all' in
## function 'save_pars()' instead.
## Compiling Stan program...
## recompiling to avoid crashing R session
## Trying to compile a simple C file
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:88:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:1: error: unknown type name 'namespace'
## namespace Eigen {
## ^
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:613:16: error: expected ';' after top level declarator
## namespace Eigen {
## ^
## ;
## In file included from <built-in>:1:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13:
## In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Dense:1:
## /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/Eigen/Core:96:10: fatal error: 'complex' file not found
## #include <complex>
## ^~~~~~~~~
## 3 errors generated.
## make: *** [foo.o] Error 1
## Start sampling
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 1).
## Chain 1:
## Chain 1: Gradient evaluation took 0.001395 seconds
## Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 13.95 seconds.
## Chain 1: Adjust your expectations accordingly!
## Chain 1:
## Chain 1:
## Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 1:
## Chain 1: Elapsed Time: 89.6303 seconds (Warm-up)
## Chain 1: 28.9287 seconds (Sampling)
## Chain 1: 118.559 seconds (Total)
## Chain 1:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 2).
## Chain 2:
## Chain 2: Gradient evaluation took 0.000936 seconds
## Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 9.36 seconds.
## Chain 2: Adjust your expectations accordingly!
## Chain 2:
## Chain 2:
## Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 2:
## Chain 2: Elapsed Time: 84.4092 seconds (Warm-up)
## Chain 2: 28.5164 seconds (Sampling)
## Chain 2: 112.926 seconds (Total)
## Chain 2:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 3).
## Chain 3:
## Chain 3: Gradient evaluation took 0.000807 seconds
## Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 8.07 seconds.
## Chain 3: Adjust your expectations accordingly!
## Chain 3:
## Chain 3:
## Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 3: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 3:
## Chain 3: Elapsed Time: 91.3001 seconds (Warm-up)
## Chain 3: 28.916 seconds (Sampling)
## Chain 3: 120.216 seconds (Total)
## Chain 3:
##
## SAMPLING FOR MODEL '654146656949dc6a05f1a0feeb023de5' NOW (CHAIN 4).
## Chain 4:
## Chain 4: Gradient evaluation took 0.000827 seconds
## Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 8.27 seconds.
## Chain 4: Adjust your expectations accordingly!
## Chain 4:
## Chain 4:
## Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup)
## Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup)
## Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup)
## Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup)
## Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup)
## Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup)
## Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling)
## Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling)
## Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling)
## Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling)
## Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling)
## Chain 4: Iteration: 2000 / 2000 [100%] (Sampling)
## Chain 4:
## Chain 4: Elapsed Time: 88.3374 seconds (Warm-up)
## Chain 4: 28.1184 seconds (Sampling)
## Chain 4: 116.456 seconds (Total)
## Chain 4:
#region BF comparison
BF_region = bayes_factor(m_null_region, m_big2)
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 62
## Iteration: 63
## Iteration: 64
## Iteration: 65
## Iteration: 66
## Iteration: 67
## Iteration: 68
## Iteration: 69
## Iteration: 70
## Iteration: 71
## Iteration: 72
## Iteration: 73
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 62
## Iteration: 63
## Iteration: 64
## Iteration: 65
## Iteration: 66
## Iteration: 67
## Iteration: 68
## Iteration: 69
## Iteration: 70
## Iteration: 71
## Iteration: 72
## Iteration: 73
## Iteration: 74
## Iteration: 75
## Iteration: 76
## Iteration: 77
## Iteration: 78
## Iteration: 79
## Iteration: 80
## Iteration: 81
## Iteration: 82
## Iteration: 83
## Iteration: 84
## Iteration: 85
## Iteration: 86
## Iteration: 87
## Iteration: 88
## Iteration: 89
## Iteration: 90
## Iteration: 91
## Iteration: 92
## Iteration: 93
## Iteration: 94
## Iteration: 95
## Iteration: 96
## Iteration: 97
## Iteration: 98
## Iteration: 99
## Iteration: 100
## Iteration: 101
## Iteration: 102
## Iteration: 103
## Iteration: 104
## Iteration: 105
## Iteration: 106
## Iteration: 107
## Iteration: 108
## Iteration: 109
## Iteration: 110
## Iteration: 111
## Iteration: 112
## Iteration: 113
## Iteration: 114
## Iteration: 115
## Iteration: 116
## Iteration: 117
## Iteration: 118
## Iteration: 119
## Iteration: 120
## Iteration: 121
## Iteration: 122
## Iteration: 123
## Iteration: 124
## Iteration: 125
## Iteration: 126
## Iteration: 127
## Iteration: 128
## Iteration: 129
## Iteration: 130
## Iteration: 131
## Iteration: 132
## Iteration: 133
## Iteration: 134
## Iteration: 135
## Iteration: 136
## Iteration: 137
## Iteration: 138
## Iteration: 139
## Iteration: 140
## Iteration: 141
## Iteration: 142
## Iteration: 143
## Iteration: 144
## Iteration: 145
## Iteration: 146
## Iteration: 147
## Iteration: 148
## Iteration: 149
## Iteration: 150
## Iteration: 151
## Iteration: 152
## Iteration: 153
## Iteration: 154
## Iteration: 155
## Iteration: 156
## Iteration: 157
## Iteration: 158
## Iteration: 159
## Iteration: 160
## Iteration: 161
## Iteration: 162
## Iteration: 163
## Iteration: 164
## Iteration: 165
## Iteration: 166
## Iteration: 167
## Iteration: 168
## Iteration: 169
## Iteration: 170
## Iteration: 171
## Iteration: 172
## Iteration: 173
## Iteration: 174
## Iteration: 175
## Iteration: 176
## Iteration: 177
## Iteration: 178
## Iteration: 179
## Iteration: 180
## Iteration: 181
## Iteration: 182
## Iteration: 183
## Iteration: 184
## Iteration: 185
## Iteration: 186
## Iteration: 187
## Iteration: 188
## Iteration: 189
## Iteration: 190
## Iteration: 191
## Iteration: 192
## Iteration: 193
## Iteration: 194
## Iteration: 195
## Iteration: 196
## Iteration: 197
## Iteration: 198
## Iteration: 199
## Iteration: 200
## Iteration: 201
## Iteration: 202
## Iteration: 203
## Iteration: 204
## Iteration: 205
## Iteration: 206
## Iteration: 207
## Iteration: 208
## Iteration: 209
## Iteration: 210
## Iteration: 211
## Iteration: 212
## Iteration: 213
## Iteration: 214
## Iteration: 215
## Iteration: 216
## Iteration: 217
## Iteration: 218
## Iteration: 219
## Iteration: 220
## Iteration: 221
## Iteration: 222
## Iteration: 223
## Iteration: 224
## Iteration: 225
## Iteration: 226
## Iteration: 227
## Iteration: 228
BF_region #Estimated Bayes factor in favor of m_big over m_null_region: 0.00122 #very diff from lmer results! is something wrong with model comparison?
## Estimated Bayes factor in favor of m_null_region over m_big2: 0.00781
#SES BF comparison
BF_ses = bayes_factor(m_big2, m_null_ses)
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 62
## Iteration: 63
## Iteration: 64
## Iteration: 65
## Iteration: 66
## Iteration: 67
## Iteration: 68
## Iteration: 69
## Iteration: 70
## Iteration: 71
## Iteration: 72
## Iteration: 73
## Iteration: 74
## Iteration: 75
## Iteration: 76
## Iteration: 77
## Iteration: 78
## Iteration: 79
## Iteration: 80
## Iteration: 81
## Iteration: 82
## Iteration: 83
## Iteration: 84
## Iteration: 85
## Iteration: 86
## Iteration: 87
## Iteration: 88
## Iteration: 89
## Iteration: 90
## Iteration: 91
## Iteration: 92
## Iteration: 93
## Iteration: 94
## Iteration: 95
## Iteration: 96
## Iteration: 97
## Iteration: 98
## Iteration: 99
## Iteration: 100
## Iteration: 101
## Iteration: 102
## Iteration: 103
## Iteration: 104
## Iteration: 105
## Iteration: 106
## Iteration: 107
## Iteration: 108
## Iteration: 109
## Iteration: 110
## Iteration: 111
## Iteration: 112
## Iteration: 113
## Iteration: 114
## Iteration: 115
## Iteration: 116
## Iteration: 117
## Iteration: 118
## Iteration: 119
## Iteration: 120
## Iteration: 121
## Iteration: 122
## Iteration: 123
## Iteration: 124
## Iteration: 125
## Iteration: 126
## Iteration: 127
## Iteration: 128
## Iteration: 129
## Iteration: 130
## Iteration: 131
## Iteration: 132
## Iteration: 133
## Iteration: 134
## Iteration: 135
## Iteration: 136
## Iteration: 137
## Iteration: 138
## Iteration: 139
## Iteration: 140
## Iteration: 141
## Iteration: 142
## Iteration: 143
## Iteration: 144
## Iteration: 145
## Iteration: 146
## Iteration: 147
## Iteration: 148
## Iteration: 149
## Iteration: 150
## Iteration: 151
## Iteration: 152
## Iteration: 153
## Iteration: 154
## Iteration: 155
## Iteration: 156
## Iteration: 157
## Iteration: 158
## Iteration: 159
## Iteration: 160
## Iteration: 161
## Iteration: 162
## Iteration: 163
## Iteration: 164
## Iteration: 165
## Iteration: 166
## Iteration: 167
## Iteration: 168
## Iteration: 169
## Iteration: 170
## Iteration: 171
## Iteration: 172
## Iteration: 173
## Iteration: 174
## Iteration: 175
## Iteration: 176
## Iteration: 177
## Iteration: 178
## Iteration: 179
## Iteration: 180
## Iteration: 181
## Iteration: 182
## Iteration: 183
## Iteration: 184
## Iteration: 185
## Iteration: 186
## Iteration: 187
## Iteration: 188
## Iteration: 189
## Iteration: 190
## Iteration: 191
## Iteration: 192
## Iteration: 193
## Iteration: 194
## Iteration: 195
## Iteration: 196
## Iteration: 197
## Iteration: 198
## Iteration: 199
## Iteration: 200
## Iteration: 201
## Iteration: 202
## Iteration: 203
## Iteration: 204
## Iteration: 205
## Iteration: 206
## Iteration: 207
## Iteration: 208
## Iteration: 209
## Iteration: 210
## Iteration: 211
## Iteration: 212
## Iteration: 213
## Iteration: 214
## Iteration: 215
## Iteration: 216
## Iteration: 217
## Iteration: 218
## Iteration: 219
## Iteration: 220
## Iteration: 221
## Iteration: 222
## Iteration: 223
## Iteration: 224
## Iteration: 225
## Iteration: 226
## Iteration: 227
## Iteration: 228
## Iteration: 229
## Iteration: 230
## Iteration: 231
## Iteration: 232
## Iteration: 233
## Iteration: 234
## Iteration: 235
## Iteration: 236
## Iteration: 237
## Iteration: 238
## Iteration: 239
## Iteration: 240
## Iteration: 241
## Iteration: 242
## Iteration: 243
## Iteration: 244
## Iteration: 245
## Iteration: 246
## Iteration: 247
## Iteration: 248
## Iteration: 249
## Iteration: 250
## Iteration: 251
## Iteration: 252
## Iteration: 253
## Iteration: 254
## Iteration: 255
## Iteration: 256
## Iteration: 257
## Iteration: 258
## Iteration: 259
## Iteration: 260
## Iteration: 261
## Iteration: 262
## Iteration: 263
## Iteration: 264
## Iteration: 265
## Iteration: 266
## Iteration: 267
## Iteration: 268
## Iteration: 269
## Iteration: 270
## Iteration: 271
## Iteration: 272
## Iteration: 273
## Iteration: 274
## Iteration: 275
## Iteration: 276
## Iteration: 277
## Iteration: 278
## Iteration: 279
## Iteration: 280
## Iteration: 281
## Iteration: 282
## Iteration: 283
## Iteration: 284
## Iteration: 285
## Iteration: 286
## Iteration: 287
## Iteration: 288
## Iteration: 289
## Iteration: 290
## Iteration: 291
## Iteration: 292
## Iteration: 293
## Iteration: 294
## Iteration: 295
## Iteration: 296
## Iteration: 297
## Iteration: 298
## Iteration: 299
## Iteration: 300
## Iteration: 301
## Iteration: 302
## Iteration: 303
## Iteration: 304
## Iteration: 305
## Iteration: 306
## Iteration: 307
## Iteration: 308
## Iteration: 309
## Iteration: 310
## Iteration: 311
## Iteration: 312
## Iteration: 313
## Iteration: 314
## Iteration: 315
## Iteration: 316
## Iteration: 317
## Iteration: 318
## Iteration: 319
## Iteration: 320
## Iteration: 321
## Iteration: 322
## Iteration: 323
## Iteration: 324
## Iteration: 325
## Iteration: 326
## Iteration: 327
## Iteration: 328
## Iteration: 329
## Iteration: 330
## Iteration: 331
## Iteration: 332
## Iteration: 333
## Iteration: 334
## Iteration: 335
## Iteration: 336
## Iteration: 337
## Iteration: 338
## Iteration: 339
## Iteration: 340
## Iteration: 341
## Iteration: 342
## Iteration: 343
## Iteration: 344
## Iteration: 345
## Iteration: 346
## Iteration: 347
## Iteration: 348
## Iteration: 349
## Iteration: 350
## Iteration: 351
## Iteration: 352
## Iteration: 353
## Iteration: 354
## Iteration: 355
## Iteration: 356
## Iteration: 357
## Iteration: 358
## Iteration: 359
## Iteration: 360
## Iteration: 361
## Iteration: 362
## Iteration: 363
## Iteration: 364
## Iteration: 365
## Iteration: 366
## Iteration: 367
## Iteration: 368
## Iteration: 369
## Iteration: 370
## Iteration: 371
## Iteration: 372
## Iteration: 373
## Iteration: 374
## Iteration: 375
## Iteration: 376
## Iteration: 377
## Iteration: 378
## Iteration: 379
## Iteration: 380
## Iteration: 381
## Iteration: 382
## Iteration: 383
## Iteration: 384
## Iteration: 385
## Iteration: 386
## Iteration: 387
## Iteration: 388
## Iteration: 389
## Iteration: 390
## Iteration: 391
## Iteration: 392
## Iteration: 393
## Iteration: 394
## Iteration: 395
## Iteration: 396
## Iteration: 397
## Iteration: 398
## Iteration: 399
## Iteration: 400
## Iteration: 401
## Iteration: 402
## Iteration: 403
## Iteration: 404
## Iteration: 405
## Iteration: 406
## Iteration: 407
## Iteration: 408
## Iteration: 409
## Iteration: 410
## Iteration: 411
## Iteration: 412
## Iteration: 413
## Iteration: 414
## Iteration: 415
## Iteration: 416
## Iteration: 417
## Iteration: 418
## Iteration: 419
## Iteration: 420
## Iteration: 421
## Iteration: 422
## Iteration: 423
## Iteration: 424
## Iteration: 425
## Iteration: 426
## Iteration: 427
## Iteration: 428
## Iteration: 429
## Iteration: 430
## Iteration: 431
## Iteration: 432
## Iteration: 433
## Iteration: 434
## Iteration: 435
## Iteration: 436
## Iteration: 437
## Iteration: 438
## Iteration: 439
## Iteration: 440
## Iteration: 441
## Iteration: 442
## Iteration: 443
## Iteration: 444
## Iteration: 445
## Iteration: 446
## Iteration: 447
## Iteration: 448
## Iteration: 449
## Iteration: 450
## Iteration: 451
## Iteration: 452
## Iteration: 453
## Iteration: 454
## Iteration: 455
## Iteration: 456
## Iteration: 457
## Iteration: 458
## Iteration: 459
## Iteration: 460
## Iteration: 461
## Iteration: 462
## Iteration: 463
## Iteration: 464
## Iteration: 465
## Iteration: 466
## Iteration: 467
## Iteration: 468
## Iteration: 469
## Iteration: 470
## Iteration: 471
## Iteration: 472
## Iteration: 473
## Iteration: 474
## Iteration: 475
## Iteration: 476
## Iteration: 477
## Iteration: 478
## Iteration: 479
## Iteration: 480
## Iteration: 481
## Iteration: 482
## Iteration: 483
## Iteration: 484
## Iteration: 485
## Iteration: 486
## Iteration: 487
## Iteration: 488
## Iteration: 489
## Iteration: 490
## Iteration: 491
## Iteration: 492
## Iteration: 493
## Iteration: 494
## Iteration: 495
## Iteration: 496
## Iteration: 497
## Iteration: 498
## Iteration: 499
## Iteration: 500
## Iteration: 501
## Iteration: 502
## Iteration: 503
## Iteration: 504
## Iteration: 505
## Iteration: 506
## Iteration: 507
## Iteration: 508
## Iteration: 509
## Iteration: 510
## Iteration: 511
## Iteration: 512
## Iteration: 513
## Iteration: 514
## Iteration: 515
## Iteration: 516
## Iteration: 517
## Iteration: 518
## Iteration: 519
## Iteration: 520
## Iteration: 521
## Iteration: 522
## Iteration: 523
## Iteration: 524
## Iteration: 525
## Iteration: 526
## Iteration: 527
## Iteration: 528
## Iteration: 529
## Iteration: 530
## Iteration: 531
## Iteration: 532
## Iteration: 533
## Iteration: 534
## Iteration: 535
## Iteration: 536
## Iteration: 537
## Iteration: 538
## Iteration: 539
## Iteration: 540
## Iteration: 541
## Iteration: 542
## Iteration: 543
## Iteration: 544
## Iteration: 545
## Iteration: 546
## Iteration: 547
## Iteration: 548
## Iteration: 549
## Iteration: 550
## Iteration: 551
## Iteration: 552
## Iteration: 553
## Iteration: 554
## Iteration: 555
## Iteration: 556
## Iteration: 557
## Iteration: 558
## Iteration: 559
## Iteration: 560
## Iteration: 561
## Iteration: 562
## Iteration: 563
## Iteration: 564
## Iteration: 565
## Iteration: 566
## Iteration: 567
## Iteration: 568
## Iteration: 569
## Iteration: 570
## Iteration: 571
## Iteration: 572
## Iteration: 573
## Iteration: 574
## Iteration: 575
## Iteration: 576
## Iteration: 577
## Iteration: 578
## Iteration: 579
## Iteration: 580
## Iteration: 581
## Iteration: 582
## Iteration: 583
## Iteration: 584
## Iteration: 585
## Iteration: 586
## Iteration: 587
## Iteration: 588
## Iteration: 589
## Iteration: 590
## Iteration: 591
## Iteration: 592
## Iteration: 593
## Iteration: 594
## Iteration: 595
## Iteration: 596
## Iteration: 597
## Iteration: 598
## Iteration: 599
## Iteration: 600
## Iteration: 601
## Iteration: 602
## Iteration: 603
## Iteration: 604
## Iteration: 605
## Iteration: 606
## Iteration: 607
## Iteration: 608
## Iteration: 609
## Iteration: 610
## Iteration: 611
## Iteration: 612
## Iteration: 613
## Iteration: 614
## Iteration: 615
## Iteration: 616
## Iteration: 617
## Iteration: 618
## Iteration: 619
## Iteration: 620
## Iteration: 621
## Iteration: 622
## Iteration: 623
## Iteration: 624
## Iteration: 625
## Iteration: 626
## Iteration: 627
## Iteration: 628
## Iteration: 629
## Iteration: 630
## Iteration: 631
## Iteration: 632
## Iteration: 633
## Iteration: 634
## Iteration: 635
## Iteration: 636
## Iteration: 637
## Iteration: 638
## Iteration: 639
## Iteration: 640
## Iteration: 641
## Iteration: 642
## Iteration: 643
## Iteration: 644
## Iteration: 645
## Iteration: 646
## Iteration: 647
## Iteration: 648
## Iteration: 649
## Iteration: 650
## Iteration: 651
## Iteration: 652
## Iteration: 653
## Iteration: 654
## Iteration: 655
## Iteration: 656
## Iteration: 657
## Iteration: 658
## Iteration: 659
## Iteration: 660
## Iteration: 661
## Iteration: 662
## Iteration: 663
## Iteration: 664
## Iteration: 665
## Iteration: 666
## Iteration: 667
## Iteration: 668
## Iteration: 669
## Iteration: 670
## Iteration: 671
## Iteration: 672
## Iteration: 673
## Iteration: 674
## Iteration: 675
## Iteration: 676
## Iteration: 677
## Iteration: 678
## Iteration: 679
## Iteration: 680
## Iteration: 681
## Iteration: 682
## Iteration: 683
## Iteration: 684
## Iteration: 685
## Iteration: 686
## Iteration: 687
## Iteration: 688
## Iteration: 689
## Iteration: 690
## Iteration: 691
## Iteration: 692
## Iteration: 693
## Iteration: 694
## Iteration: 695
## Iteration: 696
## Iteration: 697
## Iteration: 698
## Iteration: 699
## Iteration: 700
## Iteration: 701
## Iteration: 702
## Iteration: 703
## Iteration: 704
## Iteration: 705
## Iteration: 706
## Iteration: 707
## Iteration: 708
## Iteration: 709
## Iteration: 710
## Iteration: 711
## Iteration: 712
## Iteration: 713
## Iteration: 714
## Iteration: 715
## Iteration: 716
## Iteration: 717
## Iteration: 718
## Iteration: 719
## Iteration: 720
## Iteration: 721
## Iteration: 722
## Iteration: 723
## Iteration: 724
## Iteration: 725
## Iteration: 726
## Iteration: 727
## Iteration: 728
## Iteration: 729
## Iteration: 730
## Iteration: 731
## Iteration: 732
## Iteration: 733
## Iteration: 734
## Iteration: 735
## Iteration: 736
## Iteration: 737
## Iteration: 738
## Iteration: 739
## Iteration: 740
## Iteration: 741
## Iteration: 742
## Iteration: 743
## Iteration: 744
## Iteration: 745
## Iteration: 746
## Iteration: 747
## Iteration: 748
## Iteration: 749
## Iteration: 750
## Iteration: 751
## Iteration: 752
## Iteration: 753
## Iteration: 754
## Iteration: 755
## Iteration: 756
## Iteration: 757
## Iteration: 758
## Iteration: 759
## Iteration: 760
## Iteration: 761
## Iteration: 762
## Iteration: 763
## Iteration: 764
## Iteration: 765
## Iteration: 766
## Iteration: 767
## Iteration: 768
## Iteration: 769
## Iteration: 770
## Iteration: 771
## Iteration: 772
## Iteration: 773
## Iteration: 774
## Iteration: 775
## Iteration: 776
## Iteration: 777
## Iteration: 778
## Iteration: 779
## Iteration: 780
## Iteration: 781
## Iteration: 782
## Iteration: 783
## Iteration: 784
## Iteration: 785
## Iteration: 786
## Iteration: 787
## Iteration: 788
## Iteration: 789
## Iteration: 790
## Iteration: 791
## Iteration: 792
## Iteration: 793
## Iteration: 794
## Iteration: 795
## Iteration: 796
## Iteration: 797
## Iteration: 798
## Iteration: 799
## Iteration: 800
## Iteration: 801
## Iteration: 802
## Iteration: 803
## Iteration: 804
## Iteration: 805
## Iteration: 806
## Iteration: 807
## Iteration: 808
## Iteration: 809
## Iteration: 810
## Iteration: 811
## Iteration: 812
## Iteration: 813
## Iteration: 814
## Iteration: 815
## Iteration: 816
## Iteration: 817
## Iteration: 818
## Iteration: 819
## Iteration: 820
## Iteration: 821
## Iteration: 822
## Iteration: 823
## Iteration: 824
## Iteration: 825
## Iteration: 826
## Iteration: 827
## Iteration: 828
## Iteration: 829
## Iteration: 830
## Iteration: 831
## Iteration: 832
## Iteration: 833
## Iteration: 834
## Iteration: 835
## Iteration: 836
## Iteration: 837
## Iteration: 838
## Iteration: 839
## Iteration: 840
## Iteration: 841
## Iteration: 842
## Iteration: 843
## Iteration: 844
## Iteration: 845
## Iteration: 846
## Iteration: 847
## Iteration: 848
## Iteration: 849
## Iteration: 850
## Iteration: 851
## Iteration: 852
## Iteration: 853
## Iteration: 854
## Iteration: 855
## Iteration: 856
## Iteration: 857
## Iteration: 858
## Iteration: 859
## Iteration: 860
## Iteration: 861
## Iteration: 862
## Iteration: 863
## Iteration: 864
## Iteration: 865
## Iteration: 866
## Iteration: 867
## Iteration: 868
## Iteration: 869
## Iteration: 870
## Iteration: 871
## Iteration: 872
## Iteration: 873
## Iteration: 874
## Iteration: 875
## Iteration: 876
## Iteration: 877
## Iteration: 878
## Iteration: 879
## Iteration: 880
## Iteration: 881
## Iteration: 882
## Iteration: 883
## Iteration: 884
## Iteration: 885
## Iteration: 886
## Iteration: 887
## Iteration: 888
## Iteration: 889
## Iteration: 890
## Iteration: 891
## Iteration: 892
## Iteration: 893
## Iteration: 894
## Iteration: 895
## Iteration: 896
## Iteration: 897
## Iteration: 898
## Iteration: 899
## Iteration: 900
## Iteration: 901
## Iteration: 902
## Iteration: 903
## Iteration: 904
## Iteration: 905
## Iteration: 906
## Iteration: 907
## Iteration: 908
## Iteration: 909
## Iteration: 910
## Iteration: 911
## Iteration: 912
## Iteration: 913
## Iteration: 914
## Iteration: 915
## Iteration: 916
## Iteration: 917
## Iteration: 918
## Iteration: 919
## Iteration: 920
## Iteration: 921
## Iteration: 922
## Iteration: 923
## Iteration: 924
## Iteration: 925
## Iteration: 926
## Iteration: 927
## Iteration: 928
## Iteration: 929
## Iteration: 930
## Iteration: 931
## Iteration: 932
## Iteration: 933
## Iteration: 934
## Iteration: 935
## Iteration: 936
## Iteration: 937
## Iteration: 938
## Iteration: 939
## Iteration: 940
## Iteration: 941
## Iteration: 942
## Iteration: 943
## Iteration: 944
## Iteration: 945
## Iteration: 946
## Iteration: 947
## Iteration: 948
## Iteration: 949
## Iteration: 950
## Iteration: 951
## Iteration: 952
## Iteration: 953
## Iteration: 954
## Iteration: 955
## Iteration: 956
## Iteration: 957
## Iteration: 958
## Iteration: 959
## Iteration: 960
## Iteration: 961
## Iteration: 962
## Iteration: 963
## Iteration: 964
## Iteration: 965
## Iteration: 966
## Iteration: 967
## Iteration: 968
## Iteration: 969
## Iteration: 970
## Iteration: 971
## Iteration: 972
## Iteration: 973
## Iteration: 974
## Iteration: 975
## Iteration: 976
## Iteration: 977
## Iteration: 978
## Iteration: 979
## Iteration: 980
## Iteration: 981
## Iteration: 982
## Iteration: 983
## Iteration: 984
## Iteration: 985
## Iteration: 986
## Iteration: 987
## Iteration: 988
## Iteration: 989
## Iteration: 990
## Iteration: 991
## Iteration: 992
## Iteration: 993
## Iteration: 994
## Iteration: 995
## Iteration: 996
## Iteration: 997
## Iteration: 998
## Iteration: 999
## Iteration: 1000
## Warning: logml could not be estimated within maxiter, rerunning with adjusted starting value.
## Estimate might be more variable than usual.
## Iteration: 1
## Iteration: 1
## Iteration: 2
## Iteration: 3
## Iteration: 4
## Iteration: 5
## Iteration: 6
## Iteration: 7
## Iteration: 8
## Iteration: 9
## Iteration: 10
## Iteration: 11
## Iteration: 12
## Iteration: 13
## Iteration: 14
## Iteration: 15
## Iteration: 16
## Iteration: 17
## Iteration: 18
## Iteration: 19
## Iteration: 20
## Iteration: 21
## Iteration: 22
## Iteration: 23
## Iteration: 24
## Iteration: 25
## Iteration: 26
## Iteration: 27
## Iteration: 28
## Iteration: 29
## Iteration: 30
## Iteration: 31
## Iteration: 32
## Iteration: 33
## Iteration: 34
## Iteration: 35
## Iteration: 36
## Iteration: 37
## Iteration: 38
## Iteration: 39
## Iteration: 40
## Iteration: 41
## Iteration: 42
## Iteration: 43
## Iteration: 44
## Iteration: 45
## Iteration: 46
## Iteration: 47
## Iteration: 48
## Iteration: 49
## Iteration: 50
## Iteration: 51
## Iteration: 52
## Iteration: 53
## Iteration: 54
## Iteration: 55
## Iteration: 56
## Iteration: 57
## Iteration: 58
## Iteration: 59
## Iteration: 60
## Iteration: 61
## Iteration: 62
## Iteration: 63
## Iteration: 64
## Iteration: 65
## Iteration: 66
## Iteration: 67
## Iteration: 68
## Iteration: 69
## Iteration: 70
## Iteration: 71
## Iteration: 72
## Iteration: 73
## Iteration: 74
## Iteration: 75
## Iteration: 76
BF_ses #Estimated Bayes factor in favor of m_big over m_null_ses: 0.00021
## Estimated Bayes factor in favor of m_big2 over m_null_ses: 15.53204
##ICC
#long to wide
#df_icc <- triads_all %>% select(subject, trialID, thematic_score) %>%
# pivot_wider(names_from=subject, values_from=thematic_score)
#icc(df_icc %>% select(-trialID))