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"))
) %>%
#trial_num as.numeric
select(-resp, -task_info, -trial_info, -resp_type)
#rmts_model <- glmer(choice ~ culture + (trial_num | subject), family = binomial, data = rmts_df)
#rmts_model
#summary(rmts_model)
Raven (logistic regression): acc ~ culture + (1 | subject) + (1 | trial)
rv_df <- data %>%
filter(task_name == "RV") %>%
mutate(acc = as.numeric(resp)) %>%
#add trial
select(-resp, -task_info, -trial_info, -resp_type)
#rv_model <- glmer(acc ~ culture + (1 | subject) + (1 | trial), family = binomial, data = rv_df)
#rv_model
#summary(rv_model)
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
## 1.1527 -0.6006
##
## Degrees of Freedom: 101 Total (i.e. Null); 100 Residual
## Null Deviance: 125.3
## Residual Deviance: 123.4 AIC: 127.4
summary(cp_model)
##
## Call:
## glm(formula = choice ~ culture, family = binomial(link = "logit"),
## data = cp_df)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.6894 -1.4190 0.7409 0.9537 0.9537
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.1527 0.3311 3.481 0.0005 ***
## cultureUS -0.6006 0.4388 -1.369 0.1711
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 125.29 on 101 degrees of freedom
## Residual deviance: 123.38 on 100 degrees of freedom
## AIC: 127.38
##
## Number of Fisher Scoring iterations: 4
Symbolic self-inflation (linear regression): percent_inflation ~ culture
si_df <- data %>%
filter(task_name == "SI") %>%
#mutate...score = percent_inflation_score %>%
select(-resp, -task_info, -trial_info, -resp_type)
#si_model <- glm(score ~ culture, family=gaussian, data = si_df)
#si_model
#summary(si_model)
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.6931
## attrib_typesituation_attribution
## 0.1155
## cultureUS
## -0.1942
## attrib_typesituation_attribution:cultureUS
## -0.1396
##
## Degrees of Freedom: 399 Total (i.e. Null); 396 Residual
## Null Deviance: 306.6
## Residual Deviance: 302.9 AIC: 673.8
summary(ca_model4)
##
## Call:
## glm(formula = attrib_num ~ attrib_type * culture, family = poisson,
## data = ca_df)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.0595 -0.9075 -0.8966 0.6215 1.7950
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.6931 0.1429 -4.852 1.22e-06
## attrib_typesituation_attribution 0.1155 0.1964 0.588 0.557
## cultureUS -0.1942 0.2103 -0.923 0.356
## attrib_typesituation_attribution:cultureUS -0.1396 0.2946 -0.474 0.636
##
## (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: 306.55 on 399 degrees of freedom
## Residual deviance: 302.92 on 396 degrees of freedom
## AIC: 673.83
##
## 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
## -155.46 -27.38 -1.46 35.06 132.54
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 178.860 7.642 23.403 <2e-16 ***
## cultureUS 10.232 10.704 0.956 0.341
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 54.04 on 100 degrees of freedom
## Multiple R-squared: 0.009056, Adjusted R-squared: -0.0008536
## F-statistic: 0.9139 on 1 and 100 DF, p-value: 0.3414
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
## -759810 -282556 -63330 255661 987526
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 818879 48248 16.972 <2e-16 ***
## cultureUS 74173 67574 1.098 0.275
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 341200 on 100 degrees of freedom
## Multiple R-squared: 0.01191, Adjusted R-squared: 0.002024
## F-statistic: 1.205 on 1 and 100 DF, p-value: 0.275
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
## -10.077 -4.077 -1.340 3.410 17.923
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.3400 0.7845 13.181 <2e-16 ***
## cultureUS 1.7369 1.0987 1.581 0.117
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.547 on 100 degrees of freedom
## Multiple R-squared: 0.02438, Adjusted R-squared: 0.01463
## F-statistic: 2.499 on 1 and 100 DF, p-value: 0.1171
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 exceededboundary (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"))
#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 + (context | subject)
## Data: ebb_df
## AIC BIC logLik deviance df.resid
## 2786.926 2853.214 -1382.463 2764.926 3049
## Random effects:
## Groups Name Std.Dev. Corr
## subject (Intercept) 0.8639
## contextNC 1.2653 -0.82
## Number of obs: 3060, groups: subject, 102
## Fixed Effects:
## (Intercept) cultureUS
## -0.27539 0.08364
## contextNC size_diff
## -4.47143 0.16297
## cultureUS:contextNC cultureUS:size_diff
## 0.82696 0.02777
## contextNC:size_diff cultureUS:contextNC:size_diff
## 0.05385 -0.13604
summary(ebb_model)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: correct ~ culture * context * size_diff + (context | subject)
## Data: ebb_df
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 2786.9 2853.2 -1382.5 2764.9 3049
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.8427 -0.2876 -0.1405 0.5617 6.0068
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 0.7463 0.8639
## contextNC 1.6010 1.2653 -0.82
## Number of obs: 3060, groups: subject, 102
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.27539 0.20776 -1.326 0.185
## cultureUS 0.08364 0.29377 0.285 0.776
## contextNC -4.47143 0.68221 -6.554 5.59e-11 ***
## size_diff 0.16297 0.02599 6.271 3.60e-10 ***
## cultureUS:contextNC 0.82696 0.86898 0.952 0.341
## cultureUS:size_diff 0.02777 0.03735 0.744 0.457
## contextNC:size_diff 0.05385 0.07790 0.691 0.489
## cultureUS:contextNC:size_diff -0.13604 0.10581 -1.286 0.199
## ---
## 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.707
## contextNC -0.325 0.230
## size_diff -0.725 0.513 0.220
## cltrUS:cnNC 0.255 -0.361 -0.736 -0.173
## cltrUS:sz_d 0.504 -0.728 -0.153 -0.691 0.246
## cntxtNC:sz_ 0.242 -0.171 -0.876 -0.334 0.680 0.230
## cltrUS:NC:_ -0.178 0.257 0.639 0.244 -0.881 -0.353 -0.735
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)
mention_model
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: first_mention ~ culture + (1 | subject) + (culture | scene)
## Data: mention_df
## AIC BIC logLik deviance df.resid
## 850.7984 881.0626 -419.3992 838.7984 1140
## Random effects:
## Groups Name Std.Dev. Corr
## subject (Intercept) 2.0320
## scene (Intercept) 0.6289
## cultureUS 0.2455 1.00
## Number of obs: 1146, groups: subject, 82; scene, 14
## Fixed Effects:
## (Intercept) cultureUS
## 0.965 2.433
summary(mention_model)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: first_mention ~ culture + (1 | subject) + (culture | scene)
## Data: mention_df
##
## AIC BIC logLik deviance df.resid
## 850.8 881.1 -419.4 838.8 1140
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -6.1960 0.0687 0.1745 0.3450 2.6230
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## subject (Intercept) 4.12883 2.0320
## scene (Intercept) 0.39553 0.6289
## cultureUS 0.06026 0.2455 1.00
## Number of obs: 1146, groups: subject, 82; scene, 14
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.9650 0.4352 2.217 0.0266 *
## cultureUS 2.4326 0.5601 4.343 1.4e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## cultureUS -0.590
poisson: description_num ~ description_type * culture + (description_type | subject) + (culture | scene)
#fd_df <- data %>%
# filter(task_name == "FD", resp_type != "first_mention_focal") %>%
# mutate(description_num = as.numeric(resp),
# scene = trial_info,
# description_type = factor(resp_type)) %>%
# select(-resp, -task_info, -resp_type, -trial_info)
#fd_model <- glmer(description_num ~ description_type * culture + (description_type | subject) + (culture | scene), family=poisson, data = fd_df)
#fd_model
#summary(fd_model)