final Vector globalMeanError = postGlobalMeanSample.minus(priorGlobalMeanSample);
final ScaledInverseGammaCovDistribution updatedGlobalMeanCov =
particle.getPriorBetaCov().clone();
updateCovariancePrior(updatedGlobalMeanCov, globalMeanError);
final Matrix globalMeanCovSmpl = updatedGlobalMeanCov.sample(random)
.times(updatedGlobalMean.getCovariance());
Preconditions.checkState(globalMeanCovSmpl.getElement(0, 0) > 0d);
updatedGlobalMean.setCovariance(globalMeanCovSmpl);
final PolyaGammaLogitDistribution updatedParticle =