Currently I am implementing a Hierarchical Bayes model with panel data for I stores with T weeks, and where my dependent variable is sales of a brand. I aim to relate store-characteristics to the explanatory variables I am using, but I wish to have two separate second-levels. My model looks like this:
y = intercept + alpha * X + beta * W + error term,
where I would like to introduce the second levels:
alpha = lambda1 * Z + error
beta = lambda2 * Z + error,
where Z contains the store-characteristics. However, as far as I know, I can only use one second-level when using rhierLinearModel
in bayesm
.
Does anybody know how I can specify the model or adjust the code to obtain two second-levels?
Thank you very much in advance!