Thanks a lot for your reply.
I’m a bit confused by the mention of the long format.
Are you suggesting I should reshape the data like described below?
… | y | var_1 | var_2 | county
ob1 | 22 | 55 | 66 | A
ob2 | 33 | 44 | 77 | B
→
… | y | new_vars | var_value | county
ob1 | 22 | 1 | 55 | A
ob1 | 22 | 2 | 66 | A
ob2 | 33 | 1 | 44 | B
ob2 | 33 | 2 | 77 | B
Besides the data format question:
You suggest adding “b_2”. This is what I did in the example code (commented out) and Id like to avoid that because it leads to manual code for each variable, or is the “dims” parameter with “new_vars” then handling this?