My apologies if this is a simple question, but I’m having difficulty in specifying a model with complex interactions.
Say I want to model a count variable (countVar), with an independent variable - income. I would like to explore whether a dummy variable interacts with income to influence the count variable. The dummy variable may be influenced by the respondent’s gender and marital status.
If I want to control for these potentially confounding factors would I go from this model specification (in brms syntax):
mod <- brm(countVar ~ income + income:dummy + (1 + income | region) , family = poisson …)
To this model:
mod <- brm(countVar ~ income + income:dummy + (1 + income | region) + (dummy | respondentGender:maritalStatus) , family = poisson …)
Or, is there another way I should be thinking of this?