Longitudinal Analyses: 42 months, 48 months, 54 months, Longitudinal
library(brms)
library(DHARMa)
library(tidyverse)
library(readxl)
library(rmarkdown)
library(tidybayes)
library(plotrix)
library(GGally)
library(ggpubr)
library(sjPlot)
library(tidybayes)
library(patchwork)
Open prepped files – these come DOD_42mo.RMD, DOD_48mo.RMD and DOD_54mo.RMD. In those files, I removed missing data and created a variable to indicate whether participants produced at least 1 DOD, and also calculated the number of missing trials per participant. I then saved those datasets so I don’t have to re-run those processing steps.
DOD_42mo_prepped <- read_excel("DOD_42mo_prepped.xlsx") %>%
mutate(COVID.Zoom.session = NA)
DOD_48mo_prepped <- read_excel("DOD_48mo_prepped.xlsx") %>%
mutate(COVID.Zoom.session = NA)
DOD_54mo_prepped <- read_excel("DOD_54mo_prepped.xlsx")
Add indicator variable for time, select appropriate variables.
DOD_42mo<- DOD_42mo_prepped %>%
mutate(
Time = -1,
Time_c = "42",
PartSession = paste(Blind_ID, Time, sep="")
) %>%
dplyr::select("Blind_ID", "Time", "Time_c", "PartSession", "List", "Item", "Prime.verb", "Target.verb", "Prime.Type", "Verb.match", "RESPONSE.CODE", "Prime", "Overlap", "bias", "biasmatch", "biasmismatchc", "Trial_Problem", "COVID.Zoom.session")
DOD_48mo<- DOD_48mo_prepped %>%
mutate(
Time = 0,
Time_c = "48",
PartSession = paste(Blind_ID, Time, sep="")
) %>%
dplyr::select("Blind_ID", "Time", "Time_c", "PartSession", "List", "Item", "Prime.verb", "Target.verb", "Prime.Type", "Verb.match", "RESPONSE.CODE", "Prime", "Overlap", "bias", "biasmatch", "biasmismatchc", "Trial_Problem", "COVID.Zoom.session")
DOD_54mo<- DOD_54mo_prepped %>%
mutate(
Time = 1,
Time_c = "54",
PartSession = paste(Blind_ID, Time_c, sep="")
) %>%
dplyr::select("Blind_ID", "Time", "Time_c", "PartSession", "List", "Item", "Prime.verb", "Target.verb", "Prime.Type", "Verb.match", "RESPONSE.CODE", "Prime", "Overlap", "bias", "biasmatch", "biasmismatchc", "Trial_Problem", "COVID.Zoom.session")
Attach DOD Prod variable from first session – to model exclusively trajectory of participants who produced DODs during the first session.
Combined = bind_rows(DOD_42mo, DOD_48mo, DOD_54mo)
Combined <- DOD_42mo_prepped %>%
group_by(Blind_ID) %>%
dplyr::select("Blind_ID", "Prod_DOD") %>%
slice(1) %>%
full_join(Combined, ., by = "Blind_ID")
Combined$Time_sum <- factor(Combined$Time_c, levels=c("54", "48", "42"))
contrasts(Combined$Time_sum) = contr.sum(3)
contrasts(Combined$Time_sum)
## [,1] [,2]
## 54 1 0
## 48 0 1
## 42 -1 -1
Plot effects by time point–to see if priming effect seems to decrease and lexical boost seems to increase by age.
(p0 <- Combined %>%
group_by(Prime, Overlap, Time_c) %>%
summarise(mean = mean(RESPONSE.CODE, na.rm=TRUE),
ci_u = 1.92*(std.error(RESPONSE.CODE, na.rm=TRUE))) %>%
ggplot(aes(y=mean, x=Overlap, fill=Prime, ymin=mean, ymax=mean+ci_u)) +
geom_bar(stat="identity",position="dodge") +
geom_errorbar(width=.4,
position=position_dodge(.9)) +
facet_wrap(~Time_c) +
ylim(0, .4) +
theme_minimal() +
labs(y="Raw Mean") +
theme(legend.position = "none")
)
## `summarise()` has grouped output by 'Prime', 'Overlap'. You can override using
## the `.groups` argument.
Truncated gaussian with SD of 2 on random effect SDs. Keeps 95% of probability < 4 (roughly). A random effect SD greater than that is a bit wild on the logit scale.
logit_prior = prior(normal(0,2), class=sd)
Model with nested random effects: ID by Time.
mlong0 <- brm(RESPONSE.CODE ~ 1 + Time_sum + (1 | Blind_ID:Time_c) + (1 + Time_sum | Blind_ID) + (1 | Target.verb), control=list(adapt_delta = .90), family="bernoulli", prior=logit_prior, iter=4000, cores=4, data=Combined,seed=12345, file="LONG/output/mlong0.rds")
mlong0 <- add_criterion(mlong0, "loo")
summary(mlong0, prob=.9)$fixed
## Estimate Est.Error l-90% CI u-90% CI Rhat Bulk_ESS
## Intercept -2.90301283 0.6396881 -3.8769394 -1.8097363 1.001503 1898.108
## Time_sum1 -0.18799249 0.1828638 -0.4913020 0.1042131 1.000013 3787.923
## Time_sum2 0.02791942 0.1971931 -0.2922597 0.3466918 1.000295 3187.440
## Tail_ESS
## Intercept 2847.960
## Time_sum1 5792.370
## Time_sum2 5100.847
Random effects by participant, with no additional dependence between trials in a given session.
mlong0b <- brm(RESPONSE.CODE ~ 1 + Time_sum + (1 + Time_sum | Blind_ID) + (1 | Target.verb), control=list(adapt_delta=.9), family="bernoulli", prior=logit_prior, iter=4000, cores=4, data=Combined,seed=12345, file="LONG/output/mlong0b.rds")
mlong0b <- add_criterion(mlong0b, "loo")
summary(mlong0b)$fixed
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -2.9161955 0.6445195 -4.1300093 -1.5428124 1.000761 2804.479 4003.626
## Time_sum1 -0.1695697 0.1911754 -0.5462145 0.1938357 1.000124 5688.459 5703.736
## Time_sum2 0.0125815 0.2130766 -0.4157027 0.4233535 1.000429 4634.789 5224.648
#loo1 <- loo(mlong0)
#loo2 <- loo(mlong0b)
#loo3 <- reloo(mlong0b, loo2)
#model_weights(mlong0, mlong0b)
#loo_compare(loo3, loo1)
Model with within session random effects fits numerically better (though less than 1 SE elpd diff = -.4, SE = .9), but given the extra complexity, and the redundancy (slopes for time point are indistinguishable from time-point specific intercepts), I think it’s best to keep the simpler model. Additionally, I’ve run into several convergence issues with the full model.
For all models, I fit a model wi
Just to remember how everything is coded:
contrasts(Combined$Time_sum)
## [,1] [,2]
## 54 1 0
## 48 0 1
## 42 -1 -1
table(Combined$Prime.Type, Combined$Prime)
##
## DOD POD
## -0.5 0 1446
## 0.5 1419 0
table(Combined$Overlap)
##
## No Overlap Overlap
## 1355 1510
A problem with the linear model is that it makes a pretty strict assumption about the trajectory (that it’s equal between 54 and 48 and 48 and 42 months). Here I treat time categorically, using effects coding (-1, 1).
mlong_eff <- brm(RESPONSE.CODE ~ 1 + Time_sum*Prime.Type*Overlap +
(1 + Time_sum*Prime.Type*Overlap | Blind_ID ) +
(1 + Time_sum*Prime.Type*Overlap | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
cores=4,
seed=12345,
data=Combined,
file="LONG/output/mlong_eff.rds")
mlong_eff <- add_criterion(mlong_eff, "loo")
Trace plots (commented for space)
#plot(mlong_eff, N = 4)
Look at residuals
mlong_eff.model.check <- createDHARMa(
simulatedResponse = t(posterior_predict(mlong_eff)),
observedResponse = Combined$RESPONSE.CODE,
fittedPredictedResponse = apply(t(posterior_epred(mlong_eff)), 1, mean),
integerResponse=TRUE
)
plot(mlong_eff.model.check) # standard plots
testDispersion(mlong_eff.model.check)
##
## DHARMa nonparametric dispersion test via sd of residuals fitted vs.
## simulated
##
## data: simulationOutput
## dispersion = 0.72622, p-value < 2.2e-16
## alternative hypothesis: two.sided
plotResiduals(mlong_eff.model.check, form=Combined$Time_sum)
Again, we have underdispersion and a very weak trend in the residuals vs fitted values.
summary(mlong_eff, prob=.9)$fixed
## Estimate Est.Error l-90% CI u-90% CI
## Intercept -3.0312660 0.8549478 -4.3746539 -1.5607215
## Time_sum1 -0.2588566 0.3250338 -0.7983414 0.2638931
## Time_sum2 0.2205978 0.2939442 -0.2567553 0.7013722
## Prime.Type 0.6169287 0.3222499 0.1184692 1.1507760
## OverlapOverlap -1.0010990 0.4065189 -1.6457270 -0.3560187
## Time_sum1:Prime.Type 0.3110120 0.4416843 -0.4129051 1.0125459
## Time_sum2:Prime.Type -0.1122013 0.3734383 -0.7151050 0.4973341
## Time_sum1:OverlapOverlap 0.4907467 0.5380950 -0.3187667 1.3899418
## Time_sum2:OverlapOverlap -0.3767525 0.3283955 -0.8896421 0.1531646
## Prime.Type:OverlapOverlap 1.4776504 0.6357077 0.5139654 2.5608167
## Time_sum1:Prime.Type:OverlapOverlap -0.7430864 0.7786027 -2.0139687 0.5137010
## Time_sum2:Prime.Type:OverlapOverlap 0.6076502 0.6294585 -0.3864828 1.6744396
## Rhat Bulk_ESS Tail_ESS
## Intercept 1.002178 1565.885 2575.088
## Time_sum1 1.001019 3584.575 4365.895
## Time_sum2 1.000316 3110.602 4430.052
## Prime.Type 1.001338 4001.858 4124.043
## OverlapOverlap 1.001268 2930.794 3730.949
## Time_sum1:Prime.Type 1.000433 4192.804 4172.082
## Time_sum2:Prime.Type 1.000117 5369.447 5099.234
## Time_sum1:OverlapOverlap 1.002213 3673.954 4272.106
## Time_sum2:OverlapOverlap 1.000692 4590.521 4671.631
## Prime.Type:OverlapOverlap 1.000313 4235.138 4170.005
## Time_sum1:Prime.Type:OverlapOverlap 1.000526 3890.403 4308.942
## Time_sum2:Prime.Type:OverlapOverlap 1.001048 4471.004 4526.723
hypothesis(mlong_eff, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.62 0.32 0.12 1.15 44.98 0.98
## Star
## 1 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong_eff, "Time_sum1:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.31 0.44 -0.41 1.01 0.29
## Post.Prob Star
## 1 0.22
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong_eff, "Time_sum2:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 -0.11 0.37 -0.72 0.5 1.66
## Post.Prob Star
## 1 0.62
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong_eff, "Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:Overl... > 0 1.48 0.64 0.51 2.56 102.9
## Post.Prob Star
## 1 0.99 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong_eff, "Time_sum1:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.74 0.78 -2.01 0.51 0.18
## Post.Prob Star
## 1 0.15
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong_eff, "Time_sum2:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 0.61 0.63 -0.39 1.67 5.45
## Post.Prob Star
## 1 0.84
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
Plot, predicted values vs data
p0<- p0 + theme(axis.title.x = element_blank())
p2 <- fitted(mlong_eff, re_formula=NA, scale="response") %>%
cbind(Combined) %>%
dplyr::select(Prime, Overlap, Time_c, Estimate, Est.Error) %>%
ggplot(aes(y=Estimate, x=Overlap, fill=Prime )) +
geom_bar(stat="identity",position="dodge") +
geom_errorbar(aes(ymin=Estimate, ymax=Estimate+Est.Error), width=.2,
position=position_dodge(.9)) +
facet_wrap(~Time_c) +
theme_minimal() +
ylim(0, .4) +
labs(y="Predicted Probability") +
theme(legend.position = "none",
strip.text = element_blank())
p0/p2
ggsave("plots/Fig5.png", last_plot(), dpi=500)
## Saving 7 x 5 in image
Get the time point specific effects (abstract priming effect, lexical boost and priming effect with lexical overlap)
# First make dummy data set with fixed effects only, to get posterior samples for each crossing of Time x Prime Structure x Overlap
df <- tibble( # Design matrix (minus intercept which is automatic)
Overlap = factor(rep(c(0, 0, 1, 1), 3), labels = c("No Overlap", "Overlap")),
Prime.Type = rep(c(-.5, .5, -.5, .5), 3),
Time_sum = c(rep(54, 4), rep(48, 4), rep(42, 4))
)
# Getting samples on logit scale
ps_means <- posterior_linpred(mlong_eff, newdata=df, re_formula=NA) %>%
t() %>%
as_tibble() %>%
bind_cols(df, .) %>%
pivot_longer(starts_with("V"), names_to="sample", values_to="linpred") %>%
mutate( # some re-coding to make things more readable later
Time_c = ifelse(Time_sum==54, yes="54", no =
ifelse(Time_sum==48, yes="48", no = "42")),
Prime.Type = ifelse(Prime.Type == .5, yes="DOD", no = "POD"),
Overlap = ifelse(Overlap=="Overlap", yes="Ov", no = "No")
) %>%
dplyr::select(-"Time_sum") %>%
pivot_wider(names_from=c("Overlap", "Prime.Type", "Time_c"), values_from="linpred") %>%
mutate( # calculate time-point specific effects
Abstract_42 = No_DOD_42 - No_POD_42,
LexOver_42 = Ov_DOD_42 - Ov_POD_42,
Abstract_48 = No_DOD_48 - No_POD_48,
LexOver_48 = Ov_DOD_48 - Ov_POD_48,
Abstract_54 = No_DOD_54 - No_POD_54,
LexOver_54= Ov_DOD_54- Ov_POD_54,
LB_42 = LexOver_42 - Abstract_42,
LB_48 = LexOver_48 - Abstract_48,
LB_54 = LexOver_54 - Abstract_54
) %>%
dplyr::select("sample", starts_with(c("Abs", "Lex", "LB"))) %>%
pivot_longer(
starts_with(c("Abs", "Lex", "LB")),
names_to = c("Effect", "Time"),
names_sep = "_",
values_to = "Logits"
) %>%
mutate(
Effect = ifelse(Effect=="Abstract", yes = Effect, no = ifelse(
Effect=="LexOver", yes = "Overlap", no = "Lexical Boost")),
Time = paste(Time, "months"),
Condition = paste(Time, Effect)
)
## Warning: The `x` argument of `as_tibble.matrix()` must have unique column names if
## `.name_repair` is omitted as of tibble 2.0.0.
## i Using compatibility `.name_repair`.
ps_means_p <- ps_means %>%
group_by(Condition) %>%
summarise(
P = sum(Logits > 0)/8000 # calculate proportion of samples above 0 for each effect
)
p1 <- ps_means %>% # plot priming effects with and without overlap
filter(Effect != "Lexical Boost") %>%
ggplot(aes(y=Condition, x=Logits)) + stat_halfeye(.width=c(.66, .90)) + geom_vline(xintercept = 0) + theme_minimal() +
annotate("text", x=7, y=6.15, label= paste("p =", round(ps_means_p[9, 2], 2))) +
annotate("text", x=7, y=5.15, label= paste("p =", round(ps_means_p[7, 2], 2))) +
annotate("text", x=7, y=4.15, label= paste("p =", round(ps_means_p[6, 2], 2))) +
annotate("text", x=7, y=3.15, label= paste("p =", round(ps_means_p[4, 2], 2))) +
annotate("text", x=7, y=2.15, label= paste("p =", round(ps_means_p[3, 2], 2))) +
annotate("text", x=7, y=1.15, label= paste("p =", round(ps_means_p[1, 2], 2))) +
theme(axis.title.x=element_blank(), axis.title.y=element_blank(), axis.text.x=element_blank())
p2 <- ps_means %>% # plot lexical boosts
filter(Effect == "Lexical Boost") %>%
ggplot(aes(y=Condition, x=Logits)) + stat_halfeyeh(.width=c(.66, .90)) + geom_vline(xintercept = 0) + theme_minimal() +
annotate("text", x=7, y=3.15, label= paste("p =", round(ps_means_p[8, 2], 2))) +
annotate("text", x=7, y=2.15, label= paste("p =", round(ps_means_p[5, 2], 2))) +
annotate("text", x=7, y=1.15, label= paste("p =", round(ps_means_p[2, 2], 2))) +
labs(y="Effect") +
theme(axis.title.y=element_blank())
## Warning: 'stat_halfeyeh' is deprecated.
## Use 'stat_halfeye' instead.
## See help("Deprecated") and help("tidybayes-deprecated").
(p1 / p2) + labs(y = "Effect")
ggsave("plots/Fig6.png", last_plot(), dpi=500)
## Saving 7 x 5 in image
I have also run some sensitivity analyses, which were suppressed from the R Markdown file. These tested whether (a) dropping participants who completed the 54 month sesison on Zoom, (b) dropping the mis-administered trial, (c) forcing uncorrelated random effects or (d) dropping trials with high pareto’s K changed the results. Results were qualitatively similar to those above. For space reasons I have suppressed these from the html file, but see R markdown file associated with this project for more information.
Include only participants who produced a DOD at first time point.
This model gave some divergent transitions and low effective sample sizes, so I up-ed the adapt delta and added some more iterations.
Combined2 <- filter(Combined, Prod_DOD > 0)
mlong2_eff <- brm(RESPONSE.CODE ~ 1 + Time_sum*Prime.Type*Overlap +
(1 + Time_sum*Prime.Type*Overlap | Blind_ID) +
(1 + Time_sum*Prime.Type*Overlap | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=5000,
cores=4,
seed=12345,
control=list(adapt_delta=.95),
data=Combined2,
file="LONG/output/mlong2_eff.rds")
mlong2_eff <- add_criterion(mlong2_eff, "loo")
#plot(mlong2_eff, N= 4)
mlong2_eff.model.check <- createDHARMa(
simulatedResponse = t(posterior_predict(mlong2_eff)),
observedResponse = Combined2$RESPONSE.CODE,
fittedPredictedResponse = apply(t(posterior_epred(mlong2_eff)), 1, mean),
integerResponse=TRUE
)
plot(mlong2_eff.model.check) # standard plots
## DHARMa:testOutliers with type = binomial may have inflated Type I error rates for integer-valued distributions. To get a more exact result, it is recommended to re-run testOutliers with type = 'bootstrap'. See ?testOutliers for details
testDispersion(mlong2_eff.model.check)
##
## DHARMa nonparametric dispersion test via sd of residuals fitted vs.
## simulated
##
## data: simulationOutput
## dispersion = 0.69737, p-value < 2.2e-16
## alternative hypothesis: two.sided
plotResiduals(mlong2_eff.model.check, form=Combined2$Time_sum)
Significant difference in residual variances across time (in particular, more undersdispersion at last time point)
summary(mlong2_eff)$fixed
## Estimate Est.Error l-95% CI u-95% CI
## Intercept -2.32645220 0.8865980 -4.0093346 -0.4661804
## Time_sum1 -0.54971387 0.4097927 -1.3945221 0.2514227
## Time_sum2 -0.40248303 0.3498083 -1.1153815 0.2636639
## Prime.Type 0.60058708 0.4235028 -0.1891931 1.4798969
## OverlapOverlap -1.14608547 0.4856274 -2.1975009 -0.2684393
## Time_sum1:Prime.Type -0.02866171 0.5074409 -1.0549500 0.9552859
## Time_sum2:Prime.Type 0.13921543 0.4862987 -0.7977964 1.0992696
## Time_sum1:OverlapOverlap 0.11120742 0.6589775 -1.1802128 1.4536143
## Time_sum2:OverlapOverlap -0.13708739 0.4972115 -1.1188479 0.8382416
## Prime.Type:OverlapOverlap 2.07772073 0.9192851 0.3587913 4.0255821
## Time_sum1:Prime.Type:OverlapOverlap -0.13108920 0.8362947 -1.8189339 1.4981539
## Time_sum2:Prime.Type:OverlapOverlap 0.06320939 0.8265207 -1.4994080 1.7488969
## Rhat Bulk_ESS Tail_ESS
## Intercept 1.0004938 3007.830 5223.710
## Time_sum1 0.9999707 6487.111 5534.679
## Time_sum2 1.0005988 6004.676 5817.865
## Prime.Type 1.0004425 7504.172 7502.811
## OverlapOverlap 1.0009754 5138.638 6875.435
## Time_sum1:Prime.Type 1.0002606 8222.877 6744.853
## Time_sum2:Prime.Type 1.0004784 8079.467 6860.411
## Time_sum1:OverlapOverlap 1.0003730 5704.203 6016.118
## Time_sum2:OverlapOverlap 1.0001887 7425.760 5664.096
## Prime.Type:OverlapOverlap 1.0001290 6623.562 6533.937
## Time_sum1:Prime.Type:OverlapOverlap 0.9999754 8265.991 7087.933
## Time_sum2:Prime.Type:OverlapOverlap 0.9999875 7074.946 6908.085
hypothesis(mlong2_eff, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.6 0.42 -0.05 1.29 14.65 0.94
## Star
## 1
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_eff, "Time_sum1:Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.03 0.51 -0.87 0.79 0.9
## Post.Prob Star
## 1 0.47
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_eff, "Time_sum2:Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 0.14 0.49 -0.64 0.93 1.6
## Post.Prob Star
## 1 0.62
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_eff, "Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:Overl... > 0 2.08 0.92 0.66 3.64 88.29
## Post.Prob Star
## 1 0.99 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_eff, "Time_sum1:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.13 0.84 -1.51 1.21 0.77
## Post.Prob Star
## 1 0.43
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_eff, "Time_sum2:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 0.06 0.83 -1.25 1.43 1.09
## Post.Prob Star
## 1 0.52
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
Check if conditional effects differ.
df <- tibble( # Design matrix (minus intercept which is automatic)
Overlap = factor(rep(c(0, 0, 1, 1), 3), labels = c("No Overlap", "Overlap")),
Prime.Type = rep(c(-.5, .5, -.5, .5), 3),
Time_sum = c(rep(54, 4), rep(48, 4), rep(42, 4))
)
ps_means <- posterior_linpred(mlong2_eff, newdata=df, re_formula=NA) %>%
t() %>% # posterior samples of linear predictor.
as_tibble() %>%
bind_cols(df, .) %>%
pivot_longer(starts_with("V"), names_to="sample", values_to="linpred") %>%
mutate(
Time_c = ifelse(Time_sum==54, yes="54", no =
ifelse(Time_sum==48, yes="48", no = "42")),
Prime.Type = ifelse(Prime.Type == .5, yes="DOD", no = "POD"),
Overlap = ifelse(Overlap=="Overlap", yes="Ov", no = "No")
) %>%
dplyr::select(-"Time_sum") %>%
pivot_wider(names_from=c("Overlap", "Prime.Type", "Time_c"), values_from="linpred") %>%
mutate(
Abstract_42 = No_DOD_42 - No_POD_42,
LexOver_42 = Ov_DOD_42 - Ov_POD_42,
Abstract_48 = No_DOD_48 - No_POD_48,
LexOver_48 = Ov_DOD_48 - Ov_POD_48,
Abstract_54 = No_DOD_54 - No_POD_54,
LexOver_54= Ov_DOD_54- Ov_POD_54,
LB_42 = LexOver_42 - Abstract_42,
LB_48 = LexOver_48 - Abstract_48,
LB_54 = LexOver_54 - Abstract_54
) %>%
dplyr::select("sample", starts_with(c("Abs", "Lex", "LB"))) %>%
pivot_longer(
starts_with(c("Abs", "Lex", "LB")),
names_to = c("Effect", "Time"),
names_sep = "_",
values_to = "Logits"
) %>%
mutate(
Effect = ifelse(Effect=="Abstract", yes = Effect, no = ifelse(
Effect=="LexOver", yes = "Overlap", no = "Lexical Boost")),
Time = paste(Time, "months"),
Condition = paste(Time, Effect)
)
ps_means_p <- ps_means %>%
group_by(Condition) %>%
summarise(
P = sum(Logits > 0)/10000
)
p1 <- ps_means %>%
filter(Effect != "Lexical Boost") %>%
ggplot(aes(y=Condition, x=Logits)) + stat_halfeye(.width=c(.66, .90)) + geom_vline(xintercept = 0) + theme_minimal() +
annotate("text", x=7, y=6.15, label= paste("p =", round(ps_means_p[9, 2], 2))) +
annotate("text", x=7, y=5.15, label= paste("p =", round(ps_means_p[7, 2], 2))) +
annotate("text", x=7, y=4.15, label= paste("p =", round(ps_means_p[6, 2], 2))) +
annotate("text", x=7, y=3.15, label= paste("p =", round(ps_means_p[4, 2], 2))) +
annotate("text", x=7, y=2.15, label= paste("p =", round(ps_means_p[3, 2], 2))) +
annotate("text", x=7, y=1.15, label= paste("p =", round(ps_means_p[1, 2], 2))) +
theme(axis.title.x=element_blank(), axis.title.y=element_blank(), axis.text.x=element_blank())
p2 <- ps_means %>%
filter(Effect == "Lexical Boost") %>%
ggplot(aes(y=Condition, x=Logits)) + stat_halfeyeh(.width=c(.66, .90)) + geom_vline(xintercept = 0) + theme_minimal() +
annotate("text", x=7, y=3.15, label= paste("p =", round(ps_means_p[8, 2], 2))) +
annotate("text", x=7, y=2.15, label= paste("p =", round(ps_means_p[5, 2], 2))) +
annotate("text", x=7, y=1.15, label= paste("p =", round(ps_means_p[2, 2], 2))) +
labs(y="Effect") +
theme(axis.title.y=element_blank())
## Warning: 'stat_halfeyeh' is deprecated.
## Use 'stat_halfeye' instead.
## See help("Deprecated") and help("tidybayes-deprecated").
(p1 / p2) + labs(y = "Effect")
ggsave("plots/Fig7.png", last_plot(), dpi=500)
## Saving 7 x 5 in image
I’ve conducted the same sensitivity analyses as before, but excluded them from the html file.
# Drop participants who completed 54 month session on zoom
mlong2_effa <- Combined2 %>%
filter(is.na(COVID.Zoom.session)) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*Prime.Type*Overlap +
(1 + Time_sum*Prime.Type*Overlap| Blind_ID ) +
(1 + Time_sum*Prime.Type*Overlap | Target.verb),
family="bernoulli",
iter=2000,
cores=4,
prior=logit_prior,
seed=12345,
data=.,
file="LONG/output/mlong2_effa.rds")
hypothesis(mlong2_effa, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.55 0.46 -0.16 1.29 9.05 0.9
## Star
## 1
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effa, "Time_sum1:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 -0.13 0.54 -1.04 0.73 1.37
## Post.Prob Star
## 1 0.58
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effa, "Time_sum2:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.17 0.5 -0.62 0.97 0.55
## Post.Prob Star
## 1 0.36
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effa, "Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:Overl... > 0 2.04 0.89 0.71 3.54 67.97
## Post.Prob Star
## 1 0.99 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effa, "Time_sum1:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.04 0.9 -1.48 1.43 0.94
## Post.Prob Star
## 1 0.49
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effa, "Time_sum2:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 0.01 0.82 -1.28 1.38 0.95
## Post.Prob Star
## 1 0.49
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
# Drop problematic trial
mlong2_effb <- Combined2 %>%
filter(Trial_Problem == 0) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*Prime.Type*Overlap +
(1 + Time_sum*Prime.Type*Overlap| Blind_ID ) +
(1 + Time_sum*Prime.Type*Overlap | Target.verb),
family="bernoulli",
iter=2000,
cores=4,
prior=logit_prior,
seed=12345,
data=.,
file="LONG/output/mlong2_effb.rds")
hypothesis(mlong2_effb, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.61 0.43 -0.04 1.3 15.46 0.94
## Star
## 1
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effb, "Time_sum1:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0 0.51 -0.85 0.79 0.94
## Post.Prob Star
## 1 0.48
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effb, "Time_sum2:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.13 0.47 -0.63 0.9 0.63
## Post.Prob Star
## 1 0.39
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effb, "Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:Overl... > 0 2.17 0.96 0.7 3.77 60.54
## Post.Prob Star
## 1 0.98 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effb, "Time_sum1:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.14 0.88 -1.58 1.3 0.76
## Post.Prob Star
## 1 0.43
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effb, "Time_sum2:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 0.24 0.83 -1.11 1.6 1.54
## Post.Prob Star
## 1 0.61
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
# uncorrelated random effects
mlong2_effc <- brm(RESPONSE.CODE ~ 1 + Time_sum*Prime.Type*Overlap +
(1 + Time_sum*Prime.Type*Overlap|| Blind_ID ) +
(1 + Time_sum*Prime.Type*Overlap || Target.verb),
family="bernoulli",
prior=logit_prior,
iter=2000,
cores=4,
seed=12345,
data=Combined2,
file="LONG/output/mlong2_effc.rds")
hypothesis(mlong2_effc, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.53 0.39 -0.07 1.17 13.39 0.93
## Star
## 1
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effc, "Time_sum1:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 -0.07 0.49 -0.9 0.68 1.25
## Post.Prob Star
## 1 0.56
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effc, "Time_sum2:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.06 0.47 -0.71 0.84 0.84
## Post.Prob Star
## 1 0.46
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effc, "Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:Overl... > 0 2.11 0.85 0.77 3.56 116.65
## Post.Prob Star
## 1 0.99 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effc, "Time_sum1:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.12 0.79 -1.43 1.16 0.77
## Post.Prob Star
## 1 0.43
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effc, "Time_sum2:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 -0.03 0.76 -1.23 1.23 0.91
## Post.Prob Star
## 1 0.48
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
# drop high pareto's k.
mlong2_effd <- Combined2 %>%
mutate(
k = mlong2_eff$criteria$loo$diagnostics$pareto_k
) %>%
filter(k < .7) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*Prime.Type*Overlap +
(1 + Time_sum*Prime.Type*Overlap| Blind_ID ) +
(1 + Time_sum*Prime.Type*Overlap | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=2000,
cores=4,
seed=12345,
data=.,
file="LONG/output/mlong_effd.rds")
hypothesis(mlong2_effd, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.65 0.35 0.12 1.24 40.24 0.98
## Star
## 1 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effd, "Time_sum1:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.3 0.45 -0.43 1.01 0.3
## Post.Prob Star
## 1 0.23
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effd, "Time_sum2:Prime.Type < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 -0.09 0.4 -0.74 0.54 1.43
## Post.Prob Star
## 1 0.59
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effd, "Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:Overl... > 0 1.6 0.7 0.55 2.77 99
## Post.Prob Star
## 1 0.99 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effd, "Time_sum1:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... > 0 -0.84 0.86 -2.24 0.53 0.18
## Post.Prob Star
## 1 0.15
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong2_effd, "Time_sum2:Prime.Type:OverlapOverlap > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... > 0 0.55 0.65 -0.47 1.61 4.24
## Post.Prob Star
## 1 0.81
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong5_eff <- brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
seed=12345,
cores=4,
data=Combined %>% filter(Overlap=="No Overlap"),
file="LONG/output/mlong5_eff.rds")
mlong5_eff <- add_criterion(mlong5_eff, "loo")
Some of the chains on random effects don’t look well mixed (though R Hats are all <= 1.01). I will try simplifying the random effects structure as well.
#plot(mlong5_eff, N=4)
mlong5_eff.model.check <- createDHARMa(
simulatedResponse = t(posterior_predict(mlong5_eff)),
observedResponse = filter(Combined, Overlap=="No Overlap")$RESPONSE.CODE,
fittedPredictedResponse = apply(t(posterior_epred(mlong5_eff)), 1, mean),
integerResponse=TRUE
)
plot(mlong5_eff.model.check) # standard plots
testDispersion(mlong5_eff.model.check)
##
## DHARMa nonparametric dispersion test via sd of residuals fitted vs.
## simulated
##
## data: simulationOutput
## dispersion = 0.59289, p-value < 2.2e-16
## alternative hypothesis: two.sided
plotResiduals(mlong5_eff.model.check, form=filter(Combined, Overlap=="No Overlap")$Time_sum)
Stronger pattern of heteroskedasticity (very large residuals at the high predicted values.)
summary(mlong5_eff)$fixed
## Estimate Est.Error l-95% CI
## Intercept -2.89006787 0.9291285 -4.6978773
## Time_sum1 -0.27433667 0.4024637 -1.0459088
## Time_sum2 0.17029651 0.3796431 -0.5669265
## Prime.Type 0.76053534 0.5863900 -0.4032202
## biasmatchmismatch -1.12795385 0.5332996 -2.2571572
## Time_sum1:Prime.Type 0.16927541 0.6440303 -1.1258569
## Time_sum2:Prime.Type -0.40591784 0.6014875 -1.6270601
## Time_sum1:biasmatchmismatch 0.21305375 0.5986301 -0.9640565
## Time_sum2:biasmatchmismatch -0.04044774 0.6056338 -1.2683294
## Prime.Type:biasmatchmismatch 0.47346771 0.9311701 -1.2731436
## Time_sum1:Prime.Type:biasmatchmismatch 0.31074103 1.0176411 -1.7283992
## Time_sum2:Prime.Type:biasmatchmismatch 0.59458758 0.9586195 -1.3098092
## u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.9639915 1.000903 2313.193 3835.871
## Time_sum1 0.5414602 1.000443 4966.715 5024.343
## Time_sum2 0.9302729 1.000437 4674.957 5094.940
## Prime.Type 1.9755630 1.000294 4624.824 3804.005
## biasmatchmismatch -0.1492602 1.001312 3568.747 4865.744
## Time_sum1:Prime.Type 1.4299039 1.000202 5365.598 5384.595
## Time_sum2:Prime.Type 0.7518175 1.000551 5671.926 5318.146
## Time_sum1:biasmatchmismatch 1.4098920 1.000180 4498.873 5032.982
## Time_sum2:biasmatchmismatch 1.1347019 1.000038 4646.067 5880.978
## Prime.Type:biasmatchmismatch 2.4753917 1.000511 4734.724 3754.676
## Time_sum1:Prime.Type:biasmatchmismatch 2.3428495 1.000791 5353.698 5694.695
## Time_sum2:Prime.Type:biasmatchmismatch 2.5108849 1.000553 5215.156 5170.872
hypothesis(mlong5_eff, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.76 0.59 -0.18 1.72 11.44 0.92
## Star
## 1
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.47 0.93 -0.93 2.05 2.29
## Post.Prob Star
## 1 0.7
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.31 1.02 -1.38 1.96 0.59
## Post.Prob Star
## 1 0.37
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.59 0.96 -0.96 2.18 0.36
## Post.Prob Star
## 1 0.26
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
Get Empirical Means and Predicted Values
(p2 <- Combined %>%
filter(Overlap=="No Overlap") %>%
group_by(Prime, biasmatch, Time_c) %>%
summarise(mean = mean(RESPONSE.CODE, na.rm=TRUE),
sd = sd(RESPONSE.CODE, na.rm=TRUE)) %>%
ggplot(aes(y=mean, x=biasmatch, fill=Prime)) +
geom_bar(stat="identity",position="dodge") +
geom_errorbar(aes(ymin=mean, ymax=mean+sd), width=.2,
position=position_dodge(.9)) +
facet_wrap(~Time_c) +
ylim(0, .85) +
theme_minimal() +
labs(y="Raw Mean") +
theme(legend.position = "none",
axis.title.x = element_blank())
)
## `summarise()` has grouped output by 'Prime', 'biasmatch'. You can override using
## the `.groups` argument.
p5 <- fitted(mlong5_eff, re_formula=NA, scale="response") %>%
cbind(Combined %>% filter(Overlap=="No Overlap")) %>%
dplyr::select(Prime, biasmatch, Time_c, Estimate, Est.Error) %>%
ggplot(aes(y=Estimate, x=biasmatch, fill=Prime)) +
geom_bar(stat="identity",position="dodge") +
geom_errorbar(aes(ymin=Estimate, ymax=Estimate+Est.Error), width=.2,
position=position_dodge(.9)) +
facet_wrap(~Time_c) +
theme_minimal() +
ylim(0, .4) +
labs(y="Predicted Probability") +
theme(legend.position = "none",
strip.text = element_blank())
p2/p5
ggsave("plots/Fig8.png", last_plot(), dpi=500)
## Saving 7 x 5 in image
df <- tibble( # Design matrix (minus intercept which is automatic)
biasmatch = factor(rep(c(0, 0, 1, 1), 3), labels = c("match", "mismatch")),
Prime.Type = rep(c(-.5, .5, -.5, .5), 3),
Time_sum = c(rep(54, 4), rep(48, 4), rep(42, 4))
)
ps_means <- posterior_linpred(mlong5_eff, newdata=df, re_formula=NA) %>%
t() %>% # posterior samples of linear predictor.
as_tibble() %>%
bind_cols(df, .) %>%
pivot_longer(starts_with("V"), names_to="sample", values_to="linpred") %>%
mutate(
Time_c = ifelse(Time_sum==54, yes="54", no =
ifelse(Time_sum==48, yes="48", no = "42")),
Prime.Type = ifelse(Prime.Type == .5, yes="DOD", no = "POD"),
biasmatch = ifelse(biasmatch=="mismatch", yes="mm", no = "m")
) %>%
dplyr::select(-"Time_sum") %>%
pivot_wider(names_from=c("biasmatch", "Prime.Type", "Time_c"), values_from="linpred") %>%
mutate(
Match_42 = m_DOD_42 - m_POD_42,
Mismatch_42 = mm_DOD_42 - mm_POD_42,
Match_48 = m_DOD_48 - m_POD_48,
Mismatch_48 = mm_DOD_48 - mm_POD_48,
Match_54 = m_DOD_54 - m_POD_54,
Mismatch_54= mm_DOD_54- mm_POD_54,
Surprisal_42 = Mismatch_42 - Match_42,
Surprisal_48 = Mismatch_48 - Match_48,
Surprisal_54 = Mismatch_54 - Match_54
) %>%
dplyr::select("sample", starts_with(c("Match", "Mismatch", "Surprisal"))) %>%
pivot_longer(
starts_with(c("Match", "Mismatch", "Surprisal")),
names_to = c("Effect", "Time"),
names_sep = "_",
values_to = "Logits"
) %>%
mutate(
Time = paste(Time, "months"),
Condition = paste(Time, Effect)
)
ps_means_p <- ps_means %>%
group_by(Condition) %>%
summarise(
P = sum(Logits > 0)/8000
)
p1 <- ps_means %>%
filter(Effect != "Surprisal") %>%
ggplot(aes(y=Condition, x=Logits)) + stat_halfeye(.width=c(.66, .90)) + geom_vline(xintercept = 0) + theme_minimal() +
annotate("text", x=7, y=6.15, label= paste("p =", round(ps_means_p[8, 2], 2))) +
annotate("text", x=7, y=5.15, label= paste("p =", round(ps_means_p[7, 2], 2))) +
annotate("text", x=7, y=4.15, label= paste("p =", round(ps_means_p[5, 2], 2))) +
annotate("text", x=7, y=3.15, label= paste("p =", round(ps_means_p[4, 2], 2))) +
annotate("text", x=7, y=2.15, label= paste("p =", round(ps_means_p[2, 2], 2))) +
annotate("text", x=7, y=1.15, label= paste("p =", round(ps_means_p[1, 2], 2))) +
theme(axis.title.x=element_blank(), axis.title.y=element_blank(), axis.text.x=element_blank())
p2 <- ps_means %>%
filter(Effect == "Surprisal") %>%
ggplot(aes(y=Condition, x=Logits)) + stat_halfeyeh(.width=c(.66, .90)) + geom_vline(xintercept = 0) + theme_minimal() +
annotate("text", x=7, y=3.15, label= paste("p =", round(ps_means_p[9, 2], 2))) +
annotate("text", x=7, y=2.15, label= paste("p =", round(ps_means_p[6, 2], 2))) +
annotate("text", x=7, y=1.15, label= paste("p =", round(ps_means_p[3, 2], 2))) +
labs(y="Effect") +
theme(axis.title.y=element_blank())
## Warning: 'stat_halfeyeh' is deprecated.
## Use 'stat_halfeye' instead.
## See help("Deprecated") and help("tidybayes-deprecated").
(p1 / p2) + labs(y = "Effect")
ggsave("plots/Fig9.png", last_plot(), dpi=500)
## Saving 7 x 5 in image
mlong5a_eff <- Combined %>%
filter(is.na(COVID.Zoom.session)) %>%
filter(Overlap=="No Overlap") %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
seed=12345,
cores=4,
data=.,
file="LONG/output/mlong5a_eff.rds")
summary(mlong5a_eff, prob=.9)$fixed
## Estimate Est.Error l-90% CI
## Intercept -2.95533043 0.9197226 -4.3737441
## Time_sum1 -0.41369735 0.4239868 -1.0814328
## Time_sum2 0.19434052 0.3865004 -0.4527096
## Prime.Type 0.66054846 0.5420028 -0.1926794
## biasmatchmismatch -1.10021592 0.5569282 -2.0424253
## Time_sum1:Prime.Type 0.02574202 0.6661699 -1.0603681
## Time_sum2:Prime.Type -0.34565326 0.6168494 -1.3640670
## Time_sum1:biasmatchmismatch 0.28927365 0.6361648 -0.7707963
## Time_sum2:biasmatchmismatch -0.06713198 0.6212822 -1.1000326
## Prime.Type:biasmatchmismatch 0.55725081 0.9438141 -0.8886273
## Time_sum1:Prime.Type:biasmatchmismatch 0.44707739 1.0619192 -1.2840652
## Time_sum2:Prime.Type:biasmatchmismatch 0.53937346 0.9676617 -1.0024971
## u-90% CI Rhat Bulk_ESS Tail_ESS
## Intercept -1.4056885 1.000924 2738.816 3896.532
## Time_sum1 0.2659789 0.999981 5963.391 5369.186
## Time_sum2 0.8073756 1.000528 4888.574 4976.137
## Prime.Type 1.5309974 1.000091 6209.092 5035.045
## biasmatchmismatch -0.2454764 1.001511 3774.492 4196.893
## Time_sum1:Prime.Type 1.0839912 1.000381 6371.735 5843.423
## Time_sum2:Prime.Type 0.6196785 1.000529 6208.034 4765.172
## Time_sum1:biasmatchmismatch 1.3000306 1.000599 5007.378 5785.923
## Time_sum2:biasmatchmismatch 0.9410007 1.000013 4711.589 4833.808
## Prime.Type:biasmatchmismatch 2.1486719 1.000648 5782.177 5720.321
## Time_sum1:Prime.Type:biasmatchmismatch 2.2010976 1.000371 5988.570 5283.971
## Time_sum2:Prime.Type:biasmatchmismatch 2.1299108 1.000210 5172.366 5652.763
hypothesis(mlong5a_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.56 0.94 -0.89 2.15 2.71
## Post.Prob Star
## 1 0.73
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5a_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.45 1.06 -1.28 2.2 0.49
## Post.Prob Star
## 1 0.33
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5a_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.54 0.97 -1 2.13 0.4
## Post.Prob Star
## 1 0.29
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong5b_eff <- Combined %>%
filter(Overlap=="No Overlap") %>%
filter(Trial_Problem == 0) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
control=list(adapt_delta=.9),
family="bernoulli",
prior=logit_prior,
iter=4000,
seed=12345,
cores=4,
data=.,
file="LONG/output/mlong5b_eff.rds")
summary(mlong5b_eff, prob=.9)$fixed
## Estimate Est.Error l-90% CI
## Intercept -2.90809578 0.9560444 -4.4279362
## Time_sum1 -0.29365251 0.4083580 -0.9410641
## Time_sum2 0.15052254 0.3901530 -0.5042963
## Prime.Type 0.76082384 0.5938312 -0.1641791
## biasmatchmismatch -1.14043754 0.5468779 -2.0784146
## Time_sum1:Prime.Type 0.16953581 0.6388694 -0.8638317
## Time_sum2:Prime.Type -0.40578731 0.6345177 -1.4298628
## Time_sum1:biasmatchmismatch 0.24104466 0.6208855 -0.7767292
## Time_sum2:biasmatchmismatch -0.04356973 0.6155725 -1.0720626
## Prime.Type:biasmatchmismatch 0.47870681 0.9478452 -0.9860934
## Time_sum1:Prime.Type:biasmatchmismatch 0.29514970 1.0405517 -1.3896399
## Time_sum2:Prime.Type:biasmatchmismatch 0.60412772 0.9610145 -0.9710496
## u-90% CI Rhat Bulk_ESS Tail_ESS
## Intercept -1.3424084 1.001928 2300.150 3576.369
## Time_sum1 0.3700278 1.000947 4623.331 5204.001
## Time_sum2 0.7769172 1.000110 3991.441 5294.995
## Prime.Type 1.7133228 1.001262 4838.299 4458.769
## biasmatchmismatch -0.3230423 1.000655 3965.766 4476.636
## Time_sum1:Prime.Type 1.1882339 1.001385 5495.781 5863.433
## Time_sum2:Prime.Type 0.5974816 1.000231 5116.102 4945.530
## Time_sum1:biasmatchmismatch 1.2465860 1.001463 4288.676 4752.182
## Time_sum2:biasmatchmismatch 0.9636873 1.001377 4301.180 5373.474
## Prime.Type:biasmatchmismatch 2.0895471 1.000562 4751.855 4591.595
## Time_sum1:Prime.Type:biasmatchmismatch 1.9988579 1.000326 5402.134 5477.868
## Time_sum2:Prime.Type:biasmatchmismatch 2.1840863 1.000138 5328.815 5655.475
hypothesis(mlong5b_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.48 0.95 -0.99 2.09 2.35
## Post.Prob Star
## 1 0.7
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5b_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.3 1.04 -1.39 2 0.62
## Post.Prob Star
## 1 0.38
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5b_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.6 0.96 -0.97 2.18 0.34
## Post.Prob Star
## 1 0.25
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong5c_eff <- brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
seed=12345,
data=Combined,
file="LONG/output/mlong5c_eff.rds")
summary(mlong5c_eff, prob=.9)$fixed
## Estimate Est.Error l-90% CI
## Intercept -3.142377761 0.8431675 -4.44888964
## Time_sum1 -0.039090909 0.3249390 -0.54669494
## Time_sum2 0.113582799 0.2943097 -0.36344652
## Prime.Type 0.577408850 0.4371501 -0.05865483
## biasmatchmismatch -0.585111123 0.3976571 -1.19203903
## Time_sum1:Prime.Type 0.008504537 0.5352190 -0.86348944
## Time_sum2:Prime.Type -0.187653352 0.4074612 -0.82472562
## Time_sum1:biasmatchmismatch -0.216131999 0.3893453 -0.87367640
## Time_sum2:biasmatchmismatch 0.077334908 0.3653236 -0.50026139
## Prime.Type:biasmatchmismatch 1.188862355 0.6245783 0.16252074
## Time_sum1:Prime.Type:biasmatchmismatch 0.360544338 0.6729076 -0.72934731
## Time_sum2:Prime.Type:biasmatchmismatch 0.303529948 0.6055544 -0.69108192
## u-90% CI Rhat Bulk_ESS Tail_ESS
## Intercept -1.73738540 1.001271 1783.913 2765.848
## Time_sum1 0.49202811 1.000187 3703.293 4605.548
## Time_sum2 0.58736412 1.001087 2529.281 4343.350
## Prime.Type 1.29495091 1.001142 3146.394 3678.465
## biasmatchmismatch 0.05908534 1.000786 3467.615 3658.540
## Time_sum1:Prime.Type 0.86143001 1.000642 4111.725 4241.572
## Time_sum2:Prime.Type 0.45800217 1.000283 4544.273 4810.091
## Time_sum1:biasmatchmismatch 0.37915853 1.000972 3538.164 4454.791
## Time_sum2:biasmatchmismatch 0.67104475 1.000037 3298.686 4153.949
## Prime.Type:biasmatchmismatch 2.15584521 1.000644 4494.364 4370.328
## Time_sum1:Prime.Type:biasmatchmismatch 1.45783242 1.000415 4488.653 4912.919
## Time_sum2:Prime.Type:biasmatchmismatch 1.23987408 1.000211 4693.735 4636.510
hypothesis(mlong5c_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 1.19 0.62 0.16 2.16 29.53
## Post.Prob Star
## 1 0.97 *
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5c_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.36 0.67 -0.73 1.46 0.39
## Post.Prob Star
## 1 0.28
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5c_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.3 0.61 -0.69 1.24 0.41
## Post.Prob Star
## 1 0.29
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong5d_eff <- Combined %>%
filter(Overlap=="No Overlap") %>%
mutate(
k = mlong5$criteria$loo$diagnostics$pareto_k
) %>%
filter(k < .7) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=2000,
cores=4,
seed=12345,
data=.,
file="LONG/output/mlong5d_eff.rds")
summary(mlong5d_eff, prob=.9)$fixed
## Estimate Est.Error l-90% CI
## Intercept -3.3737343 1.1020284 -5.1416767
## Time_sum1 -0.5231378 0.5545966 -1.4495475
## Time_sum2 0.4185665 0.5106261 -0.3759944
## Prime.Type 1.0030036 0.6839602 -0.0649206
## biasmatchmismatch -2.3731303 0.8435759 -3.8510124
## Time_sum1:Prime.Type 0.1857196 0.8289893 -1.1405486
## Time_sum2:Prime.Type -0.4103499 0.7184786 -1.5950704
## Time_sum1:biasmatchmismatch 0.2587904 0.9133163 -1.2645304
## Time_sum2:biasmatchmismatch 0.4862031 0.8852754 -0.9920534
## Prime.Type:biasmatchmismatch 0.6190537 1.1849203 -1.2302594
## Time_sum1:Prime.Type:biasmatchmismatch 0.1152008 1.4046115 -2.1767757
## Time_sum2:Prime.Type:biasmatchmismatch 0.4151456 1.3380118 -1.8367149
## u-90% CI Rhat Bulk_ESS Tail_ESS
## Intercept -1.5934177 1.000604 1042.396 1662.879
## Time_sum1 0.3618994 1.003366 1885.251 1970.186
## Time_sum2 1.2862406 1.001157 1671.362 2104.633
## Prime.Type 2.1446217 1.002227 2175.419 2163.326
## biasmatchmismatch -1.1251496 1.003113 1532.436 2062.054
## Time_sum1:Prime.Type 1.5186031 1.002851 2431.757 2754.628
## Time_sum2:Prime.Type 0.6913820 1.000056 2246.198 2724.933
## Time_sum1:biasmatchmismatch 1.6923716 1.001822 1883.725 2352.183
## Time_sum2:biasmatchmismatch 1.9374235 1.002425 1781.191 2510.154
## Prime.Type:biasmatchmismatch 2.6119737 1.001463 2156.558 2232.610
## Time_sum1:Prime.Type:biasmatchmismatch 2.4111068 1.002194 2501.608 2862.910
## Time_sum2:Prime.Type:biasmatchmismatch 2.5654051 1.001346 2141.813 2940.865
hypothesis(mlong5d_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.62 1.18 -1.23 2.61 2.35
## Post.Prob Star
## 1 0.7
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5d_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.12 1.4 -2.18 2.41 0.86
## Post.Prob Star
## 1 0.46
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong5d_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.42 1.34 -1.84 2.57 0.58
## Post.Prob Star
## 1 0.37
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong6_eff <- brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
cores=4,
seed=12345,
data=Combined2 %>% filter(Overlap=="No Overlap"),
file="LONG/output/mlong6_eff.rds")
mlong6_eff <- add_criterion(mlong6_eff, "loo")
#plot(mlong6_eff, N=4)
summary(mlong6_eff)$fixed
## Estimate Est.Error l-95% CI
## Intercept -2.04831573 0.9494498 -3.9278170
## Time_sum1 -0.54857289 0.5023736 -1.5392873
## Time_sum2 -0.38264426 0.4967454 -1.4006050
## Prime.Type 0.85017435 0.6401165 -0.4327676
## biasmatchmismatch -1.17882838 0.6053159 -2.4507954
## Time_sum1:Prime.Type -0.18743037 0.7536757 -1.6875712
## Time_sum2:Prime.Type -0.41624485 0.7373008 -1.9152891
## Time_sum1:biasmatchmismatch 0.05700928 0.7062176 -1.4131328
## Time_sum2:biasmatchmismatch -0.18082609 0.7777758 -1.7753615
## Prime.Type:biasmatchmismatch 0.30237718 1.0882356 -1.7913189
## Time_sum1:Prime.Type:biasmatchmismatch 0.09646204 1.1831169 -2.2092706
## Time_sum2:Prime.Type:biasmatchmismatch 1.08699400 1.2041169 -1.3107944
## u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.09274115 1.0003510 3384.398 4392.427
## Time_sum1 0.45842983 1.0005836 5817.721 4906.684
## Time_sum2 0.57241169 1.0013735 5448.729 5581.258
## Prime.Type 2.14095152 1.0001889 6781.437 5370.804
## biasmatchmismatch -0.05297732 1.0006166 5334.687 5155.905
## Time_sum1:Prime.Type 1.30123258 1.0003876 7158.193 6117.498
## Time_sum2:Prime.Type 0.98442516 1.0005767 6923.615 5582.907
## Time_sum1:biasmatchmismatch 1.40697994 1.0002181 5206.761 5078.619
## Time_sum2:biasmatchmismatch 1.26591558 0.9997441 4478.115 5117.430
## Prime.Type:biasmatchmismatch 2.64263638 1.0000634 6529.235 5523.826
## Time_sum1:Prime.Type:biasmatchmismatch 2.43143124 1.0001540 6668.203 5957.443
## Time_sum2:Prime.Type:biasmatchmismatch 3.48247235 1.0000411 6507.818 6007.288
mlong6_eff.model.check <- createDHARMa(
simulatedResponse = t(posterior_predict(mlong6_eff)),
observedResponse = filter(Combined2, Overlap=="No Overlap")$RESPONSE.CODE,
fittedPredictedResponse = apply(t(posterior_epred(mlong6_eff)), 1, mean),
integerResponse=TRUE
)
plot(mlong6_eff.model.check) # standard plots
testDispersion(mlong6_eff.model.check)
##
## DHARMa nonparametric dispersion test via sd of residuals fitted vs.
## simulated
##
## data: simulationOutput
## dispersion = 0.63888, p-value < 2.2e-16
## alternative hypothesis: two.sided
plotResiduals(mlong6_eff.model.check, form=filter(Combined2, Overlap=="No Overlap")$Time_sum)
Stronger pattern of heteroskedasticity (very large residuals at the high predicted values.)
hypothesis(mlong6_eff, "Prime.Type > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob
## 1 (Prime.Type) > 0 0.85 0.64 -0.17 1.87 11.88 0.92
## Star
## 1
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.3 1.09 -1.4 2.16 1.52
## Post.Prob Star
## 1 0.6
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.1 1.18 -1.86 2.05 0.89
## Post.Prob Star
## 1 0.47
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 1.09 1.2 -0.89 3.08 0.21
## Post.Prob Star
## 1 0.18
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong6a_eff <- Combined2 %>%
filter(is.na(COVID.Zoom.session)) %>%
filter(Overlap=="No Overlap") %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
control=list(adapt_delta=.95),
prior=logit_prior,
iter=4000,
seed=12345,
cores=4,
data=.,
file="LONG/output/mlong6a_eff.rds")
summary(mlong6a_eff)$fixed
## Estimate Est.Error l-95% CI
## Intercept -2.1745417 0.9148274 -3.951799
## Time_sum1 -0.7822274 0.5400151 -1.872482
## Time_sum2 -0.2581103 0.5024229 -1.281206
## Prime.Type 0.5543152 0.6157540 -0.661957
## biasmatchmismatch -1.1172630 0.6241680 -2.449604
## Time_sum1:Prime.Type -0.6311725 0.8192887 -2.277295
## Time_sum2:Prime.Type -0.2357085 0.7472130 -1.720848
## Time_sum1:biasmatchmismatch 0.2248506 0.7301530 -1.303686
## Time_sum2:biasmatchmismatch -0.2859808 0.7948704 -2.006782
## Prime.Type:biasmatchmismatch 0.6696118 1.0897048 -1.376892
## Time_sum1:Prime.Type:biasmatchmismatch 0.6549173 1.2387032 -1.760866
## Time_sum2:Prime.Type:biasmatchmismatch 0.8509869 1.2278419 -1.516108
## u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.299670724 1.0020961 1610.857 3092.938
## Time_sum1 0.261817345 1.0006327 3115.084 3274.835
## Time_sum2 0.676801753 0.9999173 3444.638 4531.559
## Prime.Type 1.788909409 1.0002049 4329.336 4655.791
## biasmatchmismatch 0.006137426 1.0002211 3000.556 3896.984
## Time_sum1:Prime.Type 0.949742808 1.0004568 4099.294 4916.787
## Time_sum2:Prime.Type 1.208685237 1.0017179 4358.104 5258.570
## Time_sum1:biasmatchmismatch 1.617460649 1.0012057 2929.314 3180.587
## Time_sum2:biasmatchmismatch 1.205995172 1.0011501 2684.823 4159.648
## Prime.Type:biasmatchmismatch 2.924478194 1.0000250 4322.859 4949.769
## Time_sum1:Prime.Type:biasmatchmismatch 3.072958704 1.0008589 4397.042 5448.408
## Time_sum2:Prime.Type:biasmatchmismatch 3.348427596 1.0018496 3697.582 4925.076
hypothesis(mlong6a_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.67 1.09 -1.02 2.51 2.81
## Post.Prob Star
## 1 0.74
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6a_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.65 1.24 -1.37 2.69 0.42
## Post.Prob Star
## 1 0.29
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6a_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 0.85 1.23 -1.15 2.88 0.32
## Post.Prob Star
## 1 0.24
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong6b_eff <- Combined2 %>%
filter(Overlap=="No Overlap") %>%
filter(Trial_Problem == 0) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
seed=12345,
cores=4,
data=.,
file="LONG/output/mlong6b_eff.rds")
summary(mlong6b_eff)$fixed
## Estimate Est.Error l-95% CI
## Intercept -2.04831573 0.9494498 -3.9278170
## Time_sum1 -0.54857289 0.5023736 -1.5392873
## Time_sum2 -0.38264426 0.4967454 -1.4006050
## Prime.Type 0.85017435 0.6401165 -0.4327676
## biasmatchmismatch -1.17882838 0.6053159 -2.4507954
## Time_sum1:Prime.Type -0.18743037 0.7536757 -1.6875712
## Time_sum2:Prime.Type -0.41624485 0.7373008 -1.9152891
## Time_sum1:biasmatchmismatch 0.05700928 0.7062176 -1.4131328
## Time_sum2:biasmatchmismatch -0.18082609 0.7777758 -1.7753615
## Prime.Type:biasmatchmismatch 0.30237718 1.0882356 -1.7913189
## Time_sum1:Prime.Type:biasmatchmismatch 0.09646204 1.1831169 -2.2092706
## Time_sum2:Prime.Type:biasmatchmismatch 1.08699400 1.2041169 -1.3107944
## u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.09274115 1.0003510 3384.398 4392.427
## Time_sum1 0.45842983 1.0005836 5817.721 4906.684
## Time_sum2 0.57241169 1.0013735 5448.729 5581.258
## Prime.Type 2.14095152 1.0001889 6781.437 5370.804
## biasmatchmismatch -0.05297732 1.0006166 5334.687 5155.905
## Time_sum1:Prime.Type 1.30123258 1.0003876 7158.193 6117.498
## Time_sum2:Prime.Type 0.98442516 1.0005767 6923.615 5582.907
## Time_sum1:biasmatchmismatch 1.40697994 1.0002181 5206.761 5078.619
## Time_sum2:biasmatchmismatch 1.26591558 0.9997441 4478.115 5117.430
## Prime.Type:biasmatchmismatch 2.64263638 1.0000634 6529.235 5523.826
## Time_sum1:Prime.Type:biasmatchmismatch 2.43143124 1.0001540 6668.203 5957.443
## Time_sum2:Prime.Type:biasmatchmismatch 3.48247235 1.0000411 6507.818 6007.288
hypothesis(mlong6b_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.3 1.09 -1.4 2.16 1.52
## Post.Prob Star
## 1 0.6
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6b_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.1 1.18 -1.86 2.05 0.89
## Post.Prob Star
## 1 0.47
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6b_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 1.09 1.2 -0.89 3.08 0.21
## Post.Prob Star
## 1 0.18
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong6c_eff <- Combined2 %>%
filter(Overlap=="No Overlap" )%>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch || Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch || Target.verb),
family="bernoulli",
prior=logit_prior,
iter=4000,
seed=12345,
data=.,
file="LONG/output/mlong6c_eff.rds")
summary(mlong6c_eff)$fixed
## Estimate Est.Error l-95% CI
## Intercept -2.0524094 0.9100749 -3.8421091
## Time_sum1 -0.5760712 0.4697443 -1.5549529
## Time_sum2 -0.2938067 0.4537724 -1.2010001
## Prime.Type 0.8205442 0.6122617 -0.3856381
## biasmatchmismatch -1.2432257 0.6090517 -2.4962337
## Time_sum1:Prime.Type -0.2316973 0.7377997 -1.6758957
## Time_sum2:Prime.Type -0.4650542 0.7079334 -1.9290030
## Time_sum1:biasmatchmismatch 0.1730529 0.6586978 -1.1449354
## Time_sum2:biasmatchmismatch -0.1412043 0.7331958 -1.6443058
## Prime.Type:biasmatchmismatch 0.2403482 1.0517270 -1.7188511
## Time_sum1:Prime.Type:biasmatchmismatch 0.0903139 1.1302055 -2.1120715
## Time_sum2:Prime.Type:biasmatchmismatch 1.0709668 1.1528724 -1.1301420
## u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.1751680 1.000352 4364.962 4913.191
## Time_sum1 0.3573786 1.000140 6200.962 5164.245
## Time_sum2 0.5701026 1.000353 6310.127 5554.447
## Prime.Type 2.0232378 1.000702 7986.468 5422.688
## biasmatchmismatch -0.1186601 1.000312 4924.895 5193.419
## Time_sum1:Prime.Type 1.1761512 1.000472 8425.730 6433.515
## Time_sum2:Prime.Type 0.9020229 1.000739 7356.939 5754.392
## Time_sum1:biasmatchmismatch 1.4570813 1.000017 5885.912 5650.050
## Time_sum2:biasmatchmismatch 1.2492532 1.000453 6082.268 5002.466
## Prime.Type:biasmatchmismatch 2.3745088 1.000218 8123.616 5899.097
## Time_sum1:Prime.Type:biasmatchmismatch 2.3328355 1.000681 7769.554 4864.237
## Time_sum2:Prime.Type:biasmatchmismatch 3.3789357 1.000907 7589.778 6016.738
hypothesis(mlong6c_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 0.24 1.05 -1.39 1.98 1.44
## Post.Prob Star
## 1 0.59
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6c_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 0.09 1.13 -1.75 1.96 0.88
## Post.Prob Star
## 1 0.47
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6c_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 1.07 1.15 -0.8 3.01 0.21
## Post.Prob Star
## 1 0.17
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
mlong6d_eff <- Combined2 %>%
filter(Overlap=="No Overlap" )%>%
mutate(
k = mlong6_eff$criteria$loo$diagnostics$pareto_k
) %>%
filter(k < .7) %>%
brm(RESPONSE.CODE ~ 1 + Time_sum*+Prime.Type*biasmatch +
(1 + Time_sum*Prime.Type*biasmatch | Blind_ID ) +
(1 + Time_sum*Prime.Type*biasmatch | Target.verb),
family="bernoulli",
prior=logit_prior,
iter=2000,
cores=4,
seed=12345,
data=.,
file="LONG/output/mlong6d_eff.rds")
summary(mlong6d_eff)$fixed
## Estimate Est.Error l-95% CI
## Intercept -2.48612706 1.1507237 -4.7019769
## Time_sum1 -0.69718519 0.6486491 -2.0322614
## Time_sum2 -0.38279789 0.6237246 -1.6646423
## Prime.Type 1.28170941 0.7729487 -0.1917045
## biasmatchmismatch -2.22300204 1.0135057 -4.6168600
## Time_sum1:Prime.Type -0.09595048 0.9819060 -2.1019593
## Time_sum2:Prime.Type -0.70613438 0.9021175 -2.5183089
## Time_sum1:biasmatchmismatch 0.29529765 1.0233234 -1.8025227
## Time_sum2:biasmatchmismatch 0.01596244 1.1407021 -2.2433877
## Prime.Type:biasmatchmismatch -0.16117424 1.3112731 -2.6769008
## Time_sum1:Prime.Type:biasmatchmismatch -0.58394967 1.5688161 -3.6055510
## Time_sum2:Prime.Type:biasmatchmismatch 2.62778046 1.6757268 -0.4422165
## u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept -0.1984506 1.001674 1310.534 2277.623
## Time_sum1 0.6037020 1.002960 2015.381 2385.330
## Time_sum2 0.8047874 1.001555 1775.117 2408.785
## Prime.Type 2.8847736 1.002072 2379.127 2303.773
## biasmatchmismatch -0.5096067 1.001739 1804.466 1961.253
## Time_sum1:Prime.Type 1.7919323 1.000646 2215.135 2498.213
## Time_sum2:Prime.Type 1.0063634 1.000389 2414.335 2432.769
## Time_sum1:biasmatchmismatch 2.3020321 1.002746 1846.119 2405.593
## Time_sum2:biasmatchmismatch 2.2557284 1.002793 1897.113 2393.498
## Prime.Type:biasmatchmismatch 2.5410284 1.000188 3119.065 2733.717
## Time_sum1:Prime.Type:biasmatchmismatch 2.5756320 1.000100 2644.349 2971.286
## Time_sum2:Prime.Type:biasmatchmismatch 6.0622275 1.001347 2395.188 2732.119
hypothesis(mlong6d_eff, "Prime.Type:biasmatchmismatch > 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Prime.Type:biasm... > 0 -0.16 1.31 -2.26 1.98 0.81
## Post.Prob Star
## 1 0.45
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6d_eff, "Time_sum1:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum1:Prime.... < 0 -0.58 1.57 -3.08 2.03 1.89
## Post.Prob Star
## 1 0.65
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
hypothesis(mlong6d_eff, "Time_sum2:Prime.Type:biasmatchmismatch < 0")
## Hypothesis Tests for class b:
## Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio
## 1 (Time_sum2:Prime.... < 0 2.63 1.68 -0.05 5.43 0.06
## Post.Prob Star
## 1 0.05
## ---
## 'CI': 90%-CI for one-sided and 95%-CI for two-sided hypotheses.
## '*': For one-sided hypotheses, the posterior probability exceeds 95%;
## for two-sided hypotheses, the value tested against lies outside the 95%-CI.
## Posterior probabilities of point hypotheses assume equal prior probabilities.
Check this
tab_model(mlong_eff, mlong2_eff, mlong5_eff, mlong6_eff, show.ci=.90, show.re.var=FALSE, show.r2=FALSE, show.icc=FALSE, transform=NULL, collapse.ci=TRUE, show.p=TRUE, ci.hyphen = " : ", dv.labels=c("Model 1", "Model 2", "Model 3", "Model 4"), string.stat="", file="Table_Long", bpe="mean",
pred.labels=c(
"Intercept",
"54 months",
"48 months",
"Prime (DOD)",
"Overlap",
"54 months * Prime",
"48 months * Prime",
"54 months * Overlap",
"48 months * Overlap",
"Prime * Overlap",
"54 months * Prime * Overlap",
"48 months * Prime * Overlap",
"Bias Mismatch",
"54 months * Bias Mismatch ",
"48 months * Bias Mismatch ",
"Prime * Bias Mismatch",
"54 months* Prime * Bias Mismatch",
"48 months* Prime * Bias Mismatch"
))
| Model 1 | Model 2 | Model 3 | Model 4 | |
|---|---|---|---|---|
| Predictors | Log-Odds | Log-Odds | Log-Odds | Log-Odds |
| Intercept |
-3.03 (-4.37 : -1.56) |
-2.33 (-3.69 : -0.86) |
-2.89 (-4.33 : -1.34) |
-2.05 (-3.56 : -0.43) |
| 54 months |
-0.26 (-0.80 : 0.26) |
-0.55 (-1.21 : 0.09) |
-0.27 (-0.91 : 0.40) |
-0.55 (-1.33 : 0.25) |
| 48 months |
0.22 (-0.26 : 0.70) |
-0.40 (-0.98 : 0.14) |
0.17 (-0.45 : 0.79) |
-0.38 (-1.19 : 0.37) |
| Prime (DOD) |
0.62 (0.12 : 1.15) |
0.60 (-0.05 : 1.29) |
0.76 (-0.18 : 1.72) |
0.85 (-0.17 : 1.87) |
| Overlap |
-1.00 (-1.65 : -0.36) |
-1.15 (-1.97 : -0.43) |
||
| 54 months * Prime |
0.31 (-0.41 : 1.01) |
-0.03 (-0.87 : 0.79) |
0.17 (-0.89 : 1.19) |
-0.19 (-1.41 : 1.02) |
| 48 months * Prime |
-0.11 (-0.72 : 0.50) |
0.14 (-0.64 : 0.93) |
-0.41 (-1.38 : 0.55) |
-0.42 (-1.63 : 0.76) |
| 54 months * Overlap |
0.49 (-0.32 : 1.39) |
0.11 (-0.93 : 1.20) |
||
| 48 months * Overlap |
-0.38 (-0.89 : 0.15) |
-0.14 (-0.94 : 0.64) |
||
| Prime * Overlap |
1.48 (0.51 : 2.56) |
2.08 (0.66 : 3.64) |
||
| 54 months * Prime * Overlap |
-0.74 (-2.01 : 0.51) |
-0.13 (-1.51 : 1.21) |
||
| 48 months * Prime * Overlap |
0.61 (-0.39 : 1.67) |
0.06 (-1.25 : 1.43) |
||
| Bias Mismatch |
-1.13 (-2.04 : -0.33) |
-1.18 (-2.20 : -0.25) |
||
| 54 months * Bias Mismatch |
0.21 (-0.75 : 1.19) |
0.06 (-1.13 : 1.17) |
||
| 48 months * Bias Mismatch |
-0.04 (-1.04 : 0.94) |
-0.18 (-1.49 : 1.04) |
||
| Prime * Bias Mismatch |
0.47 (-0.93 : 2.05) |
0.30 (-1.40 : 2.16) |
||
| 54 months* Prime * Bias Mismatch |
0.31 (-1.38 : 1.96) |
0.10 (-1.86 : 2.05) |
||
| 48 months* Prime * Bias Mismatch |
0.59 (-0.96 : 2.18) |
1.09 (-0.89 : 3.08) |
||
| N | 100 Blind_ID | 46 Blind_ID | 100 Blind_ID | 46 Blind_ID |
| 6 Target.verb | 6 Target.verb | 6 Target.verb | 6 Target.verb | |
| Observations | 2865 | 1479 | 1355 | 696 |
mlong7 <-brm(RESPONSE.CODE ~ 1 + Time_sum +
(1 + Time_sum | Blind_ID) +
(1 +Time_sum | Target.verb),
prior=logit_prior,
iter=4000,
family="bernoulli",
cores=4,
control=list(adapt_delta=.9),
seed=12345,
data=Combined,
file="LONG/output/mlong7.rds")
summary(mlong7)$fixed
## Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS
## Intercept -2.92419075 0.6766662 -4.2067913 -1.5154476 1.000493 2001.908
## Time_sum1 -0.12122086 0.2450626 -0.5971200 0.3617361 1.000645 3955.599
## Time_sum2 0.04747095 0.2394531 -0.4360217 0.5042627 1.000552 3294.096
## Tail_ESS
## Intercept 2765.204
## Time_sum1 4456.720
## Time_sum2 4418.082
Time_c <- c("42","48", "54")
verbs <- c("brought", "gave", "passed", "sent", "showed", "threw")
Predictors <- crossing(verbs, Time_c)
Time_sum <- factor(Time_c, levels=c("54", "48", "42"))
Time_sum1 <- c(-1, 0, 1) # backwards from original models
Time_sum2 <- c(-1, 1, 0) # backwards from original models
contrasts(Time_sum) = contr.sum(3)
posterior <- posterior_samples(mlong7) %>%
dplyr::select("b_Intercept", starts_with("r_Target.verb"), starts_with("b_Time_sum")) %>%
dplyr::rename("b_Time.sum1" = "b_Time_sum1", "b_Time.sum2" = "b_Time_sum2", "brought_Intercept" = "r_Target.verb[brought,Intercept]", "gave_Intercept" = "r_Target.verb[gave,Intercept]", "passed_Intercept" = "r_Target.verb[passed,Intercept]", "sent_Intercept" = "r_Target.verb[sent,Intercept]", "showed_Intercept" = "r_Target.verb[showed,Intercept]", "threw_Intercept" = "r_Target.verb[threw,Intercept]","brought_Time.sum1" = "r_Target.verb[brought,Time_sum1]", "gave_Time.sum1" = "r_Target.verb[gave,Time_sum1]", "passed_Time.sum1" = "r_Target.verb[passed,Time_sum1]", "sent_Time.sum1" = "r_Target.verb[sent,Time_sum1]", "showed_Time.sum1" = "r_Target.verb[showed,Time_sum1]", "threw_Time.sum1" = "r_Target.verb[threw,Time_sum1]" ,"brought_Time.sum2" = "r_Target.verb[brought,Time_sum2]", "gave_Time.sum2" = "r_Target.verb[gave,Time_sum2]", "passed_Time.sum2" = "r_Target.verb[passed,Time_sum2]", "sent_Time.sum2" = "r_Target.verb[sent,Time_sum2]", "showed_Time.sum2" = "r_Target.verb[showed,Time_sum2]", "threw_Time.sum2" = "r_Target.verb[threw,Time_sum2]") %>%
mutate(
sample = paste("Samp", row_number(), sep="_")
) %>%
relocate(sample) %>%
pivot_longer(-"sample", names_to = "condition", values_to="value") %>%
separate(condition, c("condition", "effect"), "_")
## Warning: Method 'posterior_samples' is deprecated. Please see ?as_draws for
## recommended alternatives.
uni <- unique(posterior$sample)
#newdata <- NULL
#for(i in 1:8000){
# pos <- filter(posterior, sample == uni[i])
# df<- tibble(
# Fixed = filter(pos, condition=="b" & effect=="Intercept")$value +
# filter(pos, condition=="b" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="b" & effect=="Time.sum2")$value * Time_sum2,
# Brought = Fixed +
# filter(pos, condition=="brought" & effect=="Intercept")$value +
# filter(pos, condition=="brought" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="brought" & effect=="Time.sum2")$value * Time_sum2,
# Gave = Fixed +
# filter(pos, condition=="gave" & effect=="Intercept")$value +
# filter(pos, condition=="gave" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="gave" & effect=="Time.sum2")$value * Time_sum2,
# Passed = Fixed +
# filter(pos, condition=="passed" & effect=="Intercept")$value +
# filter(pos, condition=="passed" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="passed" & effect=="Time.sum2")$value * Time_sum2,
# Sent = Fixed +
# filter(pos, condition=="sent" & effect=="Intercept")$value +
# filter(pos, condition=="sent" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="sent" & effect=="Time.sum2")$value * Time_sum2,
# Showed = Fixed +
# filter(pos, condition=="showed" & effect=="Intercept")$value +
# filter(pos, condition=="showed" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="showed" & effect=="Time.sum2")$value * Time_sum2,
# Threw = Fixed +
# filter(pos, condition=="threw" & effect=="Intercept")$value +
# filter(pos, condition=="threw" & effect=="Time.sum1")$value * Time_sum1 +
# filter(pos, condition=="threw" & effect=="Time.sum2")$value * Time_sum2,
# )
# out <- tibble(X = c(df$Brought, df$Gave, df$Passed, df$Sent, df$Showed, df$Threw))
# names(out)[1] <- pos$sample[1]
# newdata = tibble(newdata, out)
#}
#saveRDS(newdata, "plots/by_word.rds")
newdata <- readRDS("plots/by_word.rds")
data <- bind_cols(Predictors, newdata)
df <- Combined %>%
group_by(Time_c, Blind_ID, Target.verb) %>%
summarise(
prop = mean(RESPONSE.CODE)
) %>%
ungroup()
## `summarise()` has grouped output by 'Time_c', 'Blind_ID'. You can override using
## the `.groups` argument.
df_summed <- df %>%
group_by(Time_c, Target.verb) %>%
summarize(
mean_prop = mean(prop)
) %>%
ungroup()
## `summarise()` has grouped output by 'Time_c'. You can override using the
## `.groups` argument.
data <- data %>%
pivot_longer(-c("Time_c", "verbs"), names_to = "sample", values_to="value") %>%
mutate(
prob = inv_logit_scaled(value)
)
library(ggpirate)
ggplot() +
geom_bar(data=df_summed, aes(y=mean_prop, x=Target.verb, color=Target.verb), fill="white", stat = "identity") +
geom_pirate(data=data, aes(x=verbs, y = prob, color=verbs, fill=verbs), bars=FALSE) +
geom_point(data=df, aes(x=Target.verb, y=prop, color=Target.verb), shape=3) +
facet_wrap(~Time_c) +
geom_hline(yintercept=.5, linetype="dotted") +
theme_minimal() +
theme(axis.text.x = element_blank())+
theme(legend.title=element_blank()) +
ylab("Proportion DOD") +
xlab("Target Verb")
ggsave("plots/Fig10.png", last_plot(), dpi=500)
## Saving 7 x 5 in image
sessionInfo()
## R version 4.1.0 (2021-05-18)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19045)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=Dutch_Netherlands.1252 LC_CTYPE=Dutch_Netherlands.1252
## [3] LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C
## [5] LC_TIME=Dutch_Netherlands.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] ggpirate_0.1.2 patchwork_1.1.1 sjPlot_2.8.10 ggpubr_0.4.0
## [5] GGally_2.1.2 plotrix_3.8-2 tidybayes_3.0.2 rmarkdown_2.13
## [9] readxl_1.3.1 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
## [13] purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.6
## [17] ggplot2_3.3.5 tidyverse_1.3.1 DHARMa_0.4.6 brms_2.17.0
## [21] Rcpp_1.0.8.3
##
## loaded via a namespace (and not attached):
## [1] utf8_1.2.2 tidyselect_1.1.2 lme4_1.1-28
## [4] htmlwidgets_1.5.4 grid_4.1.0 munsell_0.5.0
## [7] codetools_0.2-18 ragg_1.2.2 effectsize_0.6.0.1
## [10] DT_0.21 miniUI_0.1.1.1 withr_2.5.0
## [13] Brobdingnag_1.2-8 colorspace_2.0-3 qgam_1.3.4
## [16] highr_0.9 knitr_1.37 rstudioapi_0.13
## [19] stats4_4.1.0 ggsignif_0.6.3 bayesplot_1.9.0
## [22] labeling_0.4.2 emmeans_1.7.2 rstan_2.21.3
## [25] farver_2.1.0 datawizard_0.3.0 bridgesampling_1.1-2
## [28] gap.datasets_0.0.5 coda_0.19-4 vctrs_0.3.8
## [31] generics_0.1.3 TH.data_1.1-0 xfun_0.30
## [34] R6_2.5.1 markdown_1.1 doParallel_1.0.17
## [37] gamm4_0.2-6 projpred_2.0.2 reshape_0.8.8
## [40] assertthat_0.2.1 promises_1.2.0.1 scales_1.2.1
## [43] multcomp_1.4-18 gtable_0.3.1 processx_3.5.2
## [46] sandwich_3.0-1 rlang_1.0.6 systemfonts_1.0.4
## [49] splines_4.1.0 rstatix_0.7.0 broom_0.7.12
## [52] checkmate_2.0.0 inline_0.3.19 yaml_2.3.5
## [55] reshape2_1.4.4 abind_1.4-5 modelr_0.1.8
## [58] threejs_0.3.3 crosstalk_1.2.0 backports_1.4.1
## [61] httpuv_1.6.5 tensorA_0.36.2 tools_4.1.0
## [64] ellipsis_0.3.2 jquerylib_0.1.4 posterior_1.2.1
## [67] RColorBrewer_1.1-3 ggridges_0.5.3 plyr_1.8.6
## [70] base64enc_0.1-3 ps_1.6.0 prettyunits_1.1.1
## [73] zoo_1.8-9 haven_2.4.3 fs_1.5.2
## [76] magrittr_2.0.1 ggdist_3.1.1 colourpicker_1.1.1
## [79] reprex_2.0.1 mvtnorm_1.1-3 sjmisc_2.8.9
## [82] matrixStats_0.61.0 hms_1.1.1 shinyjs_2.1.0
## [85] mime_0.12 evaluate_0.15 arrayhelpers_1.1-0
## [88] xtable_1.8-4 shinystan_2.6.0 sjstats_0.18.1
## [91] gridExtra_2.3 ggeffects_1.1.1 rstantools_2.1.1
## [94] compiler_4.1.0 crayon_1.5.0 minqa_1.2.4
## [97] StanHeaders_2.21.0-7 htmltools_0.5.2 mgcv_1.8-39
## [100] later_1.3.0 tzdb_0.2.0 RcppParallel_5.1.5
## [103] lubridate_1.8.0 DBI_1.1.2 sjlabelled_1.1.8
## [106] dbplyr_2.1.1 MASS_7.3-55 boot_1.3-28
## [109] Matrix_1.4-0 car_3.0-12 cli_3.3.0
## [112] parallel_4.1.0 insight_0.16.0 igraph_1.2.11
## [115] pkgconfig_2.0.3 xml2_1.3.3 foreach_1.5.2
## [118] svUnit_1.0.6 dygraphs_1.1.1.6 bslib_0.3.1
## [121] estimability_1.3 rvest_1.0.2 distributional_0.3.0
## [124] callr_3.7.0 digest_0.6.29 parameters_0.17.0
## [127] cellranger_1.1.0 gap_1.3-1 shiny_1.7.1
## [130] gtools_3.9.2 nloptr_2.0.0 lifecycle_1.0.3
## [133] nlme_3.1-155 jsonlite_1.8.0 carData_3.0-5
## [136] fansi_1.0.2 pillar_1.8.1 lattice_0.20-45
## [139] loo_2.5.0 fastmap_1.1.0 httr_1.4.2
## [142] pkgbuild_1.3.1 survival_3.3-1 glue_1.6.2
## [145] xts_0.12.1 bayestestR_0.11.5 diffobj_0.3.5
## [148] iterators_1.0.14 shinythemes_1.2.0 stringi_1.7.6
## [151] sass_0.4.0 performance_0.8.0 textshaping_0.3.6