Programming the statistical procedures from SAS

Hierarchical Bayes Model in SAS?

Reply
N/A
Posts: 1

Hierarchical Bayes Model in SAS?

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,

Nicolas

Respected Advisor
Posts: 2,655

Re: Hierarchical Bayes Model in SAS?

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.

Steve Denham

New Contributor
Posts: 3

Re: Hierarchical Bayes Model in SAS?

Dear,

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,

Bert

Respected Advisor
Posts: 2,655

Re: Hierarchical Bayes Model in SAS?

I don't see anything that would work to do this in SAS.  You may need to look at the R package, which I think is called MCMCglmm.

Steve Denham

Valued Guide
Valued Guide
Posts: 684

Re: Hierarchical Bayes Model in SAS?

Check the latest documentation for PROC MCMC. I am pretty sure there is something on multiple levels. You would typically use so-called hierarchical centering.

Respected Advisor
Posts: 2,655

Re: Hierarchical Bayes Model in SAS?

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.

Steve Denham

New Contributor
Posts: 3

Re: Hierarchical Bayes Model in SAS?

Thanks a lot for your help both, it was very helpful! My program works right now..

Bert

Ask a Question
Discussion stats
  • 6 replies
  • 363 views
  • 0 likes
  • 4 in conversation