10-31-2012 05:48 AM
I want to implement a Hierarchical Bayes Model in SAS.
My model is a Hierarchical Bayes version of a Vector Auto-regressive Model with Covariates (VARX) where individual level covariates effects are drawn from a "segment/product-level" distribution, which is in turn drawn from a "population-level" distribution.
This is a quite complex model but I'd like to start with something simple like:
- Y_ijt=alpha_ij*X_ijt+eps_ijt (customer level equation: where i is the customer index, j is the segment/product index and t is the time.), where
- alpha_ij ~ N(alpha_j,sigma_j) (segment/product level equation) and
- alpha_j ~ N(alpha_0,sigma_0) (population level equation).
I know this model is not a VARX model but if I could start with a simple example that would help me to implement the complete estimator.
Does anyone have any experience with the estimation of such models in SAS?
Thanks in advance,
10-31-2012 08:10 AM
I've used PROC MCMC for some hierarchical models, but not for anything like this, so I don't have the experience needed to help much, other than to point you at the documentation and examples therein.
07-23-2014 07:21 AM
Is this question not anwered somewhere else, because I have a similar problem? I work under SAS 9.3 and want to fit a hierarchical random effects model with 3 levels (e.g. school, class, student data with school and class random effects). All the examples I find only treat the 2 level case.
Thanks in advance,
07-24-2014 02:17 PM
On an interesting tangent, the PRIOR statement in MIXED looks like it might be applicable, as most hierarchical models are variance component models (the first restriction I ran into).
Back to MCMC--Example 59.8 in the SAS/STAT13.1 documentation has a multilevel example, which looks like it would be easy enough to generalize to this situation.