Hi there, I am trying to study GAM with brm. In doing some examples, there are two things hard for to understand.
The data I used as examples:
dat <- gamSim(3,n=400)
First, I tried the following model:
The question: there is only one smooth term “sds(t2x1x2_1)”, but why is there two interaction terms of smooth x1 and numeric x2 in population-level effects? what do those two terms represent?
The second model is:
The third model is:
Question: as far as I understand, both s(x1, x2) and t2(x1, x2) express the statistical model: y = f(x1) + f(x2) + f(x1, x2) + error. In the population-level effects, why are there two terms (sx1x2_1 and sx1x2_2) besides intercept in the second model while three terms (t2x1x2_1, t2x1x2_2, t2x1x2_3) in the third model?