Ambiguous RMTS (logistic regression): choice ~ culture + (trial_num | subject)
rmts_df <- data %>%
filter(task_name == "RMTS") %>%
mutate(choice = as.factor(case_when(
resp == "1" ~ "rel",
resp == "0" ~ "obj"))
) %>%
group_by(subject) %>%
mutate(trial_num = as.factor(row_number())) %>%
select(-resp, -task_info, -trial_info, -resp_type)
# model 0: not converging
#rmts_model <- glmer(choice ~ culture + (trial_num | subject), family = binomial, data = rmts_df)
# model 1:
rmts_model <- glmer(choice ~ culture + (1 | subject), family = binomial, data = rmts_df)
#rmts_model
summary(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
## 530.8 545.7 -262.4 524.8 1069
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.71048 -0.00570 -0.00500 0.08017 1.75039
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 599.1 24.48
## Number of obs: 1072, groups: subject, 268
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -10.2571 0.8169 -12.556 <2e-16 ***
## cultureUS -0.2796 1.0214 -0.274 0.784
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## cultureUS -0.483
Raven (logistic regression): acc ~ culture + (1 | subject) + (1 | trial)
rv_df <- data %>%
filter(task_name == "RV") %>%
mutate(acc = as.numeric(resp)) %>%
group_by(subject) %>%
mutate(trial = as.factor(row_number())) %>%
select(-resp, -task_info, -trial_info, -resp_type)
rv_model <- glmer(acc ~ culture + (1 | subject) + (culture | trial), family = binomial, data = rv_df)
rv_model
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: acc ~ culture + (1 | subject) + (culture | trial)
## Data: rv_df
## AIC BIC logLik deviance df.resid
## 2514.918 2551.373 -1251.459 2502.918 3210
## Random effects:
## Groups Name Std.Dev. Corr
## subject (Intercept) 1.467
## trial (Intercept) 1.260
## cultureUS 0.421 0.43
## Number of obs: 3216, groups: subject, 268; trial, 12
## Fixed Effects:
## (Intercept) cultureUS
## 2.685 -1.483
summary(rv_model)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: acc ~ culture + (1 | subject) + (culture | trial)
## Data: rv_df
##
## AIC BIC logLik deviance df.resid
## 2514.9 2551.4 -1251.5 2502.9 3210
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -8.5970 0.0797 0.2164 0.3887 4.7045
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 2.1520 1.467
## trial (Intercept) 1.5884 1.260
## cultureUS 0.1773 0.421 0.43
## Number of obs: 3216, groups: subject, 268; trial, 12
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.6849 0.3963 6.775 1.24e-11 ***
## cultureUS -1.4834 0.2549 -5.819 5.92e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## cultureUS -0.045
Conformity preference (logistic regression): choice ~ culture
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, -resp_type)
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
## 0.6190 -0.3583
##
## Degrees of Freedom: 267 Total (i.e. Null); 266 Residual
## Null Deviance: 357.1
## Residual Deviance: 355.1 AIC: 359.1
summary(cp_model)
##
## Call:
## glm(formula = choice ~ culture, family = binomial(link = "logit"),
## data = cp_df)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.4490 -1.2899 0.9282 0.9282 1.0689
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.6190 0.1657 3.735 0.000188 ***
## cultureUS -0.3583 0.2552 -1.404 0.160354
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 357.05 on 267 degrees of freedom
## Residual deviance: 355.08 on 266 degrees of freedom
## AIC: 359.08
##
## Number of Fisher Scoring iterations: 4
Symbolic self-inflation (linear regression): percent_inflation ~ culture
si_df <- data %>%
filter(task_name == "SI") %>%
filter(resp_type == "inflation_score_ratio") %>%
mutate(score = resp) %>%
select(-resp, -task_info, -trial_info, -resp_type)
si_model <- glm(score ~ culture, family=gaussian, data = si_df)
si_model
##
## Call: glm(formula = score ~ culture, family = gaussian, data = si_df)
##
## Coefficients:
## (Intercept) cultureUS
## 0.945635 -0.002024
##
## Degrees of Freedom: 240 Total (i.e. Null); 239 Residual
## Null Deviance: 48.93
## Residual Deviance: 48.93 AIC: 305.7
summary(si_model)
##
## Call:
## glm(formula = score ~ culture, family = gaussian, data = si_df)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -0.7608 -0.2105 -0.0447 0.1195 4.6030
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.945635 0.037067 25.511 <2e-16 ***
## cultureUS -0.002024 0.059994 -0.034 0.973
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for gaussian family taken to be 0.2047229)
##
## Null deviance: 48.929 on 240 degrees of freedom
## Residual deviance: 48.929 on 239 degrees of freedom
## AIC: 305.67
##
## Number of Fisher Scoring iterations: 2
si_df <- data %>%
filter(task_name == "SI") %>%
filter(resp_type == "inflation_score_diff") %>%
mutate(score = resp) %>%
select(-resp, -task_info, -trial_info, -resp_type)
si_model <- glm(score ~ culture, family=gaussian, data = si_df)
si_model
##
## Call: glm(formula = score ~ culture, family = gaussian, data = si_df)
##
## Coefficients:
## (Intercept) cultureUS
## -13.707 7.389
##
## Degrees of Freedom: 240 Total (i.e. Null); 239 Residual
## Null Deviance: 360200
## Residual Deviance: 357100 AIC: 2449
summary(si_model)
##
## Call:
## glm(formula = score ~ culture, family = gaussian, data = si_df)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -252.62 -11.35 3.43 15.87 124.85
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -13.707 3.167 -4.328 2.21e-05 ***
## cultureUS 7.389 5.125 1.442 0.151
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for gaussian family taken to be 1494.199)
##
## Null deviance: 360219 on 240 degrees of freedom
## Residual deviance: 357114 on 239 degrees of freedom
## AIC: 2449.5
##
## Number of Fisher Scoring iterations: 2
Poisson regression: attrib_num ~ attrib_type * culture + (attrib_type | subject) + (culture | trial)
ca_df <- data %>%
filter(task_name == "CA") %>%
mutate(attrib_num = as.numeric(resp),
attrib_binary = replace(attrib_num, attrib_num > 1, 1),
trial = trial_info,
attrib_type = factor(resp_type)) %>%
select(-resp, -task_info)
#ca_model <- glmer(attrib_num ~ attrib_type * culture + (attrib_type | subject) + (culture | trial), family=poisson, data = ca_df, control=glmerControl(optimizer="bobyqa"))
#boundary (singular) fit: see ?isSingular
#ca_model_binary <- glmer(attrib_binary ~ attrib_type * culture + (attrib_type | subject) + (culture | trial), family=binomial, data = ca_df, control=glmerControl(optimizer="bobyqa"))
#boundary (singular) fit: see ?isSingular
#ca_model1 <- glmer(attrib_num ~ attrib_type * culture + (attrib_type | subject) + (1 | trial), family=poisson, data = ca_df, control=glmerControl(optimizer="bobyqa"))
#boundary (singular) fit: see ?isSingular
#ca_model2 <- glmer(attrib_num ~ attrib_type * culture + (1 | subject) + (1 | trial), family=poisson, data = ca_df, control=glmerControl(optimizer="bobyqa"))
#boundary (singular) fit: see ?isSingular
#ca_model3 <- glmer(attrib_num ~ attrib_type * culture + (1 | subject), family=poisson, data = ca_df, control=glmerControl(optimizer="bobyqa"))
#boundary (singular) fit: see ?isSingular
ca_model4 <- glm(attrib_num ~ attrib_type * culture, family=poisson, data = ca_df)
ca_model4
##
## Call: glm(formula = attrib_num ~ attrib_type * culture, family = poisson,
## data = ca_df)
##
## Coefficients:
## (Intercept)
## -0.7581
## attrib_typesituation_attribution
## 0.3760
## cultureUS
## -0.2384
## attrib_typesituation_attribution:cultureUS
## 0.1819
##
## Degrees of Freedom: 1063 Total (i.e. Null); 1060 Residual
## Null Deviance: 876.3
## Residual Deviance: 845.2 AIC: 1936
summary(ca_model4)
##
## Call:
## glm(formula = attrib_num ~ attrib_type * culture, family = poisson,
## data = ca_df)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.1682 -0.9680 -0.8593 0.4089 3.4352
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.75811 0.08192 -9.254 < 2e-16
## attrib_typesituation_attribution 0.37595 0.10639 3.534 0.00041
## cultureUS -0.23842 0.13916 -1.713 0.08667
## attrib_typesituation_attribution:cultureUS 0.18185 0.17670 1.029 0.30339
##
## (Intercept) ***
## attrib_typesituation_attribution ***
## cultureUS .
## attrib_typesituation_attribution:cultureUS
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 876.34 on 1063 degrees of freedom
## Residual deviance: 845.17 on 1060 degrees of freedom
## AIC: 1935.8
##
## Number of Fisher Scoring iterations: 5
linear regression: horizon_height ~ culture
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
## -0.52762 -0.11897 -0.01028 0.11532 0.45623
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.54377 0.01441 37.731 <2e-16 ***
## cultureUS 0.02231 0.02270 0.983 0.327
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1823 on 266 degrees of freedom
## Multiple R-squared: 0.003618, Adjusted R-squared: -0.0001282
## F-statistic: 0.9658 on 1 and 266 DF, p-value: 0.3266
linear regression: sticker_area ~ culture
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
## -796443 -262419 -65288 227899 1024302
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 890587 28519 31.228 <2e-16 ***
## cultureUS -30616 44925 -0.681 0.496
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 360700 on 266 degrees of freedom
## Multiple R-squared: 0.001743, Adjusted R-squared: -0.00201
## F-statistic: 0.4644 on 1 and 266 DF, p-value: 0.4962
linear regression: sticker_number ~ culture
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
## -8.315 -4.315 -1.315 2.994 19.685
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.0062 0.4449 26.986 <2e-16 ***
## cultureUS -0.6914 0.7008 -0.987 0.325
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.628 on 266 degrees of freedom
## Multiple R-squared: 0.003646, Adjusted R-squared: -9.99e-05
## F-statistic: 0.9733 on 1 and 266 DF, p-value: 0.3247
Ebbinghaus (logistic regression): correct ~ culture * context * circle_size_difference + (circle_size_difference * condition | subject)
ebb_df <- data %>%
filter(task_name == "EBB", task_info != "HELPFUL") %>%
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)
#full model
#ebb_model <- glmer(correct ~ culture * context * size_diff + (size_diff * context | subject), family = binomial, data = ebb_df, control=glmerControl(optimizer="bobyqa"))
#convergence code 1 from bobyqa: bobyqa -- maximum number of function evaluations exceeded
#boundary (singular) fit: see ?isSingular
#model 2 (if full does not converge)
#ebb_model <- glmer(correct ~ culture * context * size_diff + (context | subject), family = binomial, data = ebb_df, control=glmerControl(optimizer="bobyqa"))
#boundary (singular) fit: see ?isSingular
#model 3
ebb_model <- glmer(correct ~ culture * context * size_diff + ( 1 | subject), family = binomial, data = ebb_df, control=glmerControl(optimizer="bobyqa"))
ebb_model
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: correct ~ culture * context * size_diff + (1 | subject)
## Data: ebb_df
## AIC BIC logLik deviance df.resid
## 7576.153 7639.082 -3779.076 7558.153 8031
## Random effects:
## Groups Name Std.Dev.
## subject (Intercept) 0.8399
## Number of obs: 8040, groups: subject, 268
## Fixed Effects:
## (Intercept) cultureUS
## -0.379169 -0.007047
## contextNC size_diff
## -3.351065 0.172673
## cultureUS:contextNC cultureUS:size_diff
## -0.566036 -0.010180
## contextNC:size_diff cultureUS:contextNC:size_diff
## -0.055415 0.030202
summary(ebb_model)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: correct ~ culture * context * size_diff + (1 | subject)
## Data: ebb_df
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 7576.2 7639.1 -3779.1 7558.2 8031
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.0822 -0.4296 -0.1375 0.5905 11.2538
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 0.7054 0.8399
## Number of obs: 8040, groups: subject, 268
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.379169 0.114871 -3.301 0.000964 ***
## cultureUS -0.007047 0.180078 -0.039 0.968785
## contextNC -3.351065 0.284546 -11.777 < 2e-16 ***
## size_diff 0.172673 0.014526 11.887 < 2e-16 ***
## cultureUS:contextNC -0.566036 0.506029 -1.119 0.263317
## cultureUS:size_diff -0.010180 0.022553 -0.451 0.651717
## contextNC:size_diff -0.055415 0.037898 -1.462 0.143680
## cultureUS:contextNC:size_diff 0.030202 0.066139 0.457 0.647930
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cltrUS cntxNC sz_dff clUS:NC clUS:_ cnNC:_
## cultureUS -0.638
## contextNC -0.267 0.171
## size_diff -0.733 0.467 0.282
## cltrUS:cnNC 0.151 -0.236 -0.560 -0.161
## cltrUS:sz_d 0.471 -0.733 -0.185 -0.640 0.254
## cntxtNC:sz_ 0.281 -0.179 -0.908 -0.381 0.511 0.245
## cltrUS:NC:_ -0.161 0.250 0.521 0.218 -0.915 -0.340 -0.573
logistic regression: first_mention ~ culture + (1 | subject),
mention_df <- data %>%
filter(task_name == "FD", resp_type == "first_mention_focal") %>%
mutate(first_mention = as.factor(case_when(
resp == "1" ~ "focal",
resp == "0" ~ "background")),
scene = trial_info) %>%
select(-resp, -task_info, -resp_type, -trial_info)
#mention_model <- glmer(first_mention ~ culture + (1 | subject)+(culture | scene), family = binomial, data = mention_df)
#Error: number of observations (=1146) < number of random effects (=1148) for term (scene | subject); the random-effects parameters are probably unidentifiable
mention_model <- glmer(first_mention ~ culture + (1 | subject) ,
family = binomial, data = mention_df)
mention_model
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: first_mention ~ culture + (1 | subject)
## Data: mention_df
## AIC BIC logLik deviance df.resid
## 2870.492 2888.334 -1432.246 2864.492 2825
## Random effects:
## Groups Name Std.Dev.
## subject (Intercept) 1.771
## Number of obs: 2828, groups: subject, 244
## Fixed Effects:
## (Intercept) cultureUS
## 0.3629 3.0427
summary(mention_model)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: first_mention ~ culture + (1 | subject)
## Data: mention_df
##
## AIC BIC logLik deviance df.resid
## 2870.5 2888.3 -1432.2 2864.5 2825
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.1413 -0.4763 0.1452 0.4924 2.0996
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 3.137 1.771
## Number of obs: 2828, groups: subject, 244
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.3629 0.1525 2.380 0.0173 *
## cultureUS 3.0427 0.3391 8.971 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## cultureUS -0.434
summary(mention_model)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: first_mention ~ culture + (1 | subject)
## Data: mention_df
##
## AIC BIC logLik deviance df.resid
## 2870.5 2888.3 -1432.2 2864.5 2825
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.1413 -0.4763 0.1452 0.4924 2.0996
##
## Random effects:
## Groups Name Variance Std.Dev.
## subject (Intercept) 3.137 1.771
## Number of obs: 2828, groups: subject, 244
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.3629 0.1525 2.380 0.0173 *
## cultureUS 3.0427 0.3391 8.971 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## cultureUS -0.434
poisson: description_num ~ description_type * culture + (description_type | subject) + (culture | scene)