#contrast code trust conditions
d$trust_.5 <- ifelse(d$condition == "trust", .5, -.5)
d$trustYes_0 <- ifelse(d$condition == "trust", 0, 1)
d$trustNo_0 <- ifelse(d$condition == "trust", 1, 0)
# lots of positive skew for response time
hist(d$respTime)
#log response time
d$logRespTime <- log(d$respTime)
#log response time to make normal distribution
hist(d$logRespTime)
# mean center log response time around grand mean
d$logRespTime_grand_c <- mean(d$logRespTime) - d$logRespTime
# mean center response time around condition means
mean(d$logRespTime[d$condition == 'trust']) #1.185308
## [1] 1.185308
mean(d$logRespTime[d$condition == 'notTrust']) #1.317966
## [1] 1.317966
d$cndtMeans <- ifelse(d$condition == 'trust', 1.185308, 1.317966)
d$logRespTime_cndt_c <- d$cndtMeans - d$logRespTime
m_logRespTime <- glmer(cuedFaceChosen_1 ~ logRespTime*trust_.5 + sideCuedRight_.5 + stim_female_.5 + pt_female_.5 + (1 | participant), family=binomial, data=d)
summary(m_logRespTime)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceChosen_1 ~ logRespTime * trust_.5 + sideCuedRight_.5 +
## stim_female_.5 + pt_female_.5 + (1 | participant)
## Data: d
##
## AIC BIC logLik deviance df.resid
## 7638.3 7691.3 -3811.2 7622.3 5517
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.3151 -1.0045 0.7888 0.9607 1.4128
##
## Random effects:
## Groups Name Variance Std.Dev.
## participant (Intercept) 0.06702 0.2589
## Number of obs: 5525, groups: participant, 221
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.0444056 0.0632466 0.702 0.482615
## logRespTime -0.0009948 0.0412318 -0.024 0.980751
## trust_.5 0.4557211 0.1217102 3.744 0.000181 ***
## sideCuedRight_.5 0.0001798 0.0546960 0.003 0.997377
## stim_female_.5 -0.0129685 0.0598493 -0.217 0.828453
## pt_female_.5 0.0058342 0.0669912 0.087 0.930600
## logRespTime:trust_.5 -0.2437523 0.0823108 -2.961 0.003063 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) lgRspT trs_.5 sCR_.5 st__.5 pt__.5
## logRespTime -0.824
## trust_.5 -0.065 0.010
## sdCdRght_.5 -0.030 0.032 -0.007
## stim_fml_.5 -0.195 0.000 0.003 0.013
## pt_femal_.5 -0.190 0.064 0.011 0.002 0.004
## lgRspTm:_.5 0.013 0.040 -0.846 0.008 0.000 -0.019
p1 <- plot_model(m_logRespTime, type = "pred", terms = c("logRespTime", "trust_.5"), legend.title = "condition")
## Data were 'prettified'. Consider using `terms="logRespTime [all]"` to get smooth plots.
p1 + labs(title = "probability for cued face chosen given log response time",
x = "log response time",
y = "probability of cued face chosen to trust $4.00 with") +
scale_color_discrete(labels = c("not trust", "trust")) +
theme_sjplot()
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
m_grandCent<- glmer(cuedFaceChosen_1 ~ logRespTime_grand_c*trust_.5 + sideCuedRight_.5 + stim_female_.5 + pt_female_.5 + (1 | participant), family=binomial, data=d)
summary(m_grandCent)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula:
## cuedFaceChosen_1 ~ logRespTime_grand_c * trust_.5 + sideCuedRight_.5 +
## stim_female_.5 + pt_female_.5 + (1 | participant)
## Data: d
##
## AIC BIC logLik deviance df.resid
## 7638.3 7691.3 -3811.2 7622.3 5517
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.3152 -1.0045 0.7888 0.9607 1.4128
##
## Random effects:
## Groups Name Variance Std.Dev.
## participant (Intercept) 0.06703 0.2589
## Number of obs: 5525, groups: participant, 221
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.0431647 0.0358057 1.206 0.22800
## logRespTime_grand_c 0.0009898 0.0412320 0.024 0.98085
## trust_.5 0.1517233 0.0649486 2.336 0.01949 *
## sideCuedRight_.5 0.0001872 0.0546961 0.003 0.99727
## stim_female_.5 -0.0129685 0.0598491 -0.217 0.82845
## pt_female_.5 0.0058356 0.0669921 0.087 0.93059
## logRespTime_grand_c:trust_.5 0.2437501 0.0823113 2.961 0.00306 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) lgRT__ trs_.5 sCR_.5 st__.5 pt__.5
## lgRspTm_gr_ 0.020
## trust_.5 -0.060 -0.082
## sdCdRght_.5 -0.007 -0.032 0.000
## stim_fml_.5 -0.345 0.000 0.007 0.013
## pt_femal_.5 -0.244 -0.064 -0.009 0.002 0.004
## lgRsT__:_.5 -0.080 0.040 0.004 -0.008 0.000 0.019
p2 <- plot_model(m_grandCent, type = "pred", terms = c("logRespTime_grand_c", "trust_.5"), legend.title = "condition")
## Data were 'prettified'. Consider using `terms="logRespTime_grand_c [all]"` to get smooth plots.
p2 + labs(title = "probability for cued face chosen given log response time",
x = "grand mean centered log(RT)",
y = "probability of cued face chosen to trust $4.00 with") +
scale_color_discrete(labels = c("not trust", "trust")) +
theme_sjplot()
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
m_cndt_cent <- glmer(cuedFaceChosen_1 ~ logRespTime_cndt_c*trust_.5 + sideCuedRight_.5 + stim_female_.5 + pt_female_.5 + (1 | participant), family=binomial, data=d)
summary(m_cndt_cent)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: cuedFaceChosen_1 ~ logRespTime_cndt_c * trust_.5 + sideCuedRight_.5 +
## stim_female_.5 + pt_female_.5 + (1 | participant)
## Data: d
##
## AIC BIC logLik deviance df.resid
## 7638.3 7691.3 -3811.2 7622.3 5517
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.3152 -1.0045 0.7888 0.9607 1.4128
##
## Random effects:
## Groups Name Variance Std.Dev.
## participant (Intercept) 0.06702 0.2589
## Number of obs: 5525, groups: participant, 221
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.0512433 0.0356877 1.436 0.15104
## logRespTime_cndt_c 0.0009988 0.0412318 0.024 0.98067
## trust_.5 0.1507567 0.0647290 2.329 0.01986 *
## sideCuedRight_.5 0.0001812 0.0546961 0.003 0.99736
## stim_female_.5 -0.0129665 0.0598492 -0.217 0.82848
## pt_female_.5 0.0058336 0.0669914 0.087 0.93061
## logRespTime_cndt_c:trust_.5 0.2437586 0.0823118 2.961 0.00306 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) lgRT__ trs_.5 sCR_.5 st__.5 pt__.5
## lgRspTm_cn_ 0.018
## trust_.5 -0.058 0.002
## sdCdRght_.5 -0.007 -0.032 -0.003
## stim_fml_.5 -0.346 0.000 0.007 0.013
## pt_femal_.5 -0.242 -0.064 -0.015 0.002 0.004
## lgRsT__:_.5 -0.004 0.040 0.002 -0.008 0.000 0.019
p3 <- plot_model(m_cndt_cent, type = "pred", terms = c("logRespTime_cndt_c", "trust_.5"), legend.title = "condition")
## Data were 'prettified'. Consider using `terms="logRespTime_cndt_c [all]"` to get smooth plots.
p3 + labs(title = "probability for cued face chosen given log response time",
x = "mean centered within trust condition log(RT)",
y = "probability of cued face chosen to trust $4.00 with") +
scale_color_discrete(labels = c("not trust", "trust")) +
theme_sjplot()
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
Interpretation:
Early on, there is no signficant increase in the probability to choosing the cued face over the uncued face. However, as time goes on, when a person is asked “who do you choose to trust?”, the probability of them choosing the cued face increases. When they are asked, “who do you choose not to trust?” the probability of choosing the cued face also increases with time. So, what this interaction is hinting at, is that early on in the decision-making process they choose at random, no matter what assessment they aim to make. However, as they take more time to decide, they are more likley to choose the cued face whether they are being asked “who do you trust?” or “who do you not trust?”
m3 <- glmer(cuedFaceChosen_1 ~ logRespTime_cndt_c*condition + sideCuedRight_.5 + stim_female_.5 + pt_female_.5 + (1 | participant), family=binomial, data=d)
p3 <- plot_model(m3, type = "pred", terms = c("condition"), legend.title = "condition")
p3 + labs(title = " ",
x = "phrasing condition",
y = "probability for cued face chosen to trust with $4.00") + theme_sjplot()
Interpretation:
Nothing changes for the main effect of phrasing condition after including response time interaction. On average, participants have a 49.3% probability of choosing to trust the cued face with $4.00. Meaning, on average they physically click on the cued face when asked “who do you choose not to trust?” more often than not.
On average, however, participants have a 53% probability of choosing to trust the cued face with $4.00 in the trust condition. So, here again, they physically click on the cued face when asked “who do you choose to trust?” more often than not.