Hi, @AlexAndorra,
Thanks a lot for your reply! I think you solved my questions (2) ~ (4), but I am still a bit confused about the first question.
Did you mean that even if we only specify the varying-effect terms in the model without explicitly specifying the fixed effect terms, the model will estimate the fixed effect anyway? I was confused because in the varying_intercept_slope
model in the multilevel_modeling tutorial only specified the varying-effects, while in this example included both fixed effects and varying effects explicitly. What if, with the same dataset, we build one model with only varying effect (like the tutorial) and the other with both varying and fixed effect (like the example)? Will these two models give identical results?
About your first remarks:
You are right, I tested my first model, which included the main effects of two variables, but not the interaction between them. But I am interested in the interaction as well, that’s why I try the second model ( mdl_interaction
). Also because the multilevel_modeling tutorial didn’t include interaction terms, so I try to learn from the notebook from @Jack_Caster. I am wondering is there other ways to model interaction?
PyMCheers