# Hierarchical model with a different set of covariates by group

I'd appreciate any good reference material on specifying a hierarchical model with a different set of covariates by group. Textbooks usually reference varying intercepts and slopes, but in my real world example I'd like to specify a different set covariates by group. Technically, this should be like a varying slope model with a pre-defined set of coefficients set to zero, depending on the group/level.

• Can you please elaborate with more details? Are you meaning that some covariates are 0 for certain groups only? – user289381 Jul 11 '20 at 21:46
• Why don’t you set a prior for those coefficients which is zero for the specific groups? – user289381 Jul 11 '20 at 21:54
• Yes, correct. I want to specify a different set of covariates for each group. I could specify coefficients with zero mean prior for specific groups, as you suggest, but I also need to ensure the posterior is zero. – user7838685 Jul 11 '20 at 23:19
• If the prior is zero the posterior is zero since it’s proportional to the product of prior and likelihood. – user289381 Jul 11 '20 at 23:30
• so assume a normal prior with mean zero. At what value do I specify the variance? – user7838685 Jul 11 '20 at 23:35