descriptives
d <- d[d$age > 17,]
vector <- data.frame(d$participant, d$age, d$pt_gender, d$ethnicity, d$study)
vw <- vector %>%
group_by(d.participant) %>%
mutate(Visit = 1:n()) %>%
gather("d.age",
"d.pt_gender",
"d.ethnicity",
"d.study",
key = variable,
value = number) %>%
unite(combi, variable, Visit) %>%
spread(combi, number)
vw$d.age_1 <- as.numeric(vw$d.age_1)
vw$d.study_1 <- as.numeric(vw$d.study_1)
length(unique(d$participant[d$condition == "trust"])) #530
## [1] 529
length(unique(d$participant[d$condition == "notTrust"])) #296
## [1] 297
# merged - age
describeBy(vw$d.age_1, na.rm = T)
## Warning in describeBy(vw$d.age_1, na.rm = T): no grouping variable requested
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 823 19 1.74 19 18.68 1.48 18 45 27 6.08 67.74 0.06
# study 1
describeBy(vw$d.age_1[vw$d.study_1 == 1], na.rm = T)
## Warning in describeBy(vw$d.age_1[vw$d.study_1 == 1], na.rm = T): no grouping
## variable requested
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 202 18.89 1.41 18 18.6 0 18 28 10 3.08 13.79 0.1
# study 2
describeBy(vw$d.age_1[vw$d.study_1 == 2], na.rm = T)
## Warning in describeBy(vw$d.age_1[vw$d.study_1 == 2], na.rm = T): no grouping
## variable requested
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 221 19.31 1.63 19 19.03 1.48 18 31 13 3.59 18.58 0.11
# study 3
describeBy(vw$d.age_1[vw$d.study_1 == 3], na.rm = T)
## Warning in describeBy(vw$d.age_1[vw$d.study_1 == 3], na.rm = T): no grouping
## variable requested
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 400 18.89 1.93 18 18.53 0 18 45 27 7.46 86.81 0.1
# merged - gender
table(vw$d.pt_gender_1)
##
## female male
## 568 255
prop.table(table(vw$d.pt_gender_1))
##
## female male
## 0.690158 0.309842
# study 1
table(vw$d.pt_gender_1[vw$d.study_1 == 1])
##
## female male
## 141 61
prop.table(table(vw$d.pt_gender_1[vw$d.study_1 == 1]))
##
## female male
## 0.6980198 0.3019802
# study 2
table(vw$d.pt_gender_1[vw$d.study_1 == 2])
##
## female male
## 139 82
prop.table(table(vw$d.pt_gender_1[vw$d.study_1 == 2]))
##
## female male
## 0.6289593 0.3710407
# study 3
table(vw$d.pt_gender_1[vw$d.study_1 == 3])
##
## female male
## 288 112
prop.table(table(vw$d.pt_gender_1[vw$d.study_1 == 3]))
##
## female male
## 0.72 0.28
# merged - ethnicity
table(vw$d.ethnicity_1)
##
## Asian / Asian-American Asian/Asian-American
## 59 14
## Black / African-American Black/African-American
## 12 7
## Hispanic / Latin-American Hispanic/Latin-American
## 60 19
## Middle Eastern Mix
## 3 1
## Mix Asian/White Mix Black/White
## 5 1
## Mix Latina/White Native-Pacific Islander
## 1 1
## Native / Pacific-Islander North African
## 2 1
## Other Persian
## 21 1
## White / Caucasian-American White/Caucasian-American
## 459 156
round(prop.table(table(vw$d.ethnicity_1)), 4)
##
## Asian / Asian-American Asian/Asian-American
## 0.0717 0.0170
## Black / African-American Black/African-American
## 0.0146 0.0085
## Hispanic / Latin-American Hispanic/Latin-American
## 0.0729 0.0231
## Middle Eastern Mix
## 0.0036 0.0012
## Mix Asian/White Mix Black/White
## 0.0061 0.0012
## Mix Latina/White Native-Pacific Islander
## 0.0012 0.0012
## Native / Pacific-Islander North African
## 0.0024 0.0012
## Other Persian
## 0.0255 0.0012
## White / Caucasian-American White/Caucasian-American
## 0.5577 0.1896
# study 1
table(vw$d.ethnicity_1[vw$d.study_1 == 1])
##
## Asian/Asian-American Black/African-American Hispanic/Latin-American
## 14 7 19
## Native-Pacific Islander Other White/Caucasian-American
## 1 5 156
prop.table(table(vw$d.ethnicity_1[vw$d.study_1 == 1]))
##
## Asian/Asian-American Black/African-American Hispanic/Latin-American
## 0.069306931 0.034653465 0.094059406
## Native-Pacific Islander Other White/Caucasian-American
## 0.004950495 0.024752475 0.772277228
# study 2
table(vw$d.ethnicity_1[vw$d.study_1 == 2])
##
## Asian / Asian-American Black / African-American
## 24 3
## Hispanic / Latin-American Other
## 24 14
## White / Caucasian-American
## 156
prop.table(table(vw$d.ethnicity_1[vw$d.study_1 == 2]))
##
## Asian / Asian-American Black / African-American
## 0.10859729 0.01357466
## Hispanic / Latin-American Other
## 0.10859729 0.06334842
## White / Caucasian-American
## 0.70588235
# study 3
table(vw$d.ethnicity_1[vw$d.study_1 == 3])
##
## Asian / Asian-American Black / African-American
## 35 9
## Hispanic / Latin-American Middle Eastern
## 36 3
## Mix Mix Asian/White
## 1 5
## Mix Black/White Mix Latina/White
## 1 1
## Native / Pacific-Islander North African
## 2 1
## Other Persian
## 2 1
## White / Caucasian-American
## 303
prop.table(table(vw$d.ethnicity_1[vw$d.study_1 == 3]))
##
## Asian / Asian-American Black / African-American
## 0.0875 0.0225
## Hispanic / Latin-American Middle Eastern
## 0.0900 0.0075
## Mix Mix Asian/White
## 0.0025 0.0125
## Mix Black/White Mix Latina/White
## 0.0025 0.0025
## Native / Pacific-Islander North African
## 0.0050 0.0025
## Other Persian
## 0.0050 0.0025
## White / Caucasian-American
## 0.7575
#broken up by condition
length(unique(d1$participant[d1$condition == "trust"])) #203
## [1] 203
length(unique(d2$participant[d2$condition == "trust"])) #118
## [1] 118
length(unique(d2$participant[d2$condition == "notTrust"])) #103
## [1] 103
length(unique(d3$participant[d3$condition == "trust"])) #209
## [1] 209
length(unique(d3$participant[d3$condition == "notTrust"])) #193
## [1] 193
things to rule out
1. 3-way int: frame x trustDiff x study?
m3way <- glmer(cuedFaceTrusted_1 ~ trust_.5 * trustDiff.CUC.c * (S3v12 + S1v2) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
## fixed-effect model matrix is rank deficient so dropping 2 columns / coefficients
summary(m3way)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 * trustDiff.CUC.c * (S3v12 + S1v2) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27096.7 27215.2 -13533.3 27066.7 19968
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2111 -0.9717 0.5920 0.9515 2.0536
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07955 0.2820
## stim_female_.5 0.01149 0.1072 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.026791 0.023781 1.127 0.25993
## trust_.5 0.126151 0.048195 2.617 0.00886 **
## trustDiff.CUC.c -0.812846 0.049253 -16.503 < 2e-16 ***
## S3v12 0.011222 0.039353 0.285 0.77552
## S1v2 0.057468 0.058627 0.980 0.32697
## stim_female_.5 -0.024525 0.031693 -0.774 0.43903
## pt_female_.5 -0.004176 0.037419 -0.112 0.91114
## trust_.5:trustDiff.CUC.c -0.052836 0.102756 -0.514 0.60712
## trust_.5:S3v12 0.080751 0.083915 0.962 0.33590
## trustDiff.CUC.c:S3v12 0.328032 0.128860 2.546 0.01091 *
## trustDiff.CUC.c:S1v2 -0.097410 0.080972 -1.203 0.22897
## trust_.5:trustDiff.CUC.c:S3v12 0.041864 0.261590 0.160 0.87285
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 trD.CUC. S3v12 S1v2 st__.5 pt__.5 tr_.5:D.CUC.
## trust_.5 -0.476
## trstDf.CUC. 0.007 -0.007
## S3v12 0.450 -0.423 -0.010
## S1v2 -0.312 0.513 0.004 -0.272
## stim_fml_.5 -0.279 0.001 -0.005 -0.068 0.001
## pt_femal_.5 -0.272 -0.011 -0.013 0.038 0.041 -0.003
## tr_.5:D.CUC. -0.010 0.001 -0.231 0.007 -0.005 0.006 0.005
## trs_.5:S312 -0.402 0.561 0.007 -0.384 0.442 0.000 0.005 -0.010
## tD.CUC.:S31 -0.009 0.005 -0.602 0.008 0.003 0.004 0.007 -0.081
## tD.CUC.:S12 0.005 -0.009 -0.191 0.007 -0.020 -0.003 0.009 0.342
## t_.5:D.CUC.: 0.006 -0.006 -0.084 -0.011 -0.003 -0.008 0.004 -0.519
## t_.5:S tD.CUC.:S3 tD.CUC.:S1
## trust_.5
## trstDf.CUC.
## S3v12
## S1v2
## stim_fml_.5
## pt_femal_.5
## tr_.5:D.CUC.
## trs_.5:S312
## tD.CUC.:S31 -0.010
## tD.CUC.:S12 -0.008 -0.110
## t_.5:D.CUC.: 0.007 -0.108 0.202
## fit warnings:
## fixed-effect model matrix is rank deficient so dropping 2 columns / coefficients
2. int: frame x study?
m2 <- glmer(cuedFaceTrusted_1 ~ trust_.5 * (S3v12 + S1v2) + trustDiff.CUC.c + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
## fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
summary(m2)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 * (S3v12 + S1v2) + trustDiff.CUC.c +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27096.7 27183.7 -13537.4 27074.7 19972
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2217 -0.9745 0.5859 0.9550 2.0011
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.079441 0.28185
## stim_female_.5 0.009891 0.09946 -0.37
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.027586 0.023787 1.160 0.24616
## trust_.5 0.125303 0.048160 2.602 0.00927 **
## S3v12 0.011066 0.039356 0.281 0.77857
## S1v2 0.055802 0.058619 0.952 0.34112
## trustDiff.CUC.c -0.737071 0.032507 -22.674 < 2e-16 ***
## stim_female_.5 -0.024862 0.031642 -0.786 0.43202
## pt_female_.5 -0.004643 0.037412 -0.124 0.90123
## trust_.5:S3v12 0.082000 0.083831 0.978 0.32800
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 S3v12 S1v2 tD.CUC st__.5 pt__.5
## trust_.5 -0.476
## S3v12 0.452 -0.424
## S1v2 -0.314 0.511 -0.273
## trstDf.CUC. -0.004 -0.009 -0.009 0.003
## stim_fml_.5 -0.278 0.001 -0.069 0.002 -0.004
## pt_femal_.5 -0.272 -0.011 0.038 0.041 -0.006 -0.003
## trs_.5:S312 -0.403 0.561 -0.384 0.441 -0.004 0.000 0.005
## fit warnings:
## fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
3. int: frame x trustDiff?
m3 <- glmer(cuedFaceTrusted_1 ~ trust_.5 * trustDiff.CUC.c + (S3v12 + S1v2) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m3)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 * trustDiff.CUC.c + (S3v12 + S1v2) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27097.4 27184.3 -13537.7 27075.4 19972
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3138 -0.9749 0.5881 0.9547 2.0044
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.079814 0.28251
## stim_female_.5 0.009765 0.09882 -0.37
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.036787 0.021793 1.688 0.0914 .
## trust_.5 0.098974 0.039898 2.481 0.0131 *
## trustDiff.CUC.c -0.746502 0.036994 -20.179 <2e-16 ***
## S3v12 0.025780 0.036368 0.709 0.4784
## S1v2 0.030753 0.052646 0.584 0.5591
## stim_female_.5 -0.024799 0.031641 -0.784 0.4332
## pt_female_.5 -0.004708 0.037440 -0.126 0.8999
## trust_.5:trustDiff.CUC.c 0.039753 0.073850 0.538 0.5904
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 tD.CUC S3v12 S1v2 st__.5 pt__.5
## trust_.5 -0.331
## trstDf.CUC. 0.002 -0.009
## S3v12 0.352 -0.273 -0.008
## S1v2 -0.166 0.355 0.002 -0.125
## stim_fml_.5 -0.304 0.001 -0.005 -0.075 0.002
## pt_femal_.5 -0.295 -0.016 -0.007 0.043 0.043 -0.003
## t_.5:D.CUC. -0.015 0.005 -0.478 -0.004 0.007 0.004 0.005
4. int: stim gender x pt gender?
m4 <- glmer(cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (S3v12 + S1v2) + stim_female_.5 * pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m4)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (S3v12 + S1v2) +
## stim_female_.5 * pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27097.6 27184.5 -13537.8 27075.6 19972
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2395 -0.9745 0.5870 0.9553 2.0182
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07970 0.2823
## stim_female_.5 0.01003 0.1001 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.037758 0.021918 1.723 0.0849 .
## trust_.5 0.098880 0.039887 2.479 0.0132 *
## trustDiff.CUC.c -0.737014 0.032506 -22.673 <2e-16 ***
## S3v12 0.025902 0.036362 0.712 0.4763
## S1v2 0.030616 0.052657 0.581 0.5610
## stim_female_.5 -0.028887 0.033957 -0.851 0.3949
## pt_female_.5 -0.009131 0.039695 -0.230 0.8181
## stim_female_.5:pt_female_.5 0.022116 0.067705 0.327 0.7439
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 tD.CUC S3v12 S1v2 st__.5 pt__.5
## trust_.5 -0.328
## trstDf.CUC. -0.006 -0.008
## S3v12 0.350 -0.273 -0.011
## S1v2 -0.164 0.356 0.006 -0.126
## stim_fml_.5 -0.321 0.001 -0.004 -0.071 0.000
## pt_femal_.5 -0.314 -0.016 -0.006 0.040 0.039 0.119
## st__.5:__.5 0.111 0.001 0.002 0.003 0.004 -0.363 -0.333
0. merged studies
a. trust.5 + study + trustDiff + genders + (1|pt)
m0CC <- glmer(cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + stim_female_.5 + pt_female_.5 + S3v12 + S1v2 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m0CC)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + stim_female_.5 +
## pt_female_.5 + S3v12 + S1v2 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.036965 0.021784 1.697 0.0897 .
## trust_.5 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737039 0.032506 -22.674 <2e-16 ***
## stim_female_.5 -0.024865 0.031646 -0.786 0.4320
## pt_female_.5 -0.004815 0.037437 -0.129 0.8977
## S3v12 0.025860 0.036363 0.711 0.4770
## S1v2 0.030543 0.052659 0.580 0.5619
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 tD.CUC st__.5 pt__.5 S3v12
## trust_.5 -0.331
## trstDf.CUC. -0.006 -0.008
## stim_fml_.5 -0.303 0.001 -0.004
## pt_femal_.5 -0.295 -0.016 -0.006 -0.003
## S3v12 0.352 -0.273 -0.011 -0.075 0.043
## S1v2 -0.166 0.356 0.006 0.002 0.043 -0.126
tab_model(m0CC)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.04
|
0.99 – 1.08
|
0.090
|
|
trust_.5
|
1.10
|
1.02 – 1.19
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
S3v12
|
1.03
|
0.96 – 1.10
|
0.477
|
|
S1v2
|
1.03
|
0.93 – 1.14
|
0.562
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m0CC <- exp(confint(m0CC, method = "Wald")[2,1])
#OR_upCI_m0CC <- exp(confint(m0CC, method = "Wald")[2,2])
#OR_m0CC <- exp(summary(m0CC)$coefficients[1])
#prob_m0CC <- (OR_m0CC/ (1+OR_m0CC))
#p_m0CC <- summary(m0CC)$coefficients[1,4]
#se_m0CC <- summary(m0CC)$coefficients[1,2]
b. SE trust
m0T <- glmer(cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + stim_female_.5 + pt_female_.5 + (S1v23 + S2v3) + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m0T)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + stim_female_.5 +
## pt_female_.5 + (S1v23 + S2v3) + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.086400 0.024189 3.572 0.000354 ***
## trustYes_0 -0.098870 0.039889 -2.479 0.013188 *
## trustDiff.CUC.c -0.737038 0.032506 -22.674 < 2e-16 ***
## stim_female_.5 -0.024866 0.031646 -0.786 0.432023
## pt_female_.5 -0.004815 0.037437 -0.129 0.897670
## S1v23 0.009978 0.045511 0.219 0.826453
## S2v3 -0.041132 0.042122 -0.977 0.328814
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsY_0 tD.CUC st__.5 pt__.5 S1v23
## trustYes_0 -0.527
## trstDf.CUC. -0.012 0.008
## stim_fml_.5 -0.272 -0.001 -0.004
## pt_femal_.5 -0.280 0.016 -0.006 -0.003
## S1v23 0.088 -0.417 0.010 0.032 0.020
## S2v3 -0.169 -0.013 0.006 0.063 -0.064 -0.135
tab_model(m0T)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.09
|
1.04 – 1.14
|
<0.001
|
|
trustYes_0
|
0.91
|
0.84 – 0.98
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
S1v23
|
1.01
|
0.92 – 1.10
|
0.826
|
|
S2v3
|
0.96
|
0.88 – 1.04
|
0.329
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m0T <- exp(confint(m0T, method = "Wald")[2,1])
#OR_upCI_m0T <- exp(confint(m0T, method = "Wald")[2,2])
#OR_m0T <- exp(summary(m0T)$coefficients[1])
#prob_m0T <- (OR_m0T/ (1+OR_m0T))
#p_m0T <- summary(m0T)$coefficients[1,4]
#se_m0T <- summary(m0T)$coefficients[1,2]
c. SE not trust
m0NT <- glmer(cuedFaceTrusted_1 ~ trustNo_0 + trustDiff.CUC.c + stim_female_.5 + pt_female_.5 + (S1v23 + S2v3) + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m0NT)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustNo_0 + trustDiff.CUC.c + stim_female_.5 +
## pt_female_.5 + (S1v23 + S2v3) + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.012470 0.034052 -0.366 0.7142
## trustNo_0 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737039 0.032506 -22.674 <2e-16 ***
## stim_female_.5 -0.024866 0.031647 -0.786 0.4320
## pt_female_.5 -0.004814 0.037437 -0.129 0.8977
## S1v23 0.009979 0.045512 0.219 0.8265
## S2v3 -0.041133 0.042122 -0.977 0.3288
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsN_0 tD.CUC st__.5 pt__.5 S1v23
## trustNo_0 -0.797
## trstDf.CUC. 0.001 -0.008
## stim_fml_.5 -0.195 0.001 -0.004
## pt_femal_.5 -0.179 -0.016 -0.006 -0.003
## S1v23 -0.427 0.417 0.010 0.032 0.020
## S2v3 -0.136 0.013 0.006 0.063 -0.064 -0.135
tab_model(m0NT)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
0.99
|
0.92 – 1.06
|
0.714
|
|
trustNo_0
|
1.10
|
1.02 – 1.19
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
S1v23
|
1.01
|
0.92 – 1.10
|
0.826
|
|
S2v3
|
0.96
|
0.88 – 1.04
|
0.329
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m0NT <- exp(confint(m0NT, method = "Wald")[2,1])
#OR_upCI_m0NT <- exp(confint(m0NT, method = "Wald")[2,2])
#OR_m0NT <- exp(summary(m0NT)$coefficients[1])
#prob_m0NT <- (OR_m0NT/ (1+OR_m0NT))
#p_m0NT <- summary(m0NT)$coefficients[1,4]
#se_m0NT <- summary(m0NT)$coefficients[1,2]
1. study 1
a. trust.5 + study 1 + respTime + trustDiff + (1|pt)
m1CC <- glmer(cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (s2_1 + s3_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m1CC)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (s2_1 + s3_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.030313 0.042089 0.720 0.4714
## trust_.5 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737039 0.032506 -22.674 <2e-16 ***
## s2_1 0.030544 0.052658 0.580 0.5619
## s3_1 -0.010589 0.047505 -0.223 0.8236
## stim_female_.5 -0.024865 0.031646 -0.786 0.4320
## pt_female_.5 -0.004814 0.037437 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 tD.CUC s2_1 s3_1 st__.5
## trust_.5 -0.472
## trstDf.CUC. -0.010 -0.008
## s2_1 -0.748 0.356 0.006
## s3_1 -0.835 0.406 0.012 0.651
## stim_fml_.5 -0.180 0.001 -0.004 0.002 0.058
## pt_femal_.5 -0.168 -0.016 -0.006 0.043 -0.009 -0.003
tab_model(m1CC)[1]
## $page.style
## [1] "<style>\nhtml, body { background-color: white; }\ntable { border-collapse:collapse; border:none; }\ncaption { font-weight: bold; text-align:left; }\ntd { }\n.thead { border-top: double; text-align:center; font-style:normal; font-weight:bold; padding:0.2cm; }\n.tdata { padding:0.2cm; text-align:left; vertical-align:top; }\n.arc { background-color:#f2f2f2; }\n.summary { padding-top:0.1cm; padding-bottom:0.1cm; }\n.summarydata { text-align:left; }\n.fixedparts { font-weight:bold; text-align:left; }\n.randomparts { font-weight:bold; text-align:left; padding-top:.8em; }\n.zeroparts { font-weight:bold; text-align:left; padding-top:.8em; }\n.simplexparts { font-weight:bold; text-align:left; padding-top:.8em; }\n.lasttablerow { border-bottom: double; }\n.firsttablerow { }\n.firstsumrow { border-top:1px solid; }\n.labelcellborder { border-bottom:1px solid; }\n.depvarhead { text-align:center; border-bottom:1px solid; font-style:italic; font-weight:normal; }\n.depvarheadnodv { border-top: double; text-align:center; border-bottom:1px solid; font-style:italic; font-weight:normal; }\n.leftalign { text-align:left; }\n.centeralign { text-align:center; }\n.firsttablecol { text-align:left; }\n.footnote { font-style:italic; border-top:double black; text-align:right; }\n.subtitle { font-weight: normal; }\n.modelcolumn1 { }\n.modelcolumn2 { }\n.modelcolumn3 { }\n.modelcolumn4 { }\n.modelcolumn5 { }\n.modelcolumn6 { }\n.modelcolumn7 { }\n.col1 { }\n.col2 { }\n.col3 { }\n.col4 { }\n.col5 { }\n.col6 { }\n</style>"
#OR_lowCI_m1CC <- exp(confint(m1CC, method = "Wald")[2,1])
#OR_upCI_m1CC <- exp(confint(m1CC, method = "Wald")[2,2])
#OR_m1CC <- exp(summary(m1CC)$coefficients[1])
#prob_m1CC <- (OR_m1CC/ (1+OR_m1CC))
#p_m1CC <- summary(m1CC)$coefficients[1,4]
#se_m1CC <- summary(m1CC)$coefficients[1,2]
b. SE trust
m1T <- glmer(cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + (s2_1 + s3_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m1T)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + (s2_1 + s3_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.079748 0.037106 2.149 0.0316 *
## trustYes_0 -0.098869 0.039888 -2.479 0.0132 *
## trustDiff.CUC.c -0.737039 0.032505 -22.674 <2e-16 ***
## s2_1 0.030543 0.052658 0.580 0.5619
## s3_1 -0.010589 0.047504 -0.223 0.8236
## stim_female_.5 -0.024866 0.031646 -0.786 0.4320
## pt_female_.5 -0.004814 0.037437 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsY_0 tD.CUC s2_1 s3_1 st__.5
## trustYes_0 -0.002
## trstDf.CUC. -0.016 0.008
## s2_1 -0.657 -0.356 0.006
## s3_1 -0.729 -0.406 0.012 0.651
## stim_fml_.5 -0.203 -0.001 -0.004 0.002 0.058
## pt_femal_.5 -0.199 0.016 -0.006 0.043 -0.009 -0.003
tab_model(m1T)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.08
|
1.01 – 1.16
|
0.032
|
|
trustYes_0
|
0.91
|
0.84 – 0.98
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s2_1
|
1.03
|
0.93 – 1.14
|
0.562
|
|
s3_1
|
0.99
|
0.90 – 1.09
|
0.824
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m1T <- exp(confint(m1T, method = "Wald")[2,1])
#OR_upCI_m1T <- exp(confint(m1T, method = "Wald")[2,2])
#OR_m1T <- exp(summary(m1T)$coefficients[1])
#prob_m1T <- (OR_m1T/ (1+OR_m1T))
#p_m1T <- summary(m1T)$coefficients[1,4]
#se_m1T <- summary(m1T)$coefficients[1,2]
2. study 2
a. trust.5 + study 2 + respTime + trustDiff + (1|pt)
m2CC <- glmer(cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (s1_1 + s3_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m2CC)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (s1_1 + s3_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.060857 0.035065 1.736 0.0826 .
## trust_.5 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737039 0.032506 -22.674 <2e-16 ***
## s1_1 -0.030544 0.052659 -0.580 0.5619
## s3_1 -0.041132 0.042123 -0.976 0.3288
## stim_female_.5 -0.024865 0.031646 -0.786 0.4320
## pt_female_.5 -0.004815 0.037437 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 tD.CUC s1_1 s3_1 st__.5
## trust_.5 -0.033
## trstDf.CUC. -0.003 -0.008
## s1_1 -0.604 -0.356 -0.006
## s3_1 -0.783 0.013 0.006 0.516
## stim_fml_.5 -0.213 0.001 -0.004 -0.002 0.063
## pt_femal_.5 -0.136 -0.016 -0.006 -0.043 -0.064 -0.003
tab_model(m2CC)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.06
|
0.99 – 1.14
|
0.083
|
|
trust_.5
|
1.10
|
1.02 – 1.19
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s1_1
|
0.97
|
0.87 – 1.08
|
0.562
|
|
s3_1
|
0.96
|
0.88 – 1.04
|
0.329
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m2CC <- exp(confint(m2CC, method = "Wald")[2,1])
#OR_upCI_m2CC <- exp(confint(m2CC, method = "Wald")[2,2])
#OR_m2CC <- exp(summary(m2CC)$coefficients[1])
#prob_m2CC <- (OR_m2CC/ (1+OR_m2CC))
#p_m2CC <- summary(m2CC)$coefficients[1,4]
#se_m2CC <- summary(m2CC)$coefficients[1,2]
b. SE trust
m2T <- glmer(cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + (s1_1 + s3_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m2T)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + (s1_1 + s3_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.110294 0.039771 2.773 0.00555 **
## trustYes_0 -0.098871 0.039889 -2.479 0.01319 *
## trustDiff.CUC.c -0.737039 0.032506 -22.674 < 2e-16 ***
## s1_1 -0.030547 0.052659 -0.580 0.56186
## s3_1 -0.041134 0.042122 -0.977 0.32880
## stim_female_.5 -0.024866 0.031646 -0.786 0.43202
## pt_female_.5 -0.004815 0.037437 -0.129 0.89766
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsY_0 tD.CUC s1_1 s3_1 st__.5
## trustYes_0 -0.473
## trstDf.CUC. -0.007 0.008
## s1_1 -0.711 0.356 -0.006
## s3_1 -0.684 -0.013 0.006 0.516
## stim_fml_.5 -0.187 -0.001 -0.004 -0.002 0.063
## pt_femal_.5 -0.128 0.016 -0.006 -0.043 -0.064 -0.003
tab_model(m2T)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.12
|
1.03 – 1.21
|
0.006
|
|
trustYes_0
|
0.91
|
0.84 – 0.98
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s1_1
|
0.97
|
0.87 – 1.08
|
0.562
|
|
s3_1
|
0.96
|
0.88 – 1.04
|
0.329
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m2T <- exp(confint(m2T, method = "Wald")[2,1])
#OR_upCI_m2T <- exp(confint(m2T, method = "Wald")[2,2])
#OR_m2T <- exp(summary(m2T)$coefficients[1])
#prob_m2T <- (OR_m2T/ (1+OR_m2T))
#p_m2T <- summary(m2T)$coefficients[1,4]
#se_m2T <- summary(m2T)$coefficients[1,2]
c. SE not trust
m2NT <- glmer(cuedFaceTrusted_1 ~ trustNo_0 + trustDiff.CUC.c + (s1_1 + s3_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m2NT)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustNo_0 + trustDiff.CUC.c + (s1_1 + s3_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.011421 0.040901 0.279 0.7801
## trustNo_0 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737039 0.032506 -22.674 <2e-16 ***
## s1_1 -0.030544 0.052659 -0.580 0.5619
## s3_1 -0.041131 0.042122 -0.976 0.3288
## stim_female_.5 -0.024865 0.031647 -0.786 0.4320
## pt_female_.5 -0.004815 0.037437 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsN_0 tD.CUC s1_1 s3_1 st__.5
## trustNo_0 -0.516
## trstDf.CUC. 0.001 -0.008
## s1_1 -0.345 -0.356 -0.006
## s3_1 -0.678 0.013 0.006 0.516
## stim_fml_.5 -0.183 0.001 -0.004 -0.002 0.063
## pt_femal_.5 -0.109 -0.016 -0.006 -0.043 -0.064 -0.003
tab_model(m2NT)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.01
|
0.93 – 1.10
|
0.780
|
|
trustNo_0
|
1.10
|
1.02 – 1.19
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s1_1
|
0.97
|
0.87 – 1.08
|
0.562
|
|
s3_1
|
0.96
|
0.88 – 1.04
|
0.329
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m2NT <- exp(confint(m2NT, method = "Wald")[2,1])
#OR_upCI_m2NT <- exp(confint(m2NT, method = "Wald")[2,2])
#OR_m2NT <- exp(summary(m2NT)$coefficients[1])
#prob_m2NT <- (OR_m2NT/ (1+OR_m2NT))
#p_m2NT <- summary(m2NT)$coefficients[1,4]
#se_m2NT <- summary(m2NT)$coefficients[1,2]
3. study 3
a. trust.5 + study + respTime + trustDiff + (1|pt)
m3CC <- glmer(cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (s1_1 + s2_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m3CC)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trust_.5 + trustDiff.CUC.c + (s1_1 + s2_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.019725 0.026280 0.751 0.4529
## trust_.5 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737038 0.032506 -22.674 <2e-16 ***
## s1_1 0.010588 0.047506 0.223 0.8236
## s2_1 0.041132 0.042122 0.977 0.3288
## stim_female_.5 -0.024866 0.031647 -0.786 0.4320
## pt_female_.5 -0.004815 0.037438 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trs_.5 tD.CUC s1_1 s2_1 st__.5
## trust_.5 -0.023
## trstDf.CUC. 0.005 -0.008
## s1_1 -0.471 -0.406 -0.012
## s2_1 -0.558 -0.013 -0.006 0.314
## stim_fml_.5 -0.183 0.001 -0.004 -0.058 -0.063
## pt_femal_.5 -0.285 -0.016 -0.006 0.009 0.064 -0.003
tab_model(m3CC)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.02
|
0.97 – 1.07
|
0.453
|
|
trust_.5
|
1.10
|
1.02 – 1.19
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s1_1
|
1.01
|
0.92 – 1.11
|
0.824
|
|
s2_1
|
1.04
|
0.96 – 1.13
|
0.329
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#confint(m3CC, method = "Wald")[2,1]
#OR_lowCI_m3CC <- exp(confint(m3CC, method = "Wald")[2,1])
#OR_upCI_m3CC <- exp(confint(m3CC, method = "Wald")[2,2])
#OR_m3CC <- exp(summary(m3CC)$coefficients[1])
#prob_m3CC <- (OR_m3CC/ (1+OR_m3CC))
#p_m3CC <- summary(m3CC)$coefficients[1,4]
#se_m3CC <- summary(m3CC)$coefficients[1,2]
b. SE trust
m3T <- glmer(cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + (s1_1 + s2_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m3T)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustYes_0 + trustDiff.CUC.c + (s1_1 + s2_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.069159 0.032631 2.119 0.0341 *
## trustYes_0 -0.098868 0.039889 -2.479 0.0132 *
## trustDiff.CUC.c -0.737040 0.032506 -22.674 <2e-16 ***
## s1_1 0.010590 0.047506 0.223 0.8236
## s2_1 0.041133 0.042122 0.977 0.3288
## stim_female_.5 -0.024866 0.031647 -0.786 0.4320
## pt_female_.5 -0.004815 0.037437 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsY_0 tD.CUC s1_1 s2_1 st__.5
## trustYes_0 -0.593
## trstDf.CUC. -0.001 0.008
## s1_1 -0.627 0.406 -0.012
## s2_1 -0.457 0.013 -0.006 0.314
## stim_fml_.5 -0.146 -0.001 -0.004 -0.058 -0.063
## pt_femal_.5 -0.239 0.016 -0.006 0.009 0.064 -0.003
tab_model(m3T)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
1.07
|
1.01 – 1.14
|
0.034
|
|
trustYes_0
|
0.91
|
0.84 – 0.98
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s1_1
|
1.01
|
0.92 – 1.11
|
0.824
|
|
s2_1
|
1.04
|
0.96 – 1.13
|
0.329
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m3T <- exp(confint(m3T, method = "Wald")[2,1])
#OR_upCI_m3T <- exp(confint(m3T, method = "Wald")[2,2])
#OR_m3T <- exp(summary(m3T)$coefficients[1])
#prob_m3T <- (OR_m3T/ (1+OR_m3T))
#p_m3T <- summary(m3T)$coefficients[1,4]
#se_m3T <- summary(m3T)$coefficients[1,2]
c. SE not trust
m3NT <- glmer(cuedFaceTrusted_1 ~ trustNo_0 + trustDiff.CUC.c + (s1_1 + s2_1) + stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant), family = binomial("logit"), control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)), data = d)
summary(m3NT)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceTrusted_1 ~ trustNo_0 + trustDiff.CUC.c + (s1_1 + s2_1) +
## stim_female_.5 + pt_female_.5 + (stim_female_.5 | participant)
## Data: d
## Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
##
## AIC BIC logLik deviance df.resid
## 27095.7 27174.7 -13537.8 27075.7 19973
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.2447 -0.9748 0.5867 0.9552 2.0206
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.07973 0.2824
## stim_female_.5 0.01009 0.1005 -0.36
## Number of obs: 19983, groups: participant, 823
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.029709 0.033348 -0.891 0.3730
## trustNo_0 0.098870 0.039889 2.479 0.0132 *
## trustDiff.CUC.c -0.737038 0.032506 -22.674 <2e-16 ***
## s1_1 0.010587 0.047506 0.223 0.8236
## s2_1 0.041131 0.042122 0.976 0.3288
## stim_female_.5 -0.024866 0.031647 -0.786 0.4320
## pt_female_.5 -0.004815 0.037437 -0.129 0.8977
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) trsN_0 tD.CUC s1_1 s2_1 st__.5
## trustNo_0 -0.616
## trstDf.CUC. 0.009 -0.008
## s1_1 -0.128 -0.406 -0.012
## s2_1 -0.432 -0.013 -0.006 0.314
## stim_fml_.5 -0.145 0.001 -0.004 -0.058 -0.063
## pt_femal_.5 -0.215 -0.016 -0.006 0.009 0.064 -0.003
tab_model(m3NT)
|
|
cuedFaceTrusted_1
|
|
Predictors
|
Odds Ratios
|
CI
|
p
|
|
(Intercept)
|
0.97
|
0.91 – 1.04
|
0.373
|
|
trustNo_0
|
1.10
|
1.02 – 1.19
|
0.013
|
|
trustDiff.CUC.c
|
0.48
|
0.45 – 0.51
|
<0.001
|
|
s1_1
|
1.01
|
0.92 – 1.11
|
0.824
|
|
s2_1
|
1.04
|
0.96 – 1.13
|
0.329
|
|
stim_female_.5
|
0.98
|
0.92 – 1.04
|
0.432
|
|
pt_female_.5
|
1.00
|
0.92 – 1.07
|
0.898
|
|
Random Effects
|
|
σ2
|
3.29
|
|
τ00 participant
|
0.08
|
|
τ11 participant.stim_female_.5
|
0.01
|
|
ρ01 participant
|
-0.36
|
|
ICC
|
0.02
|
|
N participant
|
823
|
|
Observations
|
19983
|
|
Marginal R2 / Conditional R2
|
0.036 / 0.058
|
#OR_lowCI_m3NT <- exp(confint(m3NT, method = "Wald")[2,1])
#OR_upCI_m3NT <- exp(confint(m3NT, method = "Wald")[2,2])
#OR_m3NT <- exp(summary(m3NT)$coefficients[1]) #[1] -0.02554763
#prob_m3NT <- (OR_m3NT/ (1+OR_m3NT))
#p_m3NT <- summary(m3NT)$coefficients[1,4]
#se_m3NT <- summary(m3NT)$coefficients[1,2]
Forest Plots
trust condition forest plot
#```{r} setwd(“C:/Users/Dani Grant/Desktop”) data <- read.csv(“./forestplotdata.csv”, stringsAsFactors = T, header = T)
Combine the count and percent column
data\(string <- ifelse(!is.na(data\)Count), paste(data\(Count," (",round(data\)Percent,2),“)”,sep="“), NA) data\(Study <- ifelse(!is.na(data\)Study), paste(data$Study,sep=”"), NA)
The rest of the columns in the table.
tabletext <- cbind(c(“Study”,“”,data\(Study), c("Sample Size (%)","\n",data\)string), c(“Lower”,“”,data\(Low), c("Odds\nRatio","\n",data\)Odds.Ratio), c(“Upper”,“”,data\(High), c("Likelihood of\n Trusting\n Cued Face","\n",data\)cued), c(“Likelihood ofTrustingUncued Face”,“”,data\(not.cued), c("p","\n", round(data\)P.Value,3)))
(fp <- forestplot(labeltext = tabletext, graph.pos = 6, mean = c(NA, NA, data\(Odds.Ratio), lower = c(NA, NA, data\)Low), upper=c(NA, NA, data$High), title = "“, txt_gp = fpTxtGp(label = gpar(cex = 1.5), ticks = gpar(cex = 1.3), xlab = gpar(cex = 1.3)), col = fpColors(box =”darkblue“, lines =”darkblue“, zero =”gray50“), zero = 1, cex = 0.5, lineheight =”auto“, boxsize = 0.25, colgap = unit(3,”mm"), lwd.ci = 4, ci.vertices = TRUE, ci.vertices.height = 0.4))
## prob bar char
#```{r, echo = F}
test_data <- data.frame(study = c("study 1","study 2", "study 3", "merged"),
CC = c(OR_m1CC, OR_m2CC, OR_m3CC, OR_m0CC),
trust = c(OR_m1T, OR_m2T, OR_m3T, OR_m0T),
notTrust = c(NA, OR_m2NT, OR_m3NT, OR_m0NT),
lowCC = c(OR_lowCI_m1CC, OR_lowCI_m2CC, OR_lowCI_m3CC, OR_lowCI_m0CC),
low1 = c(OR_lowCI_m1T, OR_lowCI_m2T, OR_lowCI_m3T, OR_lowCI_m0T),
low2 = c(NA, OR_lowCI_m2NT, OR_lowCI_m3NT, OR_lowCI_m0NT),
highCC = c(OR_upCI_m1CC, OR_upCI_m2CC, OR_upCI_m3CC, OR_upCI_m0CC),
high1 = c(OR_upCI_m1T, OR_upCI_m2T, OR_upCI_m3T, OR_upCI_m0T),
high2 = c(NA, OR_upCI_m2NT, OR_upCI_m3NT, OR_upCI_m0NT),
pCC = c(p_m1CC, p_m2CC, p_m3CC, p_m0CC),
p1 = c(p_m1T, p_m2T, p_m3T, p_m0T),
p2 = c(NA, p_m2NT, p_m3NT, p_m0NT),
probCC = c(prob_m1CC, prob_m2CC, prob_m3CC, prob_m0CC),
prob1 = c(prob_m1T, prob_m2T, prob_m3T, prob_m0T),
prob2 = c(NA, prob_m2NT, prob_m3NT, prob_m0NT),
seCC = c(se_m1CC, se_m2CC, se_m3CC, se_m0CC),
se1 = c(se_m1T, se_m2T, se_m3T, se_m0T),
se2 = c(NA, se_m2NT, se_m3NT, se_m0NT))
test_data[,c(1,17:19)]