Fix the inconsistency between mh_drop and the number of mh draws discarded

when computing the Brooks and Gelman convergence diagnostics.
time-shift
Stéphane Adjemian (Charybdis) 2010-02-18 16:59:26 +01:00
parent 1ae1b5ff20
commit b762f010cd
2 changed files with 2 additions and 1 deletions

View File

@ -91,6 +91,7 @@ localVars.nblck = nblck;
localVars.NumberOfMcFilesPerBlock = NumberOfMcFilesPerBlock;
localVars.Origin = Origin;
localVars.StepSize = StepSize;
localVars.mh_drop = options_.mh_drop;
localVars.NumberOfDraws = NumberOfDraws;
localVars.NumberOfLines = NumberOfLines;
localVars.time = time;

View File

@ -65,7 +65,7 @@ for j=fpar:npar,
ligne = 0;
for iter = Origin:StepSize:NumberOfDraws
ligne = ligne+1;
linea = ceil(0.5*iter);
linea = ceil(mh_drop*iter);
n = iter-linea+1;
cinf = round(n*ALPHA/2);
csup = round(n*(1-ALPHA/2));