Hi,
In brms, you can change the name of a parameter like below (taken from ?marginal_effects with some small changes).
int_conditions <- list(
zBase = setNames(c(-1, 1), c(“A”, “B”)))
And then you can plot the two-way interaction
marginal_effects(fit, effects = “Trt:zBase”,
int_conditions = int_conditions)
I wonder if you can change the names of both “Trt” and xBase" in the example above (assuming both are categorical variables but are sum coded before running brms)? e.g.,
int_conditions <- list(
zBase = setNames(c(-1, 1), c(“A”, “B”)),
list(Trt = setNames(c(-1, 1), c(“A”, “B”))) # this is not working
I have been looking for this type of question but cannot find any.
Any help would be really appreciated.
Thank you.