Ebbinghaus

ebb_df <- data %>% 
  filter(task_name == "EBB") %>% 
  mutate(correct = as.factor(case_when(
    resp == "1" ~ "correct",
    resp == "0" ~ "incorrect")), 
         context = task_info, 
         size_diff = as.numeric(trial_info), 
         ) %>% 
  select(-resp, -task_info, -trial_info)
  

ebb_model <- glmer(correct ~ culture * context * size_diff + (size_diff * context | subject), 
                   family = binomial,
                  data = ebb_df)
## boundary (singular) fit: see ?isSingular
ebb_model
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: correct ~ culture * context * size_diff + (size_diff * context |  
##     subject)
##    Data: ebb_df
##       AIC       BIC    logLik  deviance  df.resid 
##  411.6241  482.2607 -187.8121  375.6241       356 
## Random effects:
##  Groups  Name                Std.Dev. Corr             
##  subject (Intercept)         1.11183                   
##          size_diff           0.09665  -1.00            
##          contextNC           4.25861  -1.00  1.00      
##          size_diff:contextNC 0.39340   1.00 -1.00 -1.00
## Number of obs: 374, groups:  subject, 11
## Fixed Effects:
##                   (Intercept)                      cultureUS  
##                     -0.509653                      -0.003713  
##                     contextNC                      size_diff  
##                     -7.583891                       0.131016  
##           cultureUS:contextNC            cultureUS:size_diff  
##                      2.058857                       0.000791  
##           contextNC:size_diff  cultureUS:contextNC:size_diff  
##                      0.426954                      -0.265492  
## convergence code 0; 1 optimizer warnings; 0 lme4 warnings

RMTS

rmts_df <- data %>% 
  filter(task_name == "RMTS") %>% 
  mutate(choice = as.factor(case_when(
    resp == "1" ~ "rel",
    resp == "0" ~ "obj"))
         ) %>% 
  select(-resp, -task_info, -trial_info)

rmts_model <- glmer(choice ~ culture + (1|subject), 
                   family = binomial,
                  data = rmts_df)

rmts_model
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: binomial  ( logit )
## Formula: choice ~ culture + (1 | subject)
##    Data: rmts_df
##      AIC      BIC   logLik deviance df.resid 
##  23.5524  28.9050  -8.7762  17.5524       41 
## Random effects:
##  Groups  Name        Std.Dev.
##  subject (Intercept) 18.48   
## Number of obs: 44, groups:  subject, 11
## Fixed Effects:
## (Intercept)    cultureUS  
##       9.758      -20.425

CP

cp_df <- data %>% 
  filter(task_name == "CP") %>% 
  mutate(choice = as.factor(case_when(
    resp == "1" ~ "uniq",
    resp == "0" ~ "non_uniq"))
         ) %>% 
  select(-resp, -task_info, -trial_info)



 
cp_model <- glm(choice ~ culture, 
                   family=binomial(link="logit"),
                  data = cp_df)

cp_model
## 
## Call:  glm(formula = choice ~ culture, family = binomial(link = "logit"), 
##     data = cp_df)
## 
## Coefficients:
## (Intercept)    cultureUS  
##       19.57       -18.87  
## 
## Degrees of Freedom: 10 Total (i.e. Null);  9 Residual
## Null Deviance:       10.43 
## Residual Deviance: 7.638     AIC: 11.64

Sticker

HZ_height_df <- data %>% 
  filter(task_name == "HZ", resp_type == "hz_height") %>% 
  mutate(
    height = resp
         ) %>% 
  select(-resp, -task_info, -trial_info)

HZ_height_model <- lm(height ~ culture, 
                      data = HZ_height_df)

summary(HZ_height_model)
## 
## Call:
## lm(formula = height ~ culture, data = HZ_height_df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -129.80  -26.07   10.20   36.93  110.20 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   204.20      29.80   6.852 7.45e-05 ***
## cultureUS     -21.47      40.35  -0.532    0.608    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 66.63 on 9 degrees of freedom
## Multiple R-squared:  0.03049,    Adjusted R-squared:  -0.07723 
## F-statistic: 0.2831 on 1 and 9 DF,  p-value: 0.6076
HZ_stkr_area_df <- data %>% 
  filter(task_name == "HZ", resp_type == "stkr_area") %>% 
  mutate(
    stkr_area = resp
         ) %>% 
  select(-resp, -task_info, -trial_info)

HZ_stkr_area_model <- lm(stkr_area ~ culture, 
                      data = HZ_stkr_area_df)

summary(HZ_stkr_area_model)
## 
## Call:
## lm(formula = stkr_area ~ culture, data = HZ_stkr_area_df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -372502 -117861    5323  192361  223332 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   855654      94371   9.067 8.04e-06 ***
## cultureUS     124759     127778   0.976    0.354    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 211000 on 9 degrees of freedom
## Multiple R-squared:  0.09578,    Adjusted R-squared:  -0.004693 
## F-statistic: 0.9533 on 1 and 9 DF,  p-value: 0.3544
HZ_stkr_n_df <- data %>% 
  filter(task_name == "HZ", resp_type == "stkr_count") %>% 
  mutate(
    stkr_count = resp
         ) %>% 
  select(-resp, -task_info, -trial_info)

HZ_stkr_n_model <- lm(stkr_count ~ culture, 
                      data = HZ_stkr_n_df)

summary(HZ_stkr_n_model)
## 
## Call:
## lm(formula = stkr_count ~ culture, data = HZ_stkr_n_df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.3333 -3.9000 -0.3333  2.6667  7.6000 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   10.400      2.100   4.951  0.00079 ***
## cultureUS      3.933      2.844   1.383  0.20000    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.697 on 9 degrees of freedom
## Multiple R-squared:  0.1753, Adjusted R-squared:  0.08364 
## F-statistic: 1.913 on 1 and 9 DF,  p-value: 0.2