## `summarise()` regrouping output by 'partID', 'trial', 'pondnum', 'strategy' (override with `.groups` argument)
## `summarise()` regrouping output by 'partID', 'strategy', 'cue' (override with `.groups` argument)

1. Notes

The present document presents results for a frequentest logistic multilevel mixed effect model of the TSTM data (now say that three times fast). Please see document 20210527_tstm_modeling.Rmd for complete record of model construction and troubleshooting.

1.1. Analyses

Our primary question is whether or not individuals in different age groups (seven year olds, ten year olds, and adults) differ in the effect that the presence of a cue has on the rate at which they achieve adaptive coordination during the TSTM task. This is minimally the threeway interaction between id*cue*age_grp, but will also extend to the fourway interaction including strategy pending the importance of this predictor.

I.e. we are interested in the marginal effect of Age group on the effect of Cue Type on the slope of the trial number term for predicting the likelihood of adaptive coordination.

1.2 Model Specification

The present models are run according to the following model structure based on recommendations of Gelman & Hill (2006) and Raudenbush & Bryk (2002).

Note: A reasonable question for reviewers to ask is why we did not estimate a three-level model cluster trials within participant within age group. We should discuss this decision.

Level one model (trial level) for this approach is:

\[Pr (StrategyAdherence_{ij}=1) = logit^{-1}[\beta_{0j} + \beta_{1j}(Trial)_{ij} + \beta_{2j}(Strategy)_{ij} + \beta_{3j}(Cue)_{ij}+ \\ \beta_{4j}(Trial*Strategy)_{ij}+\beta_{5j}(Trial*Cue)_{ij}+\beta_{6j}(Strategy*Cue)_{ij} +\\ \beta_{7j}(Trial*Strategy*Cue)_{ij}]\]

Where the sampling function is \(Y_{ij}|\varphi_{ij} \sim Bernoulli(\varphi_{ij})\), with a probability mass function for the Bernoulli distribution being: \[P(y;\mu) = \binom{n}{yn}\mu^{yn}(1-\mu)^{(1-y)n}\]

Both predictors are two level factors (switch vs. maintain; cued vs. uncued).

Level two models (participant level) for this approach are:

\[\beta_{0j} = \gamma_{00} + \gamma_{01}(Age_j) + u_{0j} \] \[\beta_{1j} = \gamma_{10} + \gamma_{11}(Age_j)\] \[\beta_{2j} = \gamma_{20} + \gamma_{21}(Age_j)\] \[\beta_{3j} = \gamma_{30} + \gamma_{31}(Age_j)\] \[\beta_{4j} = \gamma_{40} + \gamma_{41}(Age_j)\] \[\beta_{5j} = \gamma_{50} + \gamma_{51}(Age_j)\] \[\beta_{6j} = \gamma_{60} + \gamma_{61}(Age_j)\]

Where \(u_{nj}\) ~ independent, \(N(0,\tau_{n0})\)

The age predictor is a three level factor.

I have selected a random intercept based on the nested nature of the data and fixed effects for all other predictors given (a) no a priori reason to make these random effects and (b) a desire to maintain some control over model complexity.

1.3 Analysis Plan

Results will be assessed using Type II Wald Chi Sqr test from the car::Anova function, evaluating the significance of each predictor to the model fit. Effects will further be interrogated through pairwise comparisons of age groups performance within various combinations of trial conditions using emmeans::emmeans function and the resulting z-test statistic.

Z tests of model predictors are included as produced by the jtools::summ function for the sake of completeness (this function allows for easy exponentiation of coefficents to aid in interpretation).

2. Model Builds

Before constructing the a priori model, we will first evaluate whether the use of a multilevel approach clustering trials within participants is justified based on the interclass correlation from the most basic multilevel model of our data (henceforth referred to as the Null Model).

After that, we will construct a simplified model excluding the strategy predictor to compare to our a priori model (henceforth referred to as the Reduced Model). If the inclusion of strategy does not improve model fit, we will be able to drop that predictor and use the Reduced Model.

Our experimental questions do not necessitate any other direct model comparisons.

2.1 Null Model

What is the variance accounted for by clustering of trial within participant?

mm0 <- lme4::glmer(bin ~ 1 + (1|partID), 
                   family = binomial(link = "logit"), 
                   control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=1000000)),
                   data = tstm_measures)
performance::icc(mm0)
## # Intraclass Correlation Coefficient
## 
##      Adjusted ICC: 0.272
##   Conditional ICC: 0.272

A substantial amount of variance in the data is accounted for by the clustering of trials within participants thereby justifying the use of a multilevel structure for this model.

2.2 Reduced Model

mm1 <- lme4::glmer(bin ~ id*cue*age_grp + (1|partID), 
                   family = binomial(link = "logit"), 
                   control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=1000000)),
                   data = tstm_measures)

2.3 Full Model

The full, a priori model, generated for comparison to the Reduced Model and Null Models.

mm2 <- lme4::glmer(bin ~ id*cue*strategy*age_grp + (1|partID), 
                   family = binomial(link = "logit"), 
                   control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=1000000)),
                   data = tstm_measures)

2.4 Comparison

anova(mm0, mm1, mm2)
## Data: tstm_measures
## Models:
## mm0: bin ~ 1 + (1 | partID)
## mm1: bin ~ id * cue * age_grp + (1 | partID)
## mm2: bin ~ id * cue * strategy * age_grp + (1 | partID)
##     npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)    
## mm0    2 3625.2 3637.2 -1810.6   3621.2                         
## mm1   13 2746.5 2824.5 -1360.2   2720.5 900.77 11  < 2.2e-16 ***
## mm2   25 2359.8 2509.8 -1154.9   2309.8 410.67 12  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Both the Reduced Model and Full Model are improvements on the Null Model.

anova(mm1, mm2)
## Data: tstm_measures
## Models:
## mm1: bin ~ id * cue * age_grp + (1 | partID)
## mm2: bin ~ id * cue * strategy * age_grp + (1 | partID)
##     npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)    
## mm1   13 2746.5 2824.5 -1360.2   2720.5                         
## mm2   25 2359.8 2509.8 -1154.9   2309.8 410.67 12  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The inclusion of strategy significantly improves model fit. Therefore we will continue with the a priori Full Model for all further analyses and interpretations.

3. Full Model

Structure of the full model.

mm2
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: bin ~ id * cue * strategy * age_grp + (1 | partID)
##    Data: tstm_measures
##       AIC       BIC    logLik  deviance  df.resid 
##  2359.811  2509.770 -1154.906  2309.811      2951 
## Random effects:
##  Groups Name        Std.Dev.
##  partID (Intercept) 1.325   
## Number of obs: 2976, groups:  partID, 93
## Fixed Effects:
##                                 (Intercept)  
##                                   -5.890306  
##                                          id  
##                                    0.453093  
##                                     cueTrue  
##                                    3.932217  
##                            strategymaintain  
##                                    2.679961  
##                              age_grpb. 10yo  
##                                    3.391402  
##                             age_grpc. Adult  
##                                    2.443277  
##                                  id:cueTrue  
##                                   -0.392841  
##                         id:strategymaintain  
##                                   -0.020231  
##                    cueTrue:strategymaintain  
##                                    0.157645  
##                           id:age_grpb. 10yo  
##                                   -0.027584  
##                          id:age_grpc. Adult  
##                                    0.208537  
##                      cueTrue:age_grpb. 10yo  
##                                   -0.342180  
##                     cueTrue:age_grpc. Adult  
##                                    0.681819  
##             strategymaintain:age_grpb. 10yo  
##                                   -5.111420  
##            strategymaintain:age_grpc. Adult  
##                                   -1.628162  
##                 id:cueTrue:strategymaintain  
##                                    0.115807  
##                   id:cueTrue:age_grpb. 10yo  
##                                   -0.003985  
##                  id:cueTrue:age_grpc. Adult  
##                                   -0.010042  
##          id:strategymaintain:age_grpb. 10yo  
##                                    0.620349  
##         id:strategymaintain:age_grpc. Adult  
##                                    0.278425  
##     cueTrue:strategymaintain:age_grpb. 10yo  
##                                    3.027542  
##    cueTrue:strategymaintain:age_grpc. Adult  
##                                    0.740609  
##  id:cueTrue:strategymaintain:age_grpb. 10yo  
##                                   -0.627965  
## id:cueTrue:strategymaintain:age_grpc. Adult  
##                                   -0.231259

3.1 Visualizations

3.1.1 Diagnostics

Note: Our primary goal is not a perfect model of these data, but rather to test specific questions about predictors within the model. Therefore my evaluation of model diagnostics will focus on big-picture problems indicating a severe failure of assumptions - as opposed to indications that this might not be the ideal model.

Test for overdispersion does not indicate a problem.

testDispersion(mm2)

## 
##  DHARMa nonparametric dispersion test via sd of residuals fitted vs.
##  simulated
## 
## data:  simulationOutput
## dispersion = 0.98633, p-value = 0.768
## alternative hypothesis: two.sided

QQ-Plots of residuals do not indicate any notable problems - however the fit seems disturbingly good, suggesting maybe these aren’t the right diagnostic tests for this type of model OR I’ve overfit the data. I may also be overthinking the issue.

#DHARMa diagnostics
simOutput <- simulateResiduals(mm2)
plot(simOutput)

#sjPlots diagnostics
plot_model(mm2, type = "diag")
## $partID
## `geom_smooth()` using formula 'y ~ x'

Below are the residuals of our data plots against the estimated linear function. In the absence of better documentation from sjPlots, my assumption is that these figures suggest non-linear effects of the Age Group and Trial Id predictors such that each are more quadratic in nature. No action taken at this time.

plot_model(mm2, type = "resid")
## Warning: Interaction terms are not supported by this plot type. Output for
## interaction terms may be inappropriate.
## `geom_smooth()` using formula 'y ~ x'
## `geom_smooth()` using formula 'y ~ x'
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : pseudoinverse used at 0.99
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : neighborhood radius 2.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : reciprocal condition number 8.35e-15
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : There are other near singularities as well. 4.0401
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : pseudoinverse used at 0.995
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : neighborhood radius 1.005
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : reciprocal condition number 1.4736e-29
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : There are other near singularities as well. 1.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : pseudoinverse used at 0.995
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : neighborhood radius 1.005
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : reciprocal condition number 9.4592e-29
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : There are other near singularities as well. 1.01

3.1.2 Predictors

Plot of the odd’s ratio of each predictor in the model. As will be reflected in the exponentiated transformation of predictor coefficients below, the odds ratios seem freakishly big for some predictors (e.g. Cue). There is also notable variability in estimations of these coefficients for several predictors, but not those of interest.

plot_model(mm2)

3.1.3 Main Effects

Plot main effects in model. Visual inspection suggests:

  • Probability of adaptive coordination increases with trial number.
  • Probability of adaptive coordination is greater in the presence of a cue.
  • Probability of adaptive coordination is greater for the maintain than the switch strategy condition.
  • Probability of adaptive coordination differs between age groups in an approximately linear fashion, such that Adults show a greater probability of adaptive coordination across trials and conditions than children in either child group.
plot_model(mm2, type = "eff")
## $id

## 
## $cue

## 
## $strategy

## 
## $age_grp

3.1.3 Interactions

The first plot of those produced by this command is most relevant for our main analysis question. sjPlot::plot_model is used b/c it makes things dramatically easier (right up until you need to change the actual ggplot object…).

plot_model(mm2, type = "pred", terms = c("age_grp","cue","strategy","id"))

## TableGrob (3 x 3) "arrange": 8 grobs
##   z     cells    name           grob
## 1 1 (1-1,1-1) arrange gtable[layout]
## 2 2 (1-1,2-2) arrange gtable[layout]
## 3 3 (1-1,3-3) arrange gtable[layout]
## 4 4 (2-2,1-1) arrange gtable[layout]
## 5 5 (2-2,2-2) arrange gtable[layout]
## 6 6 (2-2,3-3) arrange gtable[layout]
## 7 7 (3-3,1-1) arrange gtable[layout]
## 8 8 (3-3,2-2) arrange gtable[layout]
plot_model(mm2, type = "pred", terms = c("id", "cue","strategy", "age_grp"), axis.lim = c("Adaptive Coordination", "Trial Number within Block"))

## NULL
plot_model(mm2, type = "int")

## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]

## 
## [[6]]

## 
## [[7]]

## 
## [[8]]

## 
## [[9]]

## 
## [[10]]

## 
## [[11]]
## TableGrob (3 x 1) "arrange": 3 grobs
##   z     cells    name           grob
## 1 1 (1-1,1-1) arrange gtable[layout]
## 2 2 (2-2,1-1) arrange gtable[layout]
## 3 3 (3-3,1-1) arrange gtable[layout]
3.1.4 Random Effects

Plot random effects (i.e. random intercept). Note: estimate random effects then plot by age group.

plot_model(mm2, type = "re")

3.2 Significance Testing

3.2.1 Summary: z-test

Exponentiated estimates for ease of interpretation. WARNING - some of these odds ratios make absolutely no sense as was suggested in the initial plot of the odds ratios.

jtools::summ(mm2, exp = T)
Observations 2976
Dependent variable bin
Type Mixed effects generalized linear model
Family binomial
Link logit
AIC 2359.81
BIC 2509.77
Pseudo-R² (fixed effects) 0.56
Pseudo-R² (total) 0.71
Fixed Effects
exp(Est.) S.E. z val. p
(Intercept) 0.00 1.01 -5.83 0.00
id 1.57 0.15 2.94 0.00
cueTrue 51.02 1.05 3.74 0.00
strategymaintain 14.58 1.06 2.52 0.01
age_grpb. 10yo 29.71 1.11 3.07 0.00
age_grpc. Adult 11.51 1.12 2.18 0.03
id:cueTrue 0.68 0.17 -2.29 0.02
id:strategymaintain 0.98 0.17 -0.12 0.91
cueTrue:strategymaintain 1.17 1.19 0.13 0.89
id:age_grpb. 10yo 0.97 0.17 -0.16 0.87
id:age_grpc. Adult 1.23 0.18 1.19 0.23
cueTrue:age_grpb. 10yo 0.71 1.18 -0.29 0.77
cueTrue:age_grpc. Adult 1.98 1.21 0.56 0.57
strategymaintain:age_grpb. 10yo 0.01 1.26 -4.06 0.00
strategymaintain:age_grpc. Adult 0.20 1.21 -1.34 0.18
id:cueTrue:strategymaintain 1.12 0.20 0.57 0.57
id:cueTrue:age_grpb. 10yo 1.00 0.20 -0.02 0.98
id:cueTrue:age_grpc. Adult 0.99 0.21 -0.05 0.96
id:strategymaintain:age_grpb. 10yo 1.86 0.22 2.85 0.00
id:strategymaintain:age_grpc. Adult 1.32 0.22 1.27 0.20
cueTrue:strategymaintain:age_grpb. 10yo 20.65 1.49 2.04 0.04
cueTrue:strategymaintain:age_grpc. Adult 2.10 1.60 0.46 0.64
id:cueTrue:strategymaintain:age_grpb. 10yo 0.53 0.27 -2.32 0.02
id:cueTrue:strategymaintain:age_grpc. Adult 0.79 0.34 -0.67 0.50
Random Effects
Group Parameter Std. Dev.
partID (Intercept) 1.32
Grouping Variables
Group # groups ICC
partID 93 0.35
3.2.2 Summary: Chi Sqr
car::Anova(mm2)
## Analysis of Deviance Table (Type II Wald chisquare tests)
## 
## Response: bin
##                            Chisq Df Pr(>Chisq)    
## id                      156.7719  1  < 2.2e-16 ***
## cue                     357.8399  1  < 2.2e-16 ***
## strategy                197.5087  1  < 2.2e-16 ***
## age_grp                  64.3108  2  1.084e-14 ***
## id:cue                   64.9555  1  7.661e-16 ***
## id:strategy              12.7853  1  0.0003494 ***
## cue:strategy              9.1516  1  0.0024850 ** 
## id:age_grp               16.9921  2  0.0002043 ***
## cue:age_grp               7.7620  2  0.0206306 *  
## strategy:age_grp         60.3448  2  7.876e-14 ***
## id:cue:strategy           3.0932  1  0.0786221 .  
## id:cue:age_grp            6.1284  2  0.0466901 *  
## id:strategy:age_grp       3.0237  2  0.2205070    
## cue:strategy:age_grp      1.0093  2  0.6037142    
## id:cue:strategy:age_grp   5.5244  2  0.0631540 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
3.2.3 Pairwise

Pairwise comparison of cue.

emmeans::emmeans(mm2, pairwise ~ cue)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  cue   emmean    SE  df asymp.LCL asymp.UCL
##  False  -0.79 0.168 Inf     -1.12     -0.46
##  True    1.79 0.186 Inf      1.43      2.15
## 
## Results are averaged over the levels of: strategy, age_grp 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast     estimate    SE  df z.ratio p.value
##  False - True    -2.58 0.158 Inf -16.308 <.0001 
## 
## Results are averaged over the levels of: strategy, age_grp 
## Results are given on the log odds ratio (not the response) scale.

Pairwise comparison of strategy

emmeans::emmeans(mm2, pairwise ~ strategy)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  strategy emmean    SE  df asymp.LCL asymp.UCL
##   switch  -0.507 0.167 Inf    -0.834     -0.18
##  maintain  1.507 0.186 Inf     1.143      1.87
## 
## Results are averaged over the levels of: cue, age_grp 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast           estimate    SE  df z.ratio p.value
##   switch - maintain    -2.01 0.156 Inf -12.882 <.0001 
## 
## Results are averaged over the levels of: cue, age_grp 
## Results are given on the log odds ratio (not the response) scale.

Pairwise comparison of age groups against each other.

emmeans::emmeans(mm2, pairwise ~ age_grp)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  age_grp  emmean    SE  df asymp.LCL asymp.UCL
##  a. 7yo   -1.305 0.269 Inf    -1.833    -0.777
##  b. 10yo   0.673 0.260 Inf     0.163     1.182
##  c. Adult  2.132 0.294 Inf     1.556     2.709
## 
## Results are averaged over the levels of: cue, strategy 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast           estimate    SE  df z.ratio p.value
##  a. 7yo - b. 10yo      -1.98 0.374 Inf -5.283  <.0001 
##  a. 7yo - c. Adult     -3.44 0.400 Inf -8.592  <.0001 
##  b. 10yo - c. Adult    -1.46 0.392 Inf -3.721  0.0006 
## 
## Results are averaged over the levels of: cue, strategy 
## Results are given on the log odds ratio (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Pairwise comparison of age group by cue.

emmeans::emmeans(mm2, pairwise ~ age_grp*cue)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  age_grp  cue    emmean    SE  df asymp.LCL asymp.UCL
##  a. 7yo   False -2.5569 0.324 Inf    -3.192   -1.9218
##  b. 10yo  False -0.4496 0.273 Inf    -0.984    0.0846
##  c. Adult False  0.6371 0.274 Inf     0.101    1.1737
##  a. 7yo   True  -0.0531 0.268 Inf    -0.579    0.4723
##  b. 10yo  True   1.7950 0.282 Inf     1.242    2.3482
##  c. Adult True   3.6276 0.397 Inf     2.850    4.4054
## 
## Results are averaged over the levels of: strategy 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast                       estimate    SE  df z.ratio p.value
##  a. 7yo False - b. 10yo False     -2.107 0.423 Inf  -4.984 <.0001 
##  a. 7yo False - c. Adult False    -3.194 0.425 Inf  -7.517 <.0001 
##  a. 7yo False - a. 7yo True       -2.504 0.252 Inf  -9.939 <.0001 
##  a. 7yo False - b. 10yo True      -4.352 0.431 Inf -10.106 <.0001 
##  a. 7yo False - c. Adult True     -6.184 0.515 Inf -12.000 <.0001 
##  b. 10yo False - c. Adult False   -1.087 0.386 Inf  -2.812 0.0556 
##  b. 10yo False - a. 7yo True      -0.396 0.382 Inf  -1.037 0.9055 
##  b. 10yo False - b. 10yo True     -2.245 0.195 Inf -11.535 <.0001 
##  b. 10yo False - c. Adult True    -4.077 0.482 Inf  -8.456 <.0001 
##  c. Adult False - a. 7yo True      0.690 0.383 Inf   1.801 0.4648 
##  c. Adult False - b. 10yo True    -1.158 0.393 Inf  -2.946 0.0378 
##  c. Adult False - c. Adult True   -2.990 0.345 Inf  -8.674 <.0001 
##  a. 7yo True - b. 10yo True       -1.848 0.389 Inf  -4.747 <.0001 
##  a. 7yo True - c. Adult True      -3.681 0.479 Inf  -7.683 <.0001 
##  b. 10yo True - c. Adult True     -1.833 0.486 Inf  -3.772 0.0022 
## 
## Results are averaged over the levels of: strategy 
## Results are given on the log odds ratio (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 6 estimates

Pairwise comparison of age group by strategy.

emmeans::emmeans(mm2, pairwise ~ age_grp*strategy)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  age_grp  strategy emmean    SE  df asymp.LCL asymp.UCL
##  a. 7yo    switch  -2.769 0.326 Inf    -3.408    -2.130
##  b. 10yo   switch   0.318 0.268 Inf    -0.207     0.843
##  c. Adult  switch   0.931 0.271 Inf     0.400     1.461
##  a. 7yo   maintain  0.159 0.268 Inf    -0.366     0.685
##  b. 10yo  maintain  1.027 0.284 Inf     0.470     1.584
##  c. Adult maintain  3.334 0.397 Inf     2.556     4.112
## 
## Results are averaged over the levels of: cue 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast                             estimate    SE  df z.ratio p.value
##  a. 7yo  switch - b. 10yo  switch      -3.0872 0.422 Inf  -7.321 <.0001 
##  a. 7yo  switch - c. Adult  switch     -3.7000 0.425 Inf  -8.710 <.0001 
##  a. 7yo  switch - a. 7yo maintain      -2.9283 0.257 Inf -11.414 <.0001 
##  a. 7yo  switch - b. 10yo maintain     -3.7965 0.433 Inf  -8.770 <.0001 
##  a. 7yo  switch - c. Adult maintain    -6.1030 0.516 Inf -11.817 <.0001 
##  b. 10yo  switch - c. Adult  switch    -0.6128 0.381 Inf  -1.608 0.5931 
##  b. 10yo  switch - a. 7yo maintain      0.1589 0.379 Inf   0.419 0.9984 
##  b. 10yo  switch - b. 10yo maintain    -0.7093 0.188 Inf  -3.781 0.0022 
##  b. 10yo  switch - c. Adult maintain   -3.0158 0.479 Inf  -6.295 <.0001 
##  c. Adult  switch - a. 7yo maintain     0.7717 0.381 Inf   2.026 0.3276 
##  c. Adult  switch - b. 10yo maintain   -0.0965 0.392 Inf  -0.246 0.9999 
##  c. Adult  switch - c. Adult maintain  -2.4030 0.340 Inf  -7.066 <.0001 
##  a. 7yo maintain - b. 10yo maintain    -0.8682 0.391 Inf  -2.222 0.2274 
##  a. 7yo maintain - c. Adult maintain   -3.1747 0.479 Inf  -6.630 <.0001 
##  b. 10yo maintain - c. Adult maintain  -2.3065 0.488 Inf  -4.730 <.0001 
## 
## Results are averaged over the levels of: cue 
## Results are given on the log odds ratio (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 6 estimates

Pairwise comparison of age group by cue by strategy.

emmeans::emmeans(mm2, pairwise ~ age_grp*cue*strategy)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  age_grp  cue   strategy emmean    SE  df asymp.LCL asymp.UCL
##  a. 7yo   False  switch  -3.851 0.458 Inf    -4.749   -2.9535
##  b. 10yo  False  switch  -0.584 0.289 Inf    -1.151   -0.0174
##  c. Adult False  switch  -0.470 0.288 Inf    -1.034    0.0944
##  a. 7yo   True   switch  -1.687 0.301 Inf    -2.276   -1.0976
##  b. 10yo  True   switch   1.220 0.295 Inf     0.642    1.7981
##  c. Adult True   switch   2.331 0.322 Inf     1.700    2.9623
##  a. 7yo   False maintain -1.262 0.298 Inf    -1.846   -0.6786
##  b. 10yo  False maintain -0.315 0.309 Inf    -0.921    0.2914
##  c. Adult False maintain  1.744 0.331 Inf     1.096    2.3919
##  a. 7yo   True  maintain  1.581 0.300 Inf     0.992    2.1696
##  b. 10yo  True  maintain  2.370 0.334 Inf     1.715    3.0242
##  c. Adult True  maintain  4.924 0.629 Inf     3.691    6.1566
## 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast                                         estimate    SE  df z.ratio
##  a. 7yo False  switch - b. 10yo False  switch      -3.2673 0.541 Inf  -6.041
##  a. 7yo False  switch - c. Adult False  switch     -3.3817 0.540 Inf  -6.259
##  a. 7yo False  switch - a. 7yo True  switch        -2.1644 0.419 Inf  -5.163
##  a. 7yo False  switch - b. 10yo True  switch       -5.0716 0.545 Inf  -9.303
##  a. 7yo False  switch - c. Adult True  switch      -6.1828 0.563 Inf -10.987
##  a. 7yo False  switch - a. 7yo False maintain      -2.5889 0.421 Inf  -6.152
##  a. 7yo False  switch - b. 10yo False maintain     -3.5363 0.552 Inf  -6.403
##  a. 7yo False  switch - c. Adult False maintain    -5.5954 0.567 Inf  -9.869
##  a. 7yo False  switch - a. 7yo True maintain       -5.4321 0.446 Inf -12.191
##  a. 7yo False  switch - b. 10yo True maintain      -6.2211 0.568 Inf -10.946
##  a. 7yo False  switch - c. Adult True maintain     -8.7752 0.782 Inf -11.226
##  b. 10yo False  switch - c. Adult False  switch    -0.1144 0.408 Inf  -0.281
##  b. 10yo False  switch - a. 7yo True  switch        1.1028 0.417 Inf   2.648
##  b. 10yo False  switch - b. 10yo True  switch      -1.8043 0.232 Inf  -7.781
##  b. 10yo False  switch - c. Adult True  switch     -2.9155 0.433 Inf  -6.726
##  b. 10yo False  switch - a. 7yo False maintain      0.6784 0.415 Inf   1.636
##  b. 10yo False  switch - b. 10yo False maintain    -0.2691 0.248 Inf  -1.085
##  b. 10yo False  switch - c. Adult False maintain   -2.3281 0.440 Inf  -5.294
##  b. 10yo False  switch - a. 7yo True maintain      -2.1649 0.417 Inf  -5.186
##  b. 10yo False  switch - b. 10yo True maintain     -2.9539 0.284 Inf -10.415
##  b. 10yo False  switch - c. Adult True maintain    -5.5079 0.693 Inf  -7.947
##  c. Adult False  switch - a. 7yo True  switch       1.2173 0.416 Inf   2.928
##  c. Adult False  switch - b. 10yo True  switch     -1.6899 0.412 Inf  -4.100
##  c. Adult False  switch - c. Adult True  switch    -2.8011 0.282 Inf  -9.922
##  c. Adult False  switch - a. 7yo False maintain     0.7928 0.414 Inf   1.916
##  c. Adult False  switch - b. 10yo False maintain   -0.1547 0.422 Inf  -0.366
##  c. Adult False  switch - c. Adult False maintain  -2.2137 0.291 Inf  -7.616
##  c. Adult False  switch - a. 7yo True maintain     -2.0504 0.416 Inf  -4.923
##  c. Adult False  switch - b. 10yo True maintain    -2.8394 0.441 Inf  -6.437
##  c. Adult False  switch - c. Adult True maintain   -5.3935 0.612 Inf  -8.807
##  a. 7yo True  switch - b. 10yo True  switch        -2.9072 0.421 Inf  -6.899
##  a. 7yo True  switch - c. Adult True  switch       -4.0183 0.443 Inf  -9.080
##  a. 7yo True  switch - a. 7yo False maintain       -0.4245 0.245 Inf  -1.733
##  a. 7yo True  switch - b. 10yo False maintain      -1.3719 0.431 Inf  -3.182
##  a. 7yo True  switch - c. Adult False maintain     -3.4309 0.448 Inf  -7.653
##  a. 7yo True  switch - a. 7yo True maintain        -3.2677 0.272 Inf -12.019
##  a. 7yo True  switch - b. 10yo True maintain       -4.0567 0.450 Inf  -9.008
##  a. 7yo True  switch - c. Adult True maintain      -6.6107 0.699 Inf  -9.452
##  b. 10yo True  switch - c. Adult True  switch      -1.1112 0.436 Inf  -2.547
##  b. 10yo True  switch - a. 7yo False maintain       2.4827 0.419 Inf   5.920
##  b. 10yo True  switch - b. 10yo False maintain      1.5352 0.256 Inf   5.991
##  b. 10yo True  switch - c. Adult False maintain    -0.5238 0.443 Inf  -1.183
##  b. 10yo True  switch - a. 7yo True maintain       -0.3605 0.421 Inf  -0.857
##  b. 10yo True  switch - b. 10yo True maintain      -1.1496 0.280 Inf  -4.111
##  b. 10yo True  switch - c. Adult True maintain     -3.7036 0.694 Inf  -5.334
##  c. Adult True  switch - a. 7yo False maintain      3.5938 0.440 Inf   8.164
##  c. Adult True  switch - b. 10yo False maintain     2.6464 0.447 Inf   5.921
##  c. Adult True  switch - c. Adult False maintain    0.5874 0.307 Inf   1.916
##  c. Adult True  switch - a. 7yo True maintain       0.7506 0.439 Inf   1.711
##  c. Adult True  switch - b. 10yo True maintain     -0.0384 0.462 Inf  -0.083
##  c. Adult True  switch - c. Adult True maintain    -2.5924 0.607 Inf  -4.269
##  a. 7yo False maintain - b. 10yo False maintain    -0.9474 0.429 Inf  -2.207
##  a. 7yo False maintain - c. Adult False maintain   -3.0064 0.446 Inf  -6.739
##  a. 7yo False maintain - a. 7yo True maintain      -2.8432 0.266 Inf -10.704
##  a. 7yo False maintain - b. 10yo True maintain     -3.6322 0.448 Inf  -8.103
##  a. 7yo False maintain - c. Adult True maintain    -6.1862 0.698 Inf  -8.866
##  b. 10yo False maintain - c. Adult False maintain  -2.0590 0.453 Inf  -4.544
##  b. 10yo False maintain - a. 7yo True maintain     -1.8958 0.432 Inf  -4.393
##  b. 10yo False maintain - b. 10yo True maintain    -2.6848 0.302 Inf  -8.885
##  b. 10yo False maintain - c. Adult True maintain   -5.2388 0.701 Inf  -7.468
##  c. Adult False maintain - a. 7yo True maintain     0.1632 0.446 Inf   0.366
##  c. Adult False maintain - b. 10yo True maintain   -0.6258 0.469 Inf  -1.335
##  c. Adult False maintain - c. Adult True maintain  -3.1798 0.616 Inf  -5.159
##  a. 7yo True maintain - b. 10yo True maintain      -0.7890 0.448 Inf  -1.760
##  a. 7yo True maintain - c. Adult True maintain     -3.3430 0.695 Inf  -4.808
##  b. 10yo True maintain - c. Adult True maintain    -2.5540 0.711 Inf  -3.594
##  p.value
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  1.0000 
##  0.2531 
##  <.0001 
##  <.0001 
##  0.8960 
##  0.9953 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  0.1310 
##  0.0024 
##  <.0001 
##  0.7497 
##  1.0000 
##  <.0001 
##  0.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  0.8532 
##  0.0648 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  0.3103 
##  <.0001 
##  <.0001 
##  0.9903 
##  0.9995 
##  0.0023 
##  <.0001 
##  <.0001 
##  <.0001 
##  0.7496 
##  0.8635 
##  1.0000 
##  0.0012 
##  0.5443 
##  <.0001 
##  <.0001 
##  <.0001 
##  <.0001 
##  0.0003 
##  0.0007 
##  <.0001 
##  <.0001 
##  1.0000 
##  0.9747 
##  <.0001 
##  0.8397 
##  0.0001 
##  0.0170 
## 
## Results are given on the log odds ratio (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 12 estimates

Trends by Trial Number

emmeans::emtrends(mm2, pairwise ~ cue, var = "id")
## NOTE: Results may be misleading due to involvement in interactions
## $emtrends
##  cue   id.trend     SE  df asymp.LCL asymp.UCL
##  False    0.653 0.0445 Inf    0.5658     0.740
##  True     0.170 0.0490 Inf    0.0743     0.266
## 
## Results are averaged over the levels of: strategy, age_grp 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast     estimate     SE  df z.ratio p.value
##  False - True    0.483 0.0657 Inf 7.352   <.0001 
## 
## Results are averaged over the levels of: strategy, age_grp
emmeans::emtrends(mm2, pairwise ~ strategy, var = "id")
## NOTE: Results may be misleading due to involvement in interactions
## $emtrends
##  strategy id.trend     SE  df asymp.LCL asymp.UCL
##   switch     0.315 0.0393 Inf     0.238     0.392
##  maintain    0.509 0.0528 Inf     0.405     0.612
## 
## Results are averaged over the levels of: cue, age_grp 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast           estimate     SE  df z.ratio p.value
##   switch - maintain   -0.194 0.0649 Inf -2.988  0.0028 
## 
## Results are averaged over the levels of: cue, age_grp

Pairwise comparison of age groups trends across trial ID.

emmeans::emtrends(mm2, pairwise ~ age_grp, var = "id")
## NOTE: Results may be misleading due to involvement in interactions
## $emtrends
##  age_grp  id.trend     SE  df asymp.LCL asymp.UCL
##  a. 7yo      0.276 0.0513 Inf     0.175     0.376
##  b. 10yo     0.399 0.0460 Inf     0.309     0.489
##  c. Adult    0.560 0.0719 Inf     0.420     0.701
## 
## Results are averaged over the levels of: cue, strategy 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast           estimate     SE  df z.ratio p.value
##  a. 7yo - b. 10yo     -0.124 0.0687 Inf -1.798  0.1701 
##  a. 7yo - c. Adult    -0.285 0.0880 Inf -3.237  0.0035 
##  b. 10yo - c. Adult   -0.161 0.0850 Inf -1.898  0.1393 
## 
## Results are averaged over the levels of: cue, strategy 
## P value adjustment: tukey method for comparing a family of 3 estimates
emmeans::emtrends(mm2, pairwise ~ age_grp*cue, var = "id")
## NOTE: Results may be misleading due to involvement in interactions
## $emtrends
##  age_grp  cue   id.trend     SE  df asymp.LCL asymp.UCL
##  a. 7yo   False   0.4430 0.0870 Inf   0.27241     0.614
##  b. 10yo  False   0.7256 0.0689 Inf   0.59054     0.861
##  c. Adult False   0.7907 0.0724 Inf   0.64885     0.933
##  a. 7yo   True    0.1080 0.0538 Inf   0.00257     0.214
##  b. 10yo  True    0.0727 0.0603 Inf  -0.04550     0.191
##  c. Adult True    0.3301 0.1227 Inf   0.08967     0.571
## 
## Results are averaged over the levels of: strategy 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast                       estimate     SE  df z.ratio p.value
##  a. 7yo False - b. 10yo False    -0.2826 0.1108 Inf -2.551  0.1096 
##  a. 7yo False - c. Adult False   -0.3477 0.1127 Inf -3.085  0.0249 
##  a. 7yo False - a. 7yo True       0.3349 0.1020 Inf  3.284  0.0131 
##  a. 7yo False - b. 10yo True      0.3703 0.1058 Inf  3.499  0.0062 
##  a. 7yo False - c. Adult True     0.1129 0.1503 Inf  0.751  0.9754 
##  b. 10yo False - c. Adult False  -0.0652 0.0992 Inf -0.657  0.9865 
##  b. 10yo False - a. 7yo True      0.6175 0.0873 Inf  7.073  <.0001 
##  b. 10yo False - b. 10yo True     0.6529 0.0912 Inf  7.161  <.0001 
##  b. 10yo False - c. Adult True    0.3954 0.1406 Inf  2.813  0.0554 
##  c. Adult False - a. 7yo True     0.6827 0.0900 Inf  7.589  <.0001 
##  c. Adult False - b. 10yo True    0.7181 0.0941 Inf  7.633  <.0001 
##  c. Adult False - c. Adult True   0.4606 0.1412 Inf  3.263  0.0141 
##  a. 7yo True - b. 10yo True       0.0354 0.0808 Inf  0.438  0.9980 
##  a. 7yo True - c. Adult True     -0.2221 0.1339 Inf -1.658  0.5596 
##  b. 10yo True - c. Adult True    -0.2575 0.1367 Inf -1.884  0.4121 
## 
## Results are averaged over the levels of: strategy 
## P value adjustment: tukey method for comparing a family of 6 estimates
emmeans::emtrends(mm2, pairwise ~ age_grp*strategy, var = "id")
## NOTE: Results may be misleading due to involvement in interactions
## $emtrends
##  age_grp  strategy id.trend     SE  df asymp.LCL asymp.UCL
##  a. 7yo    switch     0.257 0.0859 Inf    0.0883     0.425
##  b. 10yo   switch     0.227 0.0511 Inf    0.1268     0.327
##  c. Adult  switch     0.460 0.0620 Inf    0.3387     0.582
##  a. 7yo   maintain    0.294 0.0552 Inf    0.1861     0.403
##  b. 10yo  maintain    0.571 0.0753 Inf    0.4235     0.719
##  c. Adult maintain    0.661 0.1274 Inf    0.4110     0.910
## 
## Results are averaged over the levels of: cue 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast                             estimate     SE  df z.ratio p.value
##  a. 7yo  switch - b. 10yo  switch       0.0296 0.0999 Inf  0.296  0.9997 
##  a. 7yo  switch - c. Adult  switch     -0.2035 0.1058 Inf -1.924  0.3872 
##  a. 7yo  switch - a. 7yo maintain      -0.0377 0.1016 Inf -0.371  0.9991 
##  a. 7yo  switch - b. 10yo maintain     -0.3145 0.1141 Inf -2.755  0.0650 
##  a. 7yo  switch - c. Adult maintain    -0.4040 0.1535 Inf -2.632  0.0896 
##  b. 10yo  switch - c. Adult  switch    -0.2331 0.0802 Inf -2.905  0.0427 
##  b. 10yo  switch - a. 7yo maintain     -0.0672 0.0752 Inf -0.894  0.9480 
##  b. 10yo  switch - b. 10yo maintain    -0.3440 0.0902 Inf -3.814  0.0019 
##  b. 10yo  switch - c. Adult maintain   -0.4336 0.1371 Inf -3.161  0.0196 
##  c. Adult  switch - a. 7yo maintain     0.1658 0.0827 Inf  2.006  0.3389 
##  c. Adult  switch - b. 10yo maintain   -0.1109 0.0972 Inf -1.141  0.8641 
##  c. Adult  switch - c. Adult maintain  -0.2005 0.1395 Inf -1.437  0.7046 
##  a. 7yo maintain - b. 10yo maintain    -0.2768 0.0932 Inf -2.970  0.0353 
##  a. 7yo maintain - c. Adult maintain   -0.3663 0.1386 Inf -2.643  0.0871 
##  b. 10yo maintain - c. Adult maintain  -0.0895 0.1477 Inf -0.606  0.9906 
## 
## Results are averaged over the levels of: cue 
## P value adjustment: tukey method for comparing a family of 6 estimates

Pairwise comparison of age groups trends across trial ID.

emmeans::emtrends(mm2, pairwise ~ age_grp*cue*strategy, var = "id")
## $emtrends
##  age_grp  cue   strategy id.trend     SE  df asymp.LCL asymp.UCL
##  a. 7yo   False  switch    0.4531 0.1540 Inf   0.15121     0.755
##  b. 10yo  False  switch    0.4255 0.0727 Inf   0.28297     0.568
##  c. Adult False  switch    0.6616 0.0838 Inf   0.49729     0.826
##  a. 7yo   True   switch    0.0603 0.0756 Inf  -0.08788     0.208
##  b. 10yo  True   switch    0.0287 0.0718 Inf  -0.11213     0.169
##  c. Adult True   switch    0.2587 0.0899 Inf   0.08263     0.435
##  a. 7yo   False maintain   0.4329 0.0790 Inf   0.27811     0.588
##  b. 10yo  False maintain   1.0256 0.1147 Inf   0.80085     1.250
##  c. Adult False maintain   0.9198 0.1118 Inf   0.70076     1.139
##  a. 7yo   True  maintain   0.1558 0.0766 Inf   0.00577     0.306
##  b. 10yo  True  maintain   0.1166 0.0968 Inf  -0.07308     0.306
##  c. Adult True  maintain   0.4015 0.2278 Inf  -0.04501     0.848
## 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast                                         estimate    SE  df z.ratio
##  a. 7yo False  switch - b. 10yo False  switch      0.02758 0.170 Inf  0.162 
##  a. 7yo False  switch - c. Adult False  switch    -0.20854 0.175 Inf -1.191 
##  a. 7yo False  switch - a. 7yo True  switch        0.39284 0.171 Inf  2.292 
##  a. 7yo False  switch - b. 10yo True  switch       0.42441 0.170 Inf  2.497 
##  a. 7yo False  switch - c. Adult True  switch      0.19435 0.178 Inf  1.090 
##  a. 7yo False  switch - a. 7yo False maintain      0.02023 0.172 Inf  0.118 
##  a. 7yo False  switch - b. 10yo False maintain    -0.57253 0.192 Inf -2.984 
##  a. 7yo False  switch - c. Adult False maintain   -0.46673 0.190 Inf -2.456 
##  a. 7yo False  switch - a. 7yo True maintain       0.29727 0.172 Inf  1.729 
##  a. 7yo False  switch - b. 10yo True maintain      0.33645 0.182 Inf  1.850 
##  a. 7yo False  switch - c. Adult True maintain     0.05160 0.275 Inf  0.188 
##  b. 10yo False  switch - c. Adult False  switch   -0.23612 0.111 Inf -2.133 
##  b. 10yo False  switch - a. 7yo True  switch       0.36526 0.105 Inf  3.483 
##  b. 10yo False  switch - b. 10yo True  switch      0.39683 0.102 Inf  3.884 
##  b. 10yo False  switch - c. Adult True  switch     0.16676 0.116 Inf  1.444 
##  b. 10yo False  switch - a. 7yo False maintain    -0.00735 0.107 Inf -0.069 
##  b. 10yo False  switch - b. 10yo False maintain   -0.60012 0.134 Inf -4.486 
##  b. 10yo False  switch - c. Adult False maintain  -0.49432 0.133 Inf -3.716 
##  b. 10yo False  switch - a. 7yo True maintain      0.26968 0.106 Inf  2.556 
##  b. 10yo False  switch - b. 10yo True maintain     0.30887 0.121 Inf  2.555 
##  b. 10yo False  switch - c. Adult True maintain    0.02402 0.239 Inf  0.100 
##  c. Adult False  switch - a. 7yo True  switch      0.60138 0.113 Inf  5.331 
##  c. Adult False  switch - b. 10yo True  switch     0.63295 0.110 Inf  5.733 
##  c. Adult False  switch - c. Adult True  switch    0.40288 0.122 Inf  3.308 
##  c. Adult False  switch - a. 7yo False maintain    0.22877 0.115 Inf  1.995 
##  c. Adult False  switch - b. 10yo False maintain  -0.36400 0.141 Inf -2.574 
##  c. Adult False  switch - c. Adult False maintain -0.25819 0.134 Inf -1.920 
##  c. Adult False  switch - a. 7yo True maintain     0.50580 0.113 Inf  4.465 
##  c. Adult False  switch - b. 10yo True maintain    0.54499 0.128 Inf  4.261 
##  c. Adult False  switch - c. Adult True maintain   0.26014 0.242 Inf  1.073 
##  a. 7yo True  switch - b. 10yo True  switch        0.03157 0.104 Inf  0.303 
##  a. 7yo True  switch - c. Adult True  switch      -0.19850 0.117 Inf -1.691 
##  a. 7yo True  switch - a. 7yo False maintain      -0.37261 0.109 Inf -3.418 
##  a. 7yo True  switch - b. 10yo False maintain     -0.96538 0.137 Inf -7.031 
##  a. 7yo True  switch - c. Adult False maintain    -0.85957 0.135 Inf -6.374 
##  a. 7yo True  switch - a. 7yo True maintain       -0.09558 0.108 Inf -0.889 
##  a. 7yo True  switch - b. 10yo True maintain      -0.05639 0.123 Inf -0.459 
##  a. 7yo True  switch - c. Adult True maintain     -0.34124 0.240 Inf -1.422 
##  b. 10yo True  switch - c. Adult True  switch     -0.23007 0.115 Inf -2.000 
##  b. 10yo True  switch - a. 7yo False maintain     -0.40418 0.107 Inf -3.787 
##  b. 10yo True  switch - b. 10yo False maintain    -0.99694 0.135 Inf -7.374 
##  b. 10yo True  switch - c. Adult False maintain   -0.89114 0.133 Inf -6.708 
##  b. 10yo True  switch - a. 7yo True maintain      -0.12715 0.105 Inf -1.211 
##  b. 10yo True  switch - b. 10yo True maintain     -0.08796 0.121 Inf -0.730 
##  b. 10yo True  switch - c. Adult True maintain    -0.37281 0.239 Inf -1.561 
##  c. Adult True  switch - a. 7yo False maintain    -0.17411 0.119 Inf -1.457 
##  c. Adult True  switch - b. 10yo False maintain   -0.76688 0.146 Inf -5.270 
##  c. Adult True  switch - c. Adult False maintain  -0.66108 0.141 Inf -4.674 
##  c. Adult True  switch - a. 7yo True maintain      0.10292 0.118 Inf  0.872 
##  c. Adult True  switch - b. 10yo True maintain     0.14210 0.132 Inf  1.076 
##  c. Adult True  switch - c. Adult True maintain   -0.14274 0.244 Inf -0.584 
##  a. 7yo False maintain - b. 10yo False maintain   -0.59276 0.139 Inf -4.267 
##  a. 7yo False maintain - c. Adult False maintain  -0.48696 0.136 Inf -3.572 
##  a. 7yo False maintain - a. 7yo True maintain      0.27703 0.110 Inf  2.530 
##  a. 7yo False maintain - b. 10yo True maintain     0.31622 0.125 Inf  2.533 
##  a. 7yo False maintain - c. Adult True maintain    0.03137 0.241 Inf  0.130 
##  b. 10yo False maintain - c. Adult False maintain  0.10580 0.159 Inf  0.664 
##  b. 10yo False maintain - a. 7yo True maintain     0.86980 0.138 Inf  6.316 
##  b. 10yo False maintain - b. 10yo True maintain    0.90898 0.149 Inf  6.081 
##  b. 10yo False maintain - c. Adult True maintain   0.62414 0.255 Inf  2.448 
##  c. Adult False maintain - a. 7yo True maintain    0.76400 0.135 Inf  5.651 
##  c. Adult False maintain - b. 10yo True maintain   0.80318 0.148 Inf  5.438 
##  c. Adult False maintain - c. Adult True maintain  0.51834 0.253 Inf  2.050 
##  a. 7yo True maintain - b. 10yo True maintain      0.03919 0.123 Inf  0.318 
##  a. 7yo True maintain - c. Adult True maintain    -0.24566 0.240 Inf -1.022 
##  b. 10yo True maintain - c. Adult True maintain   -0.28485 0.248 Inf -1.151 
##  p.value
##  1.0000 
##  0.9898 
##  0.4820 
##  0.3415 
##  0.9951 
##  1.0000 
##  0.1132 
##  0.3683 
##  0.8551 
##  0.7901 
##  1.0000 
##  0.5987 
##  0.0249 
##  0.0058 
##  0.9549 
##  1.0000 
##  0.0005 
##  0.0110 
##  0.3052 
##  0.3060 
##  1.0000 
##  <.0001 
##  <.0001 
##  0.0442 
##  0.6971 
##  0.2946 
##  0.7470 
##  0.0005 
##  0.0012 
##  0.9958 
##  1.0000 
##  0.8729 
##  0.0310 
##  <.0001 
##  <.0001 
##  0.9992 
##  1.0000 
##  0.9596 
##  0.6938 
##  0.0084 
##  <.0001 
##  <.0001 
##  0.9882 
##  0.9999 
##  0.9230 
##  0.9517 
##  <.0001 
##  0.0002 
##  0.9994 
##  0.9957 
##  1.0000 
##  0.0012 
##  0.0183 
##  0.3211 
##  0.3191 
##  1.0000 
##  1.0000 
##  <.0001 
##  <.0001 
##  0.3735 
##  <.0001 
##  <.0001 
##  0.6584 
##  1.0000 
##  0.9972 
##  0.9923 
## 
## P value adjustment: tukey method for comparing a family of 12 estimates

3.3 Other Output

This section can be ignored for general review of findings. It is reproduced here for completeness of reporting of model results.

3.3.1 Covariance Matrix
vcov(mm2)
## 24 x 24 Matrix of class "dpoMatrix"
##                                             (Intercept)          id    cueTrue
## (Intercept)                                   1.0223195 -0.14365219 -0.9570950
## id                                           -0.1436522  0.02372351  0.1432468
## cueTrue                                      -0.9570950  0.14324681  1.1048856
## strategymaintain                             -0.9498606  0.14272768  0.9484618
## age_grpb. 10yo                               -1.0207181  0.14354643  0.9561684
## age_grpc. Adult                              -1.0187008  0.14343261  0.9551083
## id:cueTrue                                    0.1432475 -0.02369024 -0.1693170
## id:strategymaintain                           0.1412183 -0.02355548 -0.1417004
## cueTrue:strategymaintain                      0.9358267 -0.14192940 -1.0926312
## id:age_grpb. 10yo                             0.1434372 -0.02370908 -0.1431209
## id:age_grpc. Adult                            0.1429611 -0.02368182 -0.1428686
## cueTrue:age_grpb. 10yo                        0.9552605 -0.14312534 -1.1038159
## cueTrue:age_grpc. Adult                       0.9521986 -0.14295171 -1.1022055
## strategymaintain:age_grpb. 10yo               0.9509156 -0.14276900 -0.9489160
## strategymaintain:age_grpc. Adult              0.9484345 -0.14263288 -0.9476343
## id:cueTrue:strategymaintain                  -0.1413508  0.02353443  0.1678926
## id:cueTrue:age_grpb. 10yo                    -0.1430418  0.02367572  0.1691918
## id:cueTrue:age_grpc. Adult                   -0.1427557  0.02365989  0.1690438
## id:strategymaintain:age_grpb. 10yo           -0.1415143  0.02356908  0.1418390
## id:strategymaintain:age_grpc. Adult          -0.1413613  0.02356157  0.1417651
## cueTrue:strategymaintain:age_grpb. 10yo      -0.9372404  0.14198647  1.0932418
## cueTrue:strategymaintain:age_grpc. Adult     -0.9360041  0.14192207  1.0926241
## id:cueTrue:strategymaintain:age_grpb. 10yo    0.1415406 -0.02354088 -0.1679675
## id:cueTrue:strategymaintain:age_grpc. Adult   0.1415142 -0.02354037 -0.1679593
##                                             strategymaintain age_grpb. 10yo
## (Intercept)                                       -0.9498606     -1.0207181
## id                                                 0.1427277      0.1435464
## cueTrue                                            0.9484618      0.9561684
## strategymaintain                                   1.1279677      0.9492933
## age_grpb. 10yo                                     0.9492933      1.2234648
## age_grpc. Adult                                    0.9487385      1.0184046
## id:cueTrue                                        -0.1425244     -0.1431570
## id:strategymaintain                               -0.1723015     -0.1412373
## cueTrue:strategymaintain                          -1.1244871     -0.9361465
## id:age_grpb. 10yo                                 -0.1426493     -0.1686479
## id:age_grpc. Adult                                -0.1425153     -0.1431056
## cueTrue:age_grpb. 10yo                            -0.9478080     -1.1017449
## cueTrue:age_grpc. Adult                           -0.9469598     -0.9530471
## strategymaintain:age_grpb. 10yo                   -1.1280858     -1.0876369
## strategymaintain:age_grpc. Adult                  -1.1274484     -0.9483481
## id:cueTrue:strategymaintain                        0.1720755      0.1413198
## id:cueTrue:age_grpb. 10yo                          0.1424434      0.1682158
## id:cueTrue:age_grpc. Adult                         0.1423672      0.1428406
## id:strategymaintain:age_grpb. 10yo                 0.1723532      0.1651188
## id:strategymaintain:age_grpc. Adult                0.1723222      0.1413182
## cueTrue:strategymaintain:age_grpb. 10yo            1.1246621      1.0735474
## cueTrue:strategymaintain:age_grpc. Adult           1.1243749      0.9361868
## id:cueTrue:strategymaintain:age_grpb. 10yo        -0.1720877     -0.1652753
## id:cueTrue:strategymaintain:age_grpc. Adult       -0.1720893     -0.1414082
##                                             age_grpc. Adult  id:cueTrue
## (Intercept)                                      -1.0187008  0.14324750
## id                                                0.1434326 -0.02369024
## cueTrue                                           0.9551083 -0.16931702
## strategymaintain                                  0.9487385 -0.14252441
## age_grpb. 10yo                                    1.0184046 -0.14315704
## age_grpc. Adult                                   1.2601633 -0.14306690
## id:cueTrue                                       -0.1430669  0.02936890
## id:strategymaintain                              -0.1413010  0.02355402
## cueTrue:strategymaintain                         -0.9368561  0.16827688
## id:age_grpb. 10yo                                -0.1433907  0.02367779
## id:age_grpc. Adult                               -0.1765880  0.02365603
## cueTrue:age_grpb. 10yo                           -0.9547697  0.16921199
## cueTrue:age_grpc. Adult                          -1.1471843  0.16907462
## strategymaintain:age_grpb. 10yo                  -0.9486537  0.14254952
## strategymaintain:age_grpc. Adult                 -1.1275151  0.14244340
## id:cueTrue:strategymaintain                       0.1413156 -0.02924007
## id:cueTrue:age_grpb. 10yo                         0.1430200 -0.02935597
## id:cueTrue:age_grpc. Adult                        0.1756132 -0.02934368
## id:strategymaintain:age_grpb. 10yo                0.1412970 -0.02356352
## id:strategymaintain:age_grpc. Adult               0.1714246 -0.02355810
## cueTrue:strategymaintain:age_grpb. 10yo           0.9367616 -0.16831134
## cueTrue:strategymaintain:age_grpc. Adult          1.1107198 -0.16826296
## id:cueTrue:strategymaintain:age_grpb. 10yo       -0.1412913  0.02924316
## id:cueTrue:strategymaintain:age_grpc. Adult      -0.1711249  0.02924321
##                                             id:strategymaintain
## (Intercept)                                          0.14121835
## id                                                  -0.02355548
## cueTrue                                             -0.14170038
## strategymaintain                                    -0.17230151
## age_grpb. 10yo                                      -0.14123728
## age_grpc. Adult                                     -0.14130103
## id:cueTrue                                           0.02355402
## id:strategymaintain                                  0.02962168
## cueTrue:strategymaintain                             0.17293152
## id:age_grpb. 10yo                                    0.02355751
## id:age_grpc. Adult                                   0.02357176
## cueTrue:age_grpb. 10yo                               0.14172141
## cueTrue:age_grpc. Adult                              0.14181641
## strategymaintain:age_grpb. 10yo                      0.17222752
## strategymaintain:age_grpc. Adult                     0.17231576
## id:cueTrue:strategymaintain                         -0.02958083
## id:cueTrue:age_grpb. 10yo                           -0.02355449
## id:cueTrue:age_grpc. Adult                          -0.02356414
## id:strategymaintain:age_grpb. 10yo                  -0.02960535
## id:strategymaintain:age_grpc. Adult                 -0.02961275
## cueTrue:strategymaintain:age_grpb. 10yo             -0.17283639
## cueTrue:strategymaintain:age_grpc. Adult            -0.17288758
## id:cueTrue:strategymaintain:age_grpb. 10yo           0.02956539
## id:cueTrue:strategymaintain:age_grpc. Adult          0.02956832
##                                             cueTrue:strategymaintain
## (Intercept)                                                0.9358267
## id                                                        -0.1419294
## cueTrue                                                   -1.0926312
## strategymaintain                                          -1.1244871
## age_grpb. 10yo                                            -0.9361465
## age_grpc. Adult                                           -0.9368561
## id:cueTrue                                                 0.1682769
## id:strategymaintain                                        0.1729315
## cueTrue:strategymaintain                                   1.4154212
## id:age_grpb. 10yo                                          0.1419683
## id:age_grpc. Adult                                         0.1421297
## cueTrue:age_grpb. 10yo                                     1.0929853
## cueTrue:age_grpc. Adult                                    1.0940521
## strategymaintain:age_grpb. 10yo                            1.1238065
## strategymaintain:age_grpc. Adult                           1.1247542
## id:cueTrue:strategymaintain                               -0.2232235
## id:cueTrue:age_grpb. 10yo                                 -0.1683017
## id:cueTrue:age_grpc. Adult                                -0.1684077
## id:strategymaintain:age_grpb. 10yo                        -0.1727744
## id:strategymaintain:age_grpc. Adult                       -0.1728480
## cueTrue:strategymaintain:age_grpb. 10yo                   -1.4145286
## cueTrue:strategymaintain:age_grpc. Adult                  -1.4150555
## id:cueTrue:strategymaintain:age_grpb. 10yo                 0.2230828
## id:cueTrue:strategymaintain:age_grpc. Adult                0.2231076
##                                             id:age_grpb. 10yo
## (Intercept)                                        0.14343722
## id                                                -0.02370908
## cueTrue                                           -0.14312094
## strategymaintain                                  -0.14264934
## age_grpb. 10yo                                    -0.16864787
## age_grpc. Adult                                   -0.14339073
## id:cueTrue                                         0.02367779
## id:strategymaintain                                0.02355751
## cueTrue:strategymaintain                           0.14196826
## id:age_grpb. 10yo                                  0.02898347
## id:age_grpc. Adult                                 0.02370058
## cueTrue:age_grpb. 10yo                             0.16865824
## cueTrue:age_grpc. Adult                            0.14306123
## strategymaintain:age_grpb. 10yo                    0.16670383
## strategymaintain:age_grpc. Adult                   0.14261832
## id:cueTrue:strategymaintain                       -0.02352978
## id:cueTrue:age_grpb. 10yo                         -0.02894495
## id:cueTrue:age_grpc. Adult                        -0.02367070
## id:strategymaintain:age_grpb. 10yo                -0.02858819
## id:strategymaintain:age_grpc. Adult               -0.02355537
## cueTrue:strategymaintain:age_grpb. 10yo           -0.16586461
## cueTrue:strategymaintain:age_grpc. Adult          -0.14194280
## id:cueTrue:strategymaintain:age_grpb. 10yo         0.02856624
## id:cueTrue:strategymaintain:age_grpc. Adult        0.02352578
##                                             id:age_grpc. Adult
## (Intercept)                                         0.14296110
## id                                                 -0.02368182
## cueTrue                                            -0.14286860
## strategymaintain                                   -0.14251533
## age_grpb. 10yo                                     -0.14310565
## age_grpc. Adult                                    -0.17658800
## id:cueTrue                                          0.02365603
## id:strategymaintain                                 0.02357176
## cueTrue:strategymaintain                            0.14212969
## id:age_grpb. 10yo                                   0.02370058
## id:age_grpc. Adult                                  0.03067074
## cueTrue:age_grpb. 10yo                              0.14303397
## cueTrue:age_grpc. Adult                             0.17778948
## strategymaintain:age_grpb. 10yo                     0.14233803
## strategymaintain:age_grpc. Adult                    0.17444480
## id:cueTrue:strategymaintain                        -0.02352811
## id:cueTrue:age_grpb. 10yo                          -0.02367195
## id:cueTrue:age_grpc. Adult                         -0.03052060
## id:strategymaintain:age_grpb. 10yo                 -0.02352782
## id:strategymaintain:age_grpc. Adult                -0.02989034
## cueTrue:strategymaintain:age_grpb. 10yo            -0.14189748
## cueTrue:strategymaintain:age_grpc. Adult           -0.17306904
## id:cueTrue:strategymaintain:age_grpb. 10yo          0.02349351
## id:cueTrue:strategymaintain:age_grpc. Adult         0.02977430
##                                             cueTrue:age_grpb. 10yo
## (Intercept)                                              0.9552605
## id                                                      -0.1431253
## cueTrue                                                 -1.1038159
## strategymaintain                                        -0.9478080
## age_grpb. 10yo                                          -1.1017449
## age_grpc. Adult                                         -0.9547697
## id:cueTrue                                               0.1692120
## id:strategymaintain                                      0.1417214
## cueTrue:strategymaintain                                 1.0929853
## id:age_grpb. 10yo                                        0.1686582
## id:age_grpc. Adult                                       0.1430340
## cueTrue:age_grpb. 10yo                                   1.3818172
## cueTrue:age_grpc. Adult                                  1.1031703
## strategymaintain:age_grpb. 10yo                          1.0845703
## strategymaintain:age_grpc. Adult                         0.9475319
## id:cueTrue:strategymaintain                             -0.1678550
## id:cueTrue:age_grpb. 10yo                               -0.2176023
## id:cueTrue:age_grpc. Adult                              -0.1691399
## id:strategymaintain:age_grpb. 10yo                      -0.1652120
## id:strategymaintain:age_grpc. Adult                     -0.1417150
## cueTrue:strategymaintain:age_grpb. 10yo                 -1.3571613
## cueTrue:strategymaintain:age_grpc. Adult                -1.0928220
## id:cueTrue:strategymaintain:age_grpb. 10yo               0.2143384
## id:cueTrue:strategymaintain:age_grpc. Adult              0.1678360
##                                             cueTrue:age_grpc. Adult
## (Intercept)                                               0.9521986
## id                                                       -0.1429517
## cueTrue                                                  -1.1022055
## strategymaintain                                         -0.9469598
## age_grpb. 10yo                                           -0.9530471
## age_grpc. Adult                                          -1.1471843
## id:cueTrue                                                0.1690746
## id:strategymaintain                                       0.1418164
## cueTrue:strategymaintain                                  1.0940521
## id:age_grpb. 10yo                                         0.1430612
## id:age_grpc. Adult                                        0.1777895
## cueTrue:age_grpb. 10yo                                    1.1031703
## cueTrue:age_grpc. Adult                                   1.4627259
## strategymaintain:age_grpb. 10yo                           0.9458637
## strategymaintain:age_grpc. Adult                          1.1300690
## id:cueTrue:strategymaintain                              -0.1678478
## id:cueTrue:age_grpb. 10yo                                -0.1691653
## id:cueTrue:age_grpc. Adult                               -0.2336776
## id:strategymaintain:age_grpb. 10yo                       -0.1415469
## id:strategymaintain:age_grpc. Adult                      -0.1719686
## cueTrue:strategymaintain:age_grpb. 10yo                  -1.0926116
## cueTrue:strategymaintain:age_grpc. Adult                 -1.4268269
## id:cueTrue:strategymaintain:age_grpb. 10yo                0.1676316
## id:cueTrue:strategymaintain:age_grpc. Adult               0.2279933
##                                             strategymaintain:age_grpb. 10yo
## (Intercept)                                                       0.9509156
## id                                                               -0.1427690
## cueTrue                                                          -0.9489160
## strategymaintain                                                 -1.1280858
## age_grpb. 10yo                                                   -1.0876369
## age_grpc. Adult                                                  -0.9486537
## id:cueTrue                                                        0.1425495
## id:strategymaintain                                               0.1722275
## cueTrue:strategymaintain                                          1.1238065
## id:age_grpb. 10yo                                                 0.1667038
## id:age_grpc. Adult                                                0.1423380
## cueTrue:age_grpb. 10yo                                            1.0845703
## cueTrue:age_grpc. Adult                                           0.9458637
## strategymaintain:age_grpb. 10yo                                   1.5833803
## strategymaintain:age_grpc. Adult                                  1.1271480
## id:cueTrue:strategymaintain                                      -0.1720408
## id:cueTrue:age_grpb. 10yo                                        -0.1665201
## id:cueTrue:age_grpc. Adult                                       -0.1422393
## id:strategymaintain:age_grpb. 10yo                               -0.2562900
## id:strategymaintain:age_grpc. Adult                              -0.1723029
## cueTrue:strategymaintain:age_grpb. 10yo                          -1.5802178
## cueTrue:strategymaintain:age_grpc. Adult                         -1.1238164
## id:cueTrue:strategymaintain:age_grpb. 10yo                        0.2558491
## id:cueTrue:strategymaintain:age_grpc. Adult                       0.1721208
##                                             strategymaintain:age_grpc. Adult
## (Intercept)                                                        0.9484345
## id                                                                -0.1426329
## cueTrue                                                           -0.9476343
## strategymaintain                                                  -1.1274484
## age_grpb. 10yo                                                    -0.9483481
## age_grpc. Adult                                                   -1.1275151
## id:cueTrue                                                         0.1424434
## id:strategymaintain                                                0.1723158
## cueTrue:strategymaintain                                           1.1247542
## id:age_grpb. 10yo                                                  0.1426183
## id:age_grpc. Adult                                                 0.1744448
## cueTrue:age_grpb. 10yo                                             0.9475319
## cueTrue:age_grpc. Adult                                            1.1300690
## strategymaintain:age_grpb. 10yo                                    1.1271480
## strategymaintain:age_grpc. Adult                                   1.4683018
## id:cueTrue:strategymaintain                                       -0.1720453
## id:cueTrue:age_grpb. 10yo                                         -0.1424210
## id:cueTrue:age_grpc. Adult                                        -0.1743418
## id:strategymaintain:age_grpb. 10yo                                -0.1722572
## id:strategymaintain:age_grpc. Adult                               -0.2415741
## cueTrue:strategymaintain:age_grpb. 10yo                           -1.1243758
## cueTrue:strategymaintain:age_grpc. Adult                          -1.4665059
## id:cueTrue:strategymaintain:age_grpb. 10yo                         0.1719791
## id:cueTrue:strategymaintain:age_grpc. Adult                        0.2410403
##                                             id:cueTrue:strategymaintain
## (Intercept)                                                 -0.14135079
## id                                                           0.02353443
## cueTrue                                                      0.16789260
## strategymaintain                                             0.17207546
## age_grpb. 10yo                                               0.14131984
## age_grpc. Adult                                              0.14131555
## id:cueTrue                                                  -0.02924007
## id:strategymaintain                                         -0.02958083
## cueTrue:strategymaintain                                    -0.22322353
## id:age_grpb. 10yo                                           -0.02352978
## id:age_grpc. Adult                                          -0.02352811
## cueTrue:age_grpb. 10yo                                      -0.16785505
## cueTrue:age_grpc. Adult                                     -0.16784780
## strategymaintain:age_grpb. 10yo                             -0.17204080
## strategymaintain:age_grpc. Adult                            -0.17204530
## id:cueTrue:strategymaintain                                  0.04110384
## id:cueTrue:age_grpb. 10yo                                    0.02923411
## id:cueTrue:age_grpc. Adult                                   0.02923416
## id:strategymaintain:age_grpb. 10yo                           0.02957510
## id:strategymaintain:age_grpc. Adult                          0.02957723
## cueTrue:strategymaintain:age_grpb. 10yo                      0.22317864
## cueTrue:strategymaintain:age_grpc. Adult                     0.22318749
## id:cueTrue:strategymaintain:age_grpb. 10yo                  -0.04109529
## id:cueTrue:strategymaintain:age_grpc. Adult                 -0.04109712
##                                             id:cueTrue:age_grpb. 10yo
## (Intercept)                                               -0.14304185
## id                                                         0.02367572
## cueTrue                                                    0.16919178
## strategymaintain                                           0.14244344
## age_grpb. 10yo                                             0.16821576
## age_grpc. Adult                                            0.14302002
## id:cueTrue                                                -0.02935597
## id:strategymaintain                                       -0.02355449
## cueTrue:strategymaintain                                  -0.16830172
## id:age_grpb. 10yo                                         -0.02894495
## id:age_grpc. Adult                                        -0.02367195
## cueTrue:age_grpb. 10yo                                    -0.21760230
## cueTrue:age_grpc. Adult                                   -0.16916534
## strategymaintain:age_grpb. 10yo                           -0.16652007
## strategymaintain:age_grpc. Adult                          -0.14242100
## id:cueTrue:strategymaintain                                0.02923411
## id:cueTrue:age_grpb. 10yo                                  0.03977946
## id:cueTrue:age_grpc. Adult                                 0.02935210
## id:strategymaintain:age_grpb. 10yo                         0.02859210
## id:strategymaintain:age_grpc. Adult                        0.02355104
## cueTrue:strategymaintain:age_grpb. 10yo                    0.21515430
## cueTrue:strategymaintain:age_grpc. Adult                   0.16827136
## id:cueTrue:strategymaintain:age_grpb. 10yo                -0.03943628
## id:cueTrue:strategymaintain:age_grpc. Adult               -0.02922820
##                                             id:cueTrue:age_grpc. Adult
## (Intercept)                                                -0.14275566
## id                                                          0.02365989
## cueTrue                                                     0.16904384
## strategymaintain                                            0.14236719
## age_grpb. 10yo                                              0.14284062
## age_grpc. Adult                                             0.17561318
## id:cueTrue                                                 -0.02934368
## id:strategymaintain                                        -0.02356414
## cueTrue:strategymaintain                                   -0.16840768
## id:age_grpb. 10yo                                          -0.02367070
## id:age_grpc. Adult                                         -0.03052060
## cueTrue:age_grpb. 10yo                                     -0.16913989
## cueTrue:age_grpc. Adult                                    -0.23367757
## strategymaintain:age_grpb. 10yo                            -0.14223925
## strategymaintain:age_grpc. Adult                           -0.17434180
## id:cueTrue:strategymaintain                                 0.02923416
## id:cueTrue:age_grpb. 10yo                                   0.02935210
## id:cueTrue:age_grpc. Adult                                  0.04415202
## id:strategymaintain:age_grpb. 10yo                          0.02353335
## id:strategymaintain:age_grpc. Adult                         0.03002688
## cueTrue:strategymaintain:age_grpb. 10yo                     0.16823970
## cueTrue:strategymaintain:age_grpc. Adult                    0.23087749
## id:cueTrue:strategymaintain:age_grpb. 10yo                 -0.02920854
## id:cueTrue:strategymaintain:age_grpc. Adult                -0.04358403
##                                             id:strategymaintain:age_grpb. 10yo
## (Intercept)                                                        -0.14151435
## id                                                                  0.02356908
## cueTrue                                                             0.14183897
## strategymaintain                                                    0.17235319
## age_grpb. 10yo                                                      0.16511880
## age_grpc. Adult                                                     0.14129697
## id:cueTrue                                                         -0.02356352
## id:strategymaintain                                                -0.02960535
## cueTrue:strategymaintain                                           -0.17277440
## id:age_grpb. 10yo                                                  -0.02858819
## id:age_grpc. Adult                                                 -0.02352782
## cueTrue:age_grpb. 10yo                                             -0.16521199
## cueTrue:age_grpc. Adult                                            -0.14154692
## strategymaintain:age_grpb. 10yo                                    -0.25629004
## strategymaintain:age_grpc. Adult                                   -0.17225720
## id:cueTrue:strategymaintain                                         0.02957510
## id:cueTrue:age_grpb. 10yo                                           0.02859210
## id:cueTrue:age_grpc. Adult                                          0.02353335
## id:strategymaintain:age_grpb. 10yo                                  0.04748733
## id:strategymaintain:age_grpc. Adult                                 0.02961079
## cueTrue:strategymaintain:age_grpb. 10yo                             0.25699060
## cueTrue:strategymaintain:age_grpc. Adult                            0.17276248
## id:cueTrue:strategymaintain:age_grpb. 10yo                         -0.04739936
## id:cueTrue:strategymaintain:age_grpc. Adult                        -0.02957996
##                                             id:strategymaintain:age_grpc. Adult
## (Intercept)                                                         -0.14136134
## id                                                                   0.02356157
## cueTrue                                                              0.14176509
## strategymaintain                                                     0.17232219
## age_grpb. 10yo                                                       0.14131816
## age_grpc. Adult                                                      0.17142464
## id:cueTrue                                                          -0.02355810
## id:strategymaintain                                                 -0.02961275
## cueTrue:strategymaintain                                            -0.17284802
## id:age_grpb. 10yo                                                   -0.02355537
## id:age_grpc. Adult                                                  -0.02989034
## cueTrue:age_grpb. 10yo                                              -0.14171504
## cueTrue:age_grpc. Adult                                             -0.17196857
## strategymaintain:age_grpb. 10yo                                     -0.17230291
## strategymaintain:age_grpc. Adult                                    -0.24157408
## id:cueTrue:strategymaintain                                          0.02957723
## id:cueTrue:age_grpb. 10yo                                            0.02355104
## id:cueTrue:age_grpc. Adult                                           0.03002688
## id:strategymaintain:age_grpb. 10yo                                   0.02961079
## id:strategymaintain:age_grpc. Adult                                  0.04769003
## cueTrue:strategymaintain:age_grpb. 10yo                              0.17282539
## cueTrue:strategymaintain:age_grpc. Adult                             0.24330346
## id:cueTrue:strategymaintain:age_grpb. 10yo                          -0.02957210
## id:cueTrue:strategymaintain:age_grpc. Adult                         -0.04761800
##                                             cueTrue:strategymaintain:age_grpb. 10yo
## (Intercept)                                                              -0.9372404
## id                                                                        0.1419865
## cueTrue                                                                   1.0932418
## strategymaintain                                                          1.1246621
## age_grpb. 10yo                                                            1.0735474
## age_grpc. Adult                                                           0.9367616
## id:cueTrue                                                               -0.1683113
## id:strategymaintain                                                      -0.1728364
## cueTrue:strategymaintain                                                 -1.4145286
## id:age_grpb. 10yo                                                        -0.1658646
## id:age_grpc. Adult                                                       -0.1418975
## cueTrue:age_grpb. 10yo                                                   -1.3571613
## cueTrue:age_grpc. Adult                                                  -1.0926116
## strategymaintain:age_grpb. 10yo                                          -1.5802178
## strategymaintain:age_grpc. Adult                                         -1.1243758
## id:cueTrue:strategymaintain                                               0.2231786
## id:cueTrue:age_grpb. 10yo                                                 0.2151543
## id:cueTrue:age_grpc. Adult                                                0.1682397
## id:strategymaintain:age_grpb. 10yo                                        0.2569906
## id:strategymaintain:age_grpc. Adult                                       0.1728254
## cueTrue:strategymaintain:age_grpb. 10yo                                   2.2082572
## cueTrue:strategymaintain:age_grpc. Adult                                  1.4143250
## id:cueTrue:strategymaintain:age_grpb. 10yo                               -0.3686047
## id:cueTrue:strategymaintain:age_grpc. Adult                              -0.2231504
##                                             cueTrue:strategymaintain:age_grpc. Adult
## (Intercept)                                                               -0.9360041
## id                                                                         0.1419221
## cueTrue                                                                    1.0926241
## strategymaintain                                                           1.1243749
## age_grpb. 10yo                                                             0.9361868
## age_grpc. Adult                                                            1.1107198
## id:cueTrue                                                                -0.1682630
## id:strategymaintain                                                       -0.1728876
## cueTrue:strategymaintain                                                  -1.4150555
## id:age_grpb. 10yo                                                         -0.1419428
## id:age_grpc. Adult                                                        -0.1730690
## cueTrue:age_grpb. 10yo                                                    -1.0928220
## cueTrue:age_grpc. Adult                                                   -1.4268269
## strategymaintain:age_grpb. 10yo                                           -1.1238164
## strategymaintain:age_grpc. Adult                                          -1.4665059
## id:cueTrue:strategymaintain                                                0.2231875
## id:cueTrue:age_grpb. 10yo                                                  0.1682714
## id:cueTrue:age_grpc. Adult                                                 0.2308775
## id:strategymaintain:age_grpb. 10yo                                         0.1727625
## id:strategymaintain:age_grpc. Adult                                        0.2433035
## cueTrue:strategymaintain:age_grpb. 10yo                                    1.4143250
## cueTrue:strategymaintain:age_grpc. Adult                                   2.5582449
## id:cueTrue:strategymaintain:age_grpb. 10yo                                -0.2230699
## id:cueTrue:strategymaintain:age_grpc. Adult                               -0.4757970
##                                             id:cueTrue:strategymaintain:age_grpb. 10yo
## (Intercept)                                                                 0.14154058
## id                                                                         -0.02354088
## cueTrue                                                                    -0.16796754
## strategymaintain                                                           -0.17208771
## age_grpb. 10yo                                                             -0.16527535
## age_grpc. Adult                                                            -0.14129128
## id:cueTrue                                                                  0.02924316
## id:strategymaintain                                                         0.02956539
## cueTrue:strategymaintain                                                    0.22308283
## id:age_grpb. 10yo                                                           0.02856624
## id:age_grpc. Adult                                                          0.02349351
## cueTrue:age_grpb. 10yo                                                      0.21433836
## cueTrue:age_grpc. Adult                                                     0.16763164
## strategymaintain:age_grpb. 10yo                                             0.25584908
## strategymaintain:age_grpc. Adult                                            0.17197909
## id:cueTrue:strategymaintain                                                -0.04109529
## id:cueTrue:age_grpb. 10yo                                                  -0.03943628
## id:cueTrue:age_grpc. Adult                                                 -0.02920854
## id:strategymaintain:age_grpb. 10yo                                         -0.04739936
## id:strategymaintain:age_grpc. Adult                                        -0.02957210
## cueTrue:strategymaintain:age_grpb. 10yo                                    -0.36860467
## cueTrue:strategymaintain:age_grpc. Adult                                   -0.22306991
## id:cueTrue:strategymaintain:age_grpb. 10yo                                  0.07339200
## id:cueTrue:strategymaintain:age_grpc. Adult                                 0.04110103
##                                             id:cueTrue:strategymaintain:age_grpc. Adult
## (Intercept)                                                                  0.14151416
## id                                                                          -0.02354037
## cueTrue                                                                     -0.16795931
## strategymaintain                                                            -0.17208934
## age_grpb. 10yo                                                              -0.14140822
## age_grpc. Adult                                                             -0.17112487
## id:cueTrue                                                                   0.02924321
## id:strategymaintain                                                          0.02956832
## cueTrue:strategymaintain                                                     0.22310763
## id:age_grpb. 10yo                                                            0.02352578
## id:age_grpc. Adult                                                           0.02977430
## cueTrue:age_grpb. 10yo                                                       0.16783604
## cueTrue:age_grpc. Adult                                                      0.22799333
## strategymaintain:age_grpb. 10yo                                              0.17212080
## strategymaintain:age_grpc. Adult                                             0.24104030
## id:cueTrue:strategymaintain                                                 -0.04109712
## id:cueTrue:age_grpb. 10yo                                                   -0.02922820
## id:cueTrue:age_grpc. Adult                                                  -0.04358403
## id:strategymaintain:age_grpb. 10yo                                          -0.02957996
## id:strategymaintain:age_grpc. Adult                                         -0.04761800
## cueTrue:strategymaintain:age_grpb. 10yo                                     -0.22315038
## cueTrue:strategymaintain:age_grpc. Adult                                    -0.47579704
## id:cueTrue:strategymaintain:age_grpb. 10yo                                   0.04110103
## id:cueTrue:strategymaintain:age_grpc. Adult                                  0.11885537
3.3.2 Random Effects
ranef(mm2)
## $partID
##      (Intercept)
## 3001 -0.07107995
## 3002 -1.07715298
## 3003  1.91173903
## 3004 -1.07715298
## 3005  0.50693943
## 3007  0.50693943
## 3008  1.91173903
## 3009  0.82103368
## 3010 -3.22920307
## 3011  0.82103368
## 3012 -1.30597642
## 3013 -0.59509527
## 3014  1.51671301
## 3015  0.21032975
## 3016 -0.84065922
## 3017 -0.59509527
## 3018 -0.84065922
## 3019 -0.84065922
## 3020  1.51671301
## 3021  1.15591574
## 3022 -1.07715298
## 3023 -1.74606169
## 3024  0.50693943
## 3025  1.15591574
## 3026  1.51671301
## 3027 -0.84065922
## 3028  0.82103368
## 3030 -0.07107995
## 3031 -2.17129634
## 3033 -0.07107995
## 3034 -0.07107995
## 3035  0.82103368
## 3050  1.97698995
## 3051 -0.04628487
## 3053 -0.23645762
## 3054  1.59977333
## 3056 -1.91182246
## 3057 -0.04500237
## 3058 -0.04628487
## 3059  0.18363862
## 3060  0.35762549
## 3061  0.57387592
## 3062  0.80158092
## 3064  0.61715758
## 3065 -0.59887216
## 3066  0.18363862
## 3067  1.04250396
## 3070  1.21867222
## 3071  0.80158092
## 3072 -1.31742031
## 3074  1.04250396
## 3075 -1.31742031
## 3077  1.57352881
## 3078  0.18363862
## 3079  0.61715758
## 3080 -0.94428482
## 3081  0.18363862
## 3082  2.98130095
## 3083  2.16764446
## 3085 -0.42029802
## 3086  0.82322466
## 3087 -1.31742031
## 3088 -0.04500237
## 3089 -1.91182246
## 3090  0.40420533
## 3091  1.57352881
## 3092 -0.78091020
## 3093  0.40420533
## 3094  0.18363862
## 3095 -0.78091020
## 3096 -0.78091020
## 3097  0.15134283
## 3098 -0.04628487
## 3099  1.21867222
## 3100  0.15134283
## 3101 -0.59887216
## 3102 -3.07564551
## 3103 -0.23645762
## 3104 -1.78538004
## 3105 -0.78091020
## 3106  0.40420533
## 3107 -0.42029802
## 3108 -0.77320354
## 3109  0.35762549
## 3110  0.80158092
## 3111  0.80158092
## 3112 -4.08265625
## 3113  0.80158092
## 3114  0.57387592
## 3115 -1.31742031
## 3116  0.61715758
## 3118  0.15134283
## 3119 -1.78538004
## 
## with conditional variances for "partID"

4. Subset of Data

The following analysis includes only uncued trials from the switching condition to account for percieved ceiling level effects determined in the Full Model.

4.1 Df

tstm_mini <- tstm_measures %>% filter(cue == "False", strategy == " switch")
head(tstm_mini)
## # A tibble: 6 x 10
## # Groups:   partID, strategy, cue [1]
##   partID trial strategy  cue      P1    P2   all age_grp    bin    id
##    <int> <int> <chr>     <fct> <dbl> <dbl> <dbl> <chr>    <int> <int>
## 1   3001     3 " switch" False     5     0     5 c. Adult     0     1
## 2   3001     4 " switch" False     1     5     6 c. Adult     0     2
## 3   3001     5 " switch" False     1     5     6 c. Adult     0     3
## 4   3001     6 " switch" False     5     1     6 c. Adult     0     4
## 5   3001     7 " switch" False     1     5     6 c. Adult     0     5
## 6   3001     8 " switch" False     5     0     5 c. Adult     0     6

4.2 Model Builds

4.2.1 Null Model
mm0_subset <- lme4::glmer(bin ~ 1 + (1|partID), 
                   family = binomial(link = "logit"), 
                   control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=1000000)),
                   data = tstm_mini)
performance::icc(mm0_subset)
## # Intraclass Correlation Coefficient
## 
##      Adjusted ICC: 0.467
##   Conditional ICC: 0.467
4.2.2 Full Mini-Model
mm2_subset <- lme4::glmer(bin ~ id*age_grp + (1|partID), 
                   family = binomial(link = "logit"), 
                   control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=1000000)),
                   data = tstm_mini)
4.2.3 Model Comparison

Addition of trial number and age group predictors is significant.

anova(mm0_subset, mm2_subset)
## Data: tstm_mini
## Models:
## mm0_subset: bin ~ 1 + (1 | partID)
## mm2_subset: bin ~ id * age_grp + (1 | partID)
##            npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)    
## mm0_subset    2 792.84 802.06 -394.42   788.84                         
## mm2_subset    7 607.18 639.47 -296.59   593.18 195.66  5  < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

4.3 Model Results

4.3.1 Visualization
plot_model(mm2_subset, type = "eff")
## $id

## 
## $age_grp

plot_model(mm2_subset, type = "int")

car::Anova(mm2_subset)
## Analysis of Deviance Table (Type II Wald chisquare tests)
## 
## Response: bin
##              Chisq Df Pr(>Chisq)    
## id         83.1435  1  < 2.2e-16 ***
## age_grp    39.1143  2   3.21e-09 ***
## id:age_grp  5.6532  2    0.05921 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
4.3.2 Significance Testing
mm2_subset
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: bin ~ id * age_grp + (1 | partID)
##    Data: tstm_mini
##       AIC       BIC    logLik  deviance  df.resid 
##  607.1833  639.4676 -296.5917  593.1833       737 
## Random effects:
##  Groups Name        Std.Dev.
##  partID (Intercept) 1.827   
## Number of obs: 744, groups:  partID, 93
## Fixed Effects:
##        (Intercept)                  id      age_grpb. 10yo     age_grpc. Adult  
##           -6.36499             0.46559             3.39333             2.12520  
##  id:age_grpb. 10yo  id:age_grpc. Adult  
##            0.05201             0.34230
jtools::summ(mm2_subset)
Observations 744
Dependent variable bin
Type Mixed effects generalized linear model
Family binomial
Link logit
AIC 607.18
BIC 639.47
Pseudo-R² (fixed effects) 0.43
Pseudo-R² (total) 0.72
Fixed Effects
Est. S.E. z val. p
(Intercept) -6.36 1.13 -5.64 0.00
id 0.47 0.16 2.93 0.00
age_grpb. 10yo 3.39 1.23 2.75 0.01
age_grpc. Adult 2.13 1.25 1.71 0.09
id:age_grpb. 10yo 0.05 0.18 0.29 0.77
id:age_grpc. Adult 0.34 0.19 1.80 0.07
Random Effects
Group Parameter Std. Dev.
partID (Intercept) 1.83
Grouping Variables
Group # groups ICC
partID 93 0.50
car::Anova(mm2_subset)
## Analysis of Deviance Table (Type II Wald chisquare tests)
## 
## Response: bin
##              Chisq Df Pr(>Chisq)    
## id         83.1435  1  < 2.2e-16 ***
## age_grp    39.1143  2   3.21e-09 ***
## id:age_grp  5.6532  2    0.05921 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
emmeans::emmeans(mm2_subset, pairwise ~ age_grp)
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  age_grp  emmean    SE  df asymp.LCL asymp.UCL
##  a. 7yo   -4.270 0.604 Inf     -5.45    -3.087
##  b. 10yo  -0.642 0.382 Inf     -1.39     0.106
##  c. Adult -0.604 0.378 Inf     -1.35     0.137
## 
## Results are given on the logit (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast           estimate    SE  df z.ratio p.value
##  a. 7yo - b. 10yo    -3.6274 0.703 Inf -5.163  <.0001 
##  a. 7yo - c. Adult   -3.6655 0.695 Inf -5.274  <.0001 
##  b. 10yo - c. Adult  -0.0382 0.534 Inf -0.071  0.9972 
## 
## Results are given on the log odds ratio (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emmeans::emtrends(mm2_subset, pairwise ~ age_grp, var = "id")
## $emtrends
##  age_grp  id.trend    SE  df asymp.LCL asymp.UCL
##  a. 7yo      0.466 0.159 Inf     0.154     0.777
##  b. 10yo     0.518 0.086 Inf     0.349     0.686
##  c. Adult    0.808 0.110 Inf     0.592     1.024
## 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast           estimate    SE  df z.ratio p.value
##  a. 7yo - b. 10yo     -0.052 0.179 Inf -0.290  0.9548 
##  a. 7yo - c. Adult    -0.342 0.191 Inf -1.796  0.1710 
##  b. 10yo - c. Adult   -0.290 0.133 Inf -2.180  0.0747 
## 
## P value adjustment: tukey method for comparing a family of 3 estimates