Programming the statistical procedures from SAS

Setting a constant in PROC MCMC

Reply
Contributor
Posts: 43

Setting a constant in PROC MCMC

Hi all,

 

I am using PROC MCMC to compute a mixed-effects model and I want to set a variance parameter to 1 so that the model is identified. I am aware of the BEGINCNST and ENDCNST statements, which are used to define constants. However, when I used those statements and I set the parameter within the array to 1, the posterior mean of the variance parameter was a little over 1. From SAS documentation on PROC MCMC, the BEGINCNST/ENDCNST statements only assign initial values to a parameter and I was expecting SAS to constrain the value of the variance parameter to 1. Am I going about this correctly?

 

 

Contributor
Posts: 43

Re: Setting a constant in PROC MCMC

Hi all,

 

I have a question related to my original question. I have set up an array of variance parameters that represent variances/covariances in random effects (let's call it s2z):

 

array s2z[7,7]    s2z1   s2z2  s2z3  s2z4  s2z5  s2z6  s2z7
		         s2z8   s2z9 s2z10 s2z11 s2z12 s2z13 s2z14
		       s2z15 s2z16 s2z17 s2z18 s2z19 s2z20 s2z21
		       s2z22 s2z23 s2z24 s2z25 s2z26 s2z27 s2z28
		       s2z29 s2z30 s2z31 s2z32 s2z33 s2z34 s2z35
		       s2z36 s2z37 s2z38 s2z39 s2z40 s2z41 s2z42
		       s2z43 s2z44 s2z45 s2z46 s2z47 s2z48 s2z49; 

Originally, I wanted to free up a degree of freedom by constraining s2z49 to 1 by using the BEGINCNST/ENDCNST statements:

 

begincnst; s2z49 = 1; endcnst;

However, in the PARMS statement where I put s2z, this obviously includes s2z49, which I would like to be constant and not a parameter to be estimated. Does anybody have any ideas as to how I can still include s2z49 in the array but not include it as an estimated parameter? I ask because the autocorrelations are quite poor and I think that freeing up a parameter may help. Thanks!

Ask a Question
Discussion stats
  • 1 reply
  • 90 views
  • 0 likes
  • 1 in conversation