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;

 

3 REPLIES 3
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. 

 

Clg
Obsidian | Level 7 Clg
Obsidian | Level 7

Hello,

Did you finally find a solution to this warning?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 3 replies
  • 1731 views
  • 0 likes
  • 3 in conversation