1
$\begingroup$

By running the following Bayesian regression model using SAS 9.4:

PROC GENMOD DATA = TRAININGSET;
     CLASS X;
     MODEL Y = X /DIST = POISSON LINK = LOG;
     BAYES
     NMC = 1000
     SEED = 1234
     COEFFPRIOR = NORMAL;
RUN;

I found the following warning in the LOG window:

WARNING: There is still significant autocorrelation after 500 lags, and the 
 size for the parameter XXXX might not be estimated accurately.

What does this kind of error imply in a bayesian framework for the $\beta$ coefficient estimates and what do you suggest to solve/avoid this kind of problem?

Thanks in advance for the help!

$\endgroup$

1 Answer 1

5
$\begingroup$

It implies the draws to estimate the posterior were autocorrelated. This is not about the sample or the model. This is about the software not being able to simulate independence in the posterior sampling process.

Generally, this comes about from using small steps. The software will "thin" your posterior sample, but in this case, the deleted draws are more than four hundred and ninety-nine in five hundred.

The software won't permit that, so it is giving you an answer, but you no longer know if the limiting density of your Markov chain is the posterior.

You can either take larger steps or write your own software. PROC GENMOD does not seem to have a method to control the variability of the sampling. I would recommend you use some other software.

Also, the disclosures that PROC GENMOD provides really are not the greatest. PROC GENMOD appears to be trying to do Metropolis-Hastings(MH). MH chooses a point and randomly offsets a nearby point and performs a test. If it passes then the point is selected and if it is rejected it samples again. If the points are close enough, then this will show up as autocorrelation. Your points are so close that even after 500 draws the association between point 1 and point 500 is not zero yet. That is unusual. Long autocorrelation is more likely to happen when the procedure moves through one dimension at a time.

This produces a very high level of natural autocorrelation which is created by the software rather than the effect of the data. If you had 10 dimensions, that is closer in concept to 50 lags (50x10). My guess is that PROC GENMOD is doing one dimenion at a time.

$\endgroup$
3
  • $\begingroup$ Thanks Dave for the answer. According to you, what value of THINNING= option is reasonable, by considering that the default option is THINNING=1? The option statement is showed in the link support.sas.com/documentation/cdl/en/statug/63033/HTML/default/… up in the below of the page $\endgroup$
    – Quantopik
    Commented Mar 28, 2017 at 18:48
  • $\begingroup$ Not really. If the defaults are kept and thinning =1, then no thinning happens. You have long autocorrelation so thinning should be no less than 500. Under the defaults, this would lead to a sample size of 20. Without actually seeing how much autocorrelation remains, I would probably thin at least 1000 if I were not testing for it other than what is in the warning. Your burn in needs to be a lot longer than the default because of the autocorrelation. Without looking at the chains or the correlogram we can't really help much. Probably multiply the defaults by at least 1000. $\endgroup$ Commented Mar 28, 2017 at 21:13
  • $\begingroup$ Ok Dave! Thanks for the second answer! I ll try what you suggested 😁 $\endgroup$
    – Quantopik
    Commented Mar 28, 2017 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.