There’s a couple of approaches. You could run an independent regression per group, multilevel model with pooled or unpooled parameters, or a hierarchical regression like you said. The different approaches are covered in great detail in this notebook. Do any look like the right match for your problem?
2 Likes