Demographics Stats

df.demog %>%
  filter(demog_question == "gender") %>%
  count(demog_response) %>%
  knitr::kable()

df.demog %>% 
  group_by(subject_id, condition) %>%
  summarise(rows = n()) %>%
  select(-rows) %>%
  group_by(condition) %>%
  count(condition) %>%
  knitr::kable()
`summarise()` has grouped output by 'subject_id'. You can override using the
`.groups` argument.
df.demog %>% 
  filter(demog_question == "age") %>%
  summarise(mean_age = mean(as.numeric(demog_response)), 
            sd_age = sd(as.numeric(demog_response))) %>%
  knitr::kable()
demog_response n
Female 49
Male 45
Non-binary 6
condition n
count 45
mass 55
mean_age sd_age
36.98 13.4066

Results

No difference between the mass and count syntax conditions (concurrent function dummy coded as 1).

ggplot(data = df.response, 
       mapping = aes(x = condition, y = selected_concurrent_func, color = condition)) + 
  geom_jitter(aes(group = subject_id), 
              height = 0, 
              alpha = 0.5) +  
  stat_summary(fun.data = "mean_cl_boot", 
               geom = "pointrange") +
  theme(legend.position = "none") + 
  geom_hline(yintercept = 0.5, linetype = "dashed") + 
  ylab("Selected concurrent function (by trial)")

ggplot(data = df.response %>%
         group_by(subject_id, condition) %>%
         summarise(mean_concurrent_func = mean(selected_concurrent_func, na.rm = TRUE)),
       mapping = aes(x = condition, y = mean_concurrent_func)) + 
  geom_violin(aes(fill = condition)) +
  geom_jitter(height = 0, 
              alpha = 0.5) +  
  stat_summary(fun.data = "mean_cl_boot", 
               geom = "pointrange") +
  theme(legend.position = "none") + 
  geom_hline(yintercept = 0.5, linetype = "dashed") + 
  ylab("Mean concurrent function selection (by participant)")
`summarise()` has grouped output by 'subject_id'. You can override using the
`.groups` argument.

No differences between mass/count conditions even when grouped by stimuli category (by complexity, function, or complexity x function).

ggplot(data = df.response,
       mapping = aes(x = category, y = selected_concurrent_func, color = condition)) + 
  geom_jitter(height = 0, 
              alpha = 0.5) +  
  stat_summary(fun.data = "mean_cl_boot", 
               geom = "pointrange", 
               position = position_dodge(0.7))  + 
  theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 7)) + 
  geom_hline(yintercept = 0.5, linetype = "dashed") + 
  ylab("Mean concurrent function selection (by participant)")

ggplot(data = df.response,
       mapping = aes(x = category_complexity, y = selected_concurrent_func, color = condition)) + 
  geom_jitter(height = 0, 
              alpha = 0.5) +  
  stat_summary(fun.data = "mean_cl_boot", 
               geom = "pointrange", 
               position = position_dodge(0.7))  + 
  theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 7)) + 
  geom_hline(yintercept = 0.5, linetype = "dashed") + 
  ylab("Mean concurrent function selection (by participant)")

ggplot(data = df.response,
       mapping = aes(x = category_function, y = selected_concurrent_func, color = condition)) + 
  geom_jitter(height = 0, 
              alpha = 0.5) +  
  stat_summary(fun.data = "mean_cl_boot", 
               geom = "pointrange", 
               position = position_dodge(0.7))  + 
  theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 7)) + 
  geom_hline(yintercept = 0.5, linetype = "dashed") + 
  ylab("Mean concurrent function selection (by participant)")

Checking if the repeated trials prompt people to be more random with their selections (if this was the case, we might see a significant difference in responding between mass/count conditions in the 1st trial, as opposed to the later trials.) No distinction between conditions in any trial. But participants chose significantly more individual function groups (for both mass/count conditions) in the 1st trial, and were at chance for the other trials.

ggplot(data = df.response,
       mapping = aes(x = trial_index, y = selected_concurrent_func, color = condition)) + 
  geom_jitter(height = 0, 
              alpha = 0.5) +  
  stat_summary(fun.data = "mean_cl_boot", 
               geom = "pointrange", 
               position = position_dodge(0.7))  + 
  geom_hline(yintercept = 0.5, linetype = "dashed") + 
  ylab("Mean concurrent function selection (by participant)")

Running the regressions show no effect for any predictors.

fit.base <- glmer(selected_concurrent_func ~ 1 + (1|subject_id) + (1|category), data = df.response, family="binomial")
boundary (singular) fit: see help('isSingular')
summary(fit.base)
Anova(fit.base, type = 3)

fit.cond <- glmer(selected_concurrent_func ~ condition + (1|subject_id) + (1|category), data = df.response, family="binomial")
boundary (singular) fit: see help('isSingular')
summary(fit.cond)
Anova(fit.cond, type = 3)

anova(fit.base, fit.cond)

fit.category <- glmer(selected_concurrent_func ~ condition + category + (1|subject_id), data = df.response, family="binomial")
summary(fit.category)
Anova(fit.category, type = 3)

fit.category_complexity <- glmer(selected_concurrent_func ~ condition + category_complexity + (1|subject_id), data = df.response, family="binomial")
summary(fit.category_complexity)
Anova(fit.category_complexity, type = 3)

fit.category_function <- glmer(selected_concurrent_func ~ condition + category_function + (1|subject_id), data = df.response, family="binomial")
summary(fit.category_function)
Anova(fit.category_function, type = 3)

fit.category_int <- glmer(selected_concurrent_func ~ condition + category_function * category_complexity + (1|subject_id), data = df.response, family="binomial")
fixed-effect model matrix is rank deficient so dropping 4 columns / coefficients
summary(fit.category_int)
Anova(fit.category_int, type = 3)
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: selected_concurrent_func ~ 1 + (1 | subject_id) + (1 | category)
   Data: df.response

     AIC      BIC   logLik deviance df.resid 
   679.5    692.1   -336.7    673.5      497 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.1290 -0.8351 -0.6103  1.0296  1.3969 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 0.4815   0.6939  
 category   (Intercept) 0.0000   0.0000  
Number of obs: 500, groups:  subject_id, 100; category, 5

Fixed effects:
            Estimate Std. Error z value Pr(>|z|)   
(Intercept)  -0.3342     0.1190  -2.808  0.00499 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
optimizer (Nelder_Mead) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')

Analysis of Deviance Table (Type III Wald chisquare tests)

Response: selected_concurrent_func
             Chisq Df Pr(>Chisq)   
(Intercept) 7.8834  1   0.004989 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: selected_concurrent_func ~ condition + (1 | subject_id) + (1 |  
    category)
   Data: df.response

     AIC      BIC   logLik deviance df.resid 
   681.5    698.3   -336.7    673.5      496 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.1307 -0.8340 -0.6095  1.0280  1.3987 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 0.4815   0.6939  
 category   (Intercept) 0.0000   0.0000  
Number of obs: 500, groups:  subject_id, 100; category, 5

Fixed effects:
               Estimate Std. Error z value Pr(>|z|)  
(Intercept)   -0.329339   0.176143  -1.870   0.0615 .
conditionmass -0.008924   0.237228  -0.038   0.9700  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
            (Intr)
conditinmss -0.737
optimizer (Nelder_Mead) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')

Analysis of Deviance Table (Type III Wald chisquare tests)

Response: selected_concurrent_func
             Chisq Df Pr(>Chisq)  
(Intercept) 3.4959  1    0.06152 .
condition   0.0014  1    0.96999  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Data: df.response
Models:
fit.base: selected_concurrent_func ~ 1 + (1 | subject_id) + (1 | category)
fit.cond: selected_concurrent_func ~ condition + (1 | subject_id) + (1 | category)
         npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
fit.base    3 679.49 692.13 -336.74   673.49                     
fit.cond    4 681.48 698.34 -336.74   673.48 0.0014  1       0.97
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: selected_concurrent_func ~ condition + category + (1 | subject_id)
   Data: df.response

     AIC      BIC   logLik deviance df.resid 
   686.6    716.1   -336.3    672.6      493 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.2234 -0.8225 -0.6016  1.0179  1.4868 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 0.4859   0.697   
Number of obs: 500, groups:  subject_id, 100

Fixed effects:
                                             Estimate Std. Error z value
(Intercept)                                -3.571e-01  2.603e-01  -1.372
conditionmass                              -8.992e-03  2.378e-01  -0.038
categoryhigh complexity, low function       1.055e-05  3.022e-01   0.000
categorylow complexity, high function       4.570e-02  3.018e-01   0.151
categorylow complexity, low function       -9.220e-02  3.032e-01  -0.304
categorymedium complexity, medium function  1.815e-01  3.011e-01   0.603
                                           Pr(>|z|)
(Intercept)                                   0.170
conditionmass                                 0.970
categoryhigh complexity, low function         1.000
categorylow complexity, high function         0.880
categorylow complexity, low function          0.761
categorymedium complexity, medium function    0.547

Correlation of Fixed Effects:
                 (Intr) cndtnm ctgryhcmplxty,lf ccm,hf ctgrylcmplxty,lf
conditinmss      -0.500                                                
ctgryhcmplxty,lf -0.581  0.000                                         
ccmplxty,hf      -0.582  0.000  0.501                                  
ctgrylcmplxty,lf -0.578  0.000  0.498            0.499                 
ccmplxty,mf      -0.584  0.000  0.502            0.503  0.500          
Analysis of Deviance Table (Type III Wald chisquare tests)

Response: selected_concurrent_func
             Chisq Df Pr(>Chisq)
(Intercept) 1.8816  1     0.1702
condition   0.0014  1     0.9698
category    0.8766  4     0.9279
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: selected_concurrent_func ~ condition + category_complexity +  
    (1 | subject_id)
   Data: df.response

     AIC      BIC   logLik deviance df.resid 
   682.8    703.9   -336.4    672.8      495 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.2229 -0.8155 -0.6001  1.0416  1.4357 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 0.4848   0.6963  
Number of obs: 500, groups:  subject_id, 100

Fixed effects:
                           Estimate Std. Error z value Pr(>|z|)  
(Intercept)               -0.356992   0.211875  -1.685    0.092 .
conditionmass             -0.008972   0.237646  -0.038    0.970  
category_complexitylow    -0.022931   0.213848  -0.107    0.915  
category_complexitymedium  0.181475   0.260410   0.697    0.486  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
               (Intr) cndtnm ctgry_cmplxtyl
conditinmss    -0.614                      
ctgry_cmplxtyl -0.504  0.000               
ctgry_cmplxtym -0.416  0.000  0.410        
Analysis of Deviance Table (Type III Wald chisquare tests)

Response: selected_concurrent_func
                     Chisq Df Pr(>Chisq)  
(Intercept)         2.8389  1     0.0920 .
condition           0.0014  1     0.9699  
category_complexity 0.6711  2     0.7149  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: selected_concurrent_func ~ condition + category_function + (1 |  
    subject_id)
   Data: df.response

     AIC      BIC   logLik deviance df.resid 
   682.7    703.8   -336.4    672.7      495 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.2231 -0.8061 -0.6069  1.0297  1.4525 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 0.4853   0.6966  
Number of obs: 500, groups:  subject_id, 100

Fixed effects:
                        Estimate Std. Error z value Pr(>|z|)
(Intercept)             -0.33417    0.21169  -1.579    0.114
conditionmass           -0.00895    0.23770  -0.038    0.970
category_functionlow    -0.06883    0.21390  -0.322    0.748
category_functionmedium  0.15860    0.26027   0.609    0.542

Correlation of Fixed Effects:
             (Intr) cndtnm ctgry_fnctnl
conditinmss  -0.614                    
ctgry_fnctnl -0.502  0.000             
ctgry_fnctnm -0.415  0.000  0.409      
Analysis of Deviance Table (Type III Wald chisquare tests)

Response: selected_concurrent_func
                   Chisq Df Pr(>Chisq)
(Intercept)       2.4919  1     0.1144
condition         0.0014  1     0.9700
category_function 0.7624  2     0.6830
Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: binomial  ( logit )
Formula: 
selected_concurrent_func ~ condition + category_function * category_complexity +  
    (1 | subject_id)
   Data: df.response

     AIC      BIC   logLik deviance df.resid 
   686.6    716.1   -336.3    672.6      493 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.2234 -0.8225 -0.6016  1.0179  1.4867 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 0.4859   0.697   
Number of obs: 500, groups:  subject_id, 100

Fixed effects:
                                              Estimate Std. Error z value
(Intercept)                                 -3.571e-01  2.603e-01  -1.372
conditionmass                               -8.954e-03  2.378e-01  -0.038
category_functionlow                         6.572e-05  3.022e-01   0.000
category_functionmedium                      1.816e-01  3.011e-01   0.603
category_complexitylow                       4.576e-02  3.018e-01   0.152
category_functionlow:category_complexitylow -1.379e-01  4.279e-01  -0.322
                                            Pr(>|z|)
(Intercept)                                    0.170
conditionmass                                  0.970
category_functionlow                           1.000
category_functionmedium                        0.546
category_complexitylow                         0.880
category_functionlow:category_complexitylow    0.747

Correlation of Fixed Effects:
             (Intr) cndtnm ctgry_fnctnl ctgry_fnctnm ctgry_c
conditinmss  -0.500                                         
ctgry_fnctnl -0.581  0.000                                  
ctgry_fnctnm -0.584  0.000  0.502                           
ctgry_cmplx  -0.582  0.000  0.501        0.503              
ctgry_fnc:_   0.411  0.000 -0.706       -0.355       -0.706 
fit warnings:
fixed-effect model matrix is rank deficient so dropping 4 columns / coefficients
Analysis of Deviance Table (Type III Wald chisquare tests)

Response: selected_concurrent_func
                                       Chisq Df Pr(>Chisq)
(Intercept)                           1.8823  1     0.1701
condition                             0.0014  1     0.9700
category_function                     0.4859  2     0.7843
category_complexity                   0.0230  1     0.8795
category_function:category_complexity 0.1039  1     0.7471