I have some hierarchically nested data that I’m trying to model with brms. A simplified snapshot of the data is here:

snapshot.csv (180 Bytes)
What I want to do is fit two models:
The first models outcome as a function of the treat and the dose. The problem is that dose is obviously missing for those that didn’t receive the treatment. Thus, I tried to model the this question in brms using this code:
brm(outcome ~ (1 | treat/dose) + (1 | id), data = snapshot)
Is this right? Will it be a problem that there are missing values for dose if treat == 0?
My second question is how can I further introduce brand to the model? For those that were treated, each dose was randomized to come from one of two brands: A or B. How can I model this interaction? My best guess with brms would be something like:
brm(outcome ~ (1 + brand | treat/dose) + (1 | id), data = snapshot)
- Operating System: Mac OSX Mojave
- brms Version: 2.12.0