BookmarkSubscribeRSS Feed
fengyuwuzu
Pyrite | Level 9

When I tried to use the code below to run Proc MCMC, I got two warnings:

WARNING: There is still significant autocorrelation after 50 lags, and the effective sample size for the parameter pm_a might not 
be estimated accurately.

WARNING: There is still significant autocorrelation after 50 lags, and the effective sample size for the parameter pm_b might not 
be estimated accurately.

 

I tried removing "thin=25" or changing the value of thin, I still got these warnings. Any suggestions? 

 

title 'Gamma Survival Model';
ods graphics on;
proc mcmc data=adtte outpost=expsurvout nmc=5025 thin=25 seed=4861
   diag=(mcse ess);
   ods select PostSumInt TADpanel ess mcse;

   parms pm_a = 1.2 pm_b = 200;
   prior pm_a ~ gamma(0.01, is=0.01);
   prior pm_b ~ gamma(0.1, is=0.001);

   llike = (1-cnsr)*logpdf("gamma", aval, pm_a, pm_b) +
             cnsr*logsdf("gamma", aval, pm_a, pm_b);

   model general(llike);
run;

 

2 REPLIES 2
SAS_Rob
SAS Employee
When you have high autocorrelation among the samples, you need to run the chain much longer to obtain a few thousand independent samples. This is what the NMC= option does. Try increasing that
fengyuwuzu
Pyrite | Level 9

Thank you. But when I increased nmc=5000000 I still got this same warning. 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1255 views
  • 0 likes
  • 2 in conversation