Drop empty interaction terms in 'brms'

112 Views Asked by At

In the following example, I have assumed that the interaction term "var1a:var2z" is dropped because it is empty (as in rstanarm).

data <- data.frame(y=c(1,2,3,4,5),
                   var1=c("a","a","b","b","b"),
                   var2=c("x","y","x","y","z"))
fit <- brms::brm("y~-1+var1:var2",data=data)

Unfortunately, this isn't the case, and I don't understand why.

Win 10
R 4.3.0
brms 2.20.3

0

There are 0 best solutions below