/** * Calculates the [Gelman-Rubin]{@link http://www.stat.columbia.edu/~gelman/research/published/brooksgelman2.pdf} * convergence diagnostic for a set of independent chains. Returns the R-hat statistic as a function * of iteration count for each state dimension, starting from the minimum of 2 samples. * * @method gelmanRubin * @memberof ran.mc * @param {Array} samples Array of chains, where each chain is an array of states returned by * [RWM#sample]{@link ran.mc.RWM#sample}. At least two chains are required. * @param {number=} maxLength Maximum number of diagnostic values to return per dimension. Defaults * to the full chain length. * @returns {number[][]} Array of R-hat-vs-iteration arrays, one per state dimension. * @throws {Error} If fewer than two chains are provided. */ export default function gelmanRubin(samples: any[], maxLength?: number | undefined): number[][];