Hello, It seems dirichlet distributions are not allowed for the random statement in Proc MCMC, so I used gamma distributions instead. Proc MCMC Data=mydata;
array delta[3] delta1 delta2 delta3;
array p[3] p1 p2 p3;
model .........
random delta1 ~ gamma(0.1, iscale=0.1) subject = ID ;
random delta2 ~ gamma(0.1, iscale=0.1) subject = ID ;
random delta3 ~ gamma(0.1, iscale=0.1) subject = ID ;
p1 = delta1/sum(delta1, delta2, delta3);
p2 = delta2/sum(delta1, delta2, delta3);
p3 = 1 - p1 - p2;
Run; I expected that every ID should have its own post-distribution/summary of p, but SAS just generated a summary of p for the whole group. I could compute the p from the results of delta for each ID afterward. But is it possible to obtain p directly from Proc MCMC? Thanks.
... View more