Hi,
I am trying to use brms package to output the bayse factors for LMM.
# rt_lm = lmerTest::lmer(RT_scale ~ type+tarcolor+tarshape+linedirection+(1|subid),
# data = rt_cleaned,REML = FALSE,lmerControl(optimizer = "optimx", optCtrl =
# list(method = "L-BFGS-B")))
Above is my model, I am interesting in “type”, which consists with 3 levels (distractor absent, predicted, and unpredicted). I want to calculate the BF for the comparison between predicted and unpredicted conditions, so I wonder how can I use this package to get it.
# bayes_rt = brm(RT ~ type + tarcolor + tarshape + linedirection + (1|subid),
# data = rt_data, family = gaussian(),
# iter = 8000, chains = 3, warmup = 2000, cores = 4,
# control = list(adapt_delta = 0.8))
# summary(bayes_rt)
# brms::hypothesis(bayes_rt,hypothesis = "type2-type3 = 0")
I have used these for calculation, but it did not show the specific BF value (see below).
# > hypothesis(bayes_rt,"type2-type3 = 0")
# Hypothesis Tests for class b:
# Hypothesis Estimate Est.Error CI.Lower CI.Upper Evid.Ratio Post.Prob Star
# 1 (type2-type3) = 0 -16.38 3.77 -23.7 -8.95 NA NA *
# ---
# '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.