Brm syntax for guessing probability with interaction terms

I have been looking into including guessing into my models, yet all the resources I found from @paul.buerkner have not helped so far.

My research focuses on lie detection, where people typically either have a binary forced-choice response (Lie - True), or a scale response (which collapses into Lie - Don’t know - True).

The current experiment I am trying to use this for is rather simple, yet because it has an interaction term the output of the syntax I have tried so far is not working as expected.

My experimental design:
DV: Accuracy - Lie - Don’t Know - True (33% guessing)
IV: Posture - Open v Closes (between-subjects, where each group was assigned to a specific posture condition for the entire experiment)
IV2: Veracity - Lies or Truths (within-subjects, 10 videos were lies and 10 were truths, all participants saw all videos)
(IV3: Lie Type - high-stakes v low-stakes (in the next experiment I have another within-subjects variable, which reflects the two sets of videos all participants saw)

I am currently trying to estimate how accurate participants are at detecting deception based on the Posture group they were in and the Veracity of the videos (Interaction effect is hypothesized). The below code is what I have attempted, yet the output does not show the interaction effect term.

Any help would be greatly appreciated. (If possible, both for the current experiment S1 with the 1 interaction, and for S2 where there is a three-way interaction: Posture X Lie Type X Veracity)

###Guessing 33% model- S1 - Posture X Veracity - SDT###
#random effects PNO (participant) + VIDEO (each video they saw, i.e. trial number)

#needed function
inv_logit <- function(x) 1 / (1 + exp(-x))

#model with guessing link function
body0_guess <- brm(
  bf(Accuracy ~ 0.33 + 0.67 * inv_logit(Posture*Veracity),
     Veracity ~ (1| pno ) + (1|Video), 
     Posture ~ Video,
     nl = TRUE),
  data = body0, family = bernoulli("identity"), control = list(adapt_delta = 0.99),warmup = 10000, iter = 20000, save_all_pars = TRUE, thin = 10, inits = 0,
  prior = c(prior(normal(0, 5), nlpar = "Posture"),
  prior(normal(0, 5), nlpar = "Veracity"))
1 Like

Sorry, it looks your question fell through. The main problem IMHO is that non-linear models behave differently than normal models, so a*b is interpreted as “a times b”, not as an interaction. In non-linear model, you would IMHO need something like b1*posture + b2 * veracity + b3 * posture*veracity and b1 ~1, b2~1, b3~1

You might also want to read the brms vignette on non-linear models.
Does that help?

Thank you for the reply!
I had thought the question to be dead by now, so it is much appreciated.

I will implement your suggestion and see how the model behaves. Yet I am am still unsure what the final syntax should look like to include the correct interaction term, given your suggestion; and how to interpret the output.

I have also looked at the documentation for non-linear model on brm, but they all end with a simple guessing model, without the interaction term I am looking for…it is very frustrating.