public TableEntryData RDiff(double rAppapCoverage = 80) { double[] muOChain = BWModel.Result.GetChainByName("muOverallSample"); double[] chaine = new double[muOChain.Length]; double groupMean = PointEstimateWInterval.GeomMean(muOChain); var c = 100 * (2 * NormalDistribution.QNorm(1 - (100 - rAppapCoverage) / 200) / groupMean); for (int i = 0; i < muOChain.Length; i++) { chaine[i] = c * SigmaChain[i]; } return(new PointEstimateWInterval(chaine)); }
Tuple <string, double> FindExposed(bool findMostExposed) { double currGM = findMostExposed ? Double.NegativeInfinity : Double.PositiveInfinity; string exposedWid = null; foreach (string wId in WorkerIds) { double gMean = PointEstimateWInterval.GeomMean(BWModel.Result.GetChainByName(string.Format("mu_{0}Sample", wId))); if (findMostExposed ? gMean > currGM : gMean < currGM) { currGM = gMean; exposedWid = wId; } } return(Tuple.Create(exposedWid, currGM)); }