private IntervalEstimation GetIntervalEstimationValue(IntervalEstimation rt) { rt.Confidence.Down = LiftingMethodStandardSelection.ProcessValue(rt.Confidence.Down); rt.Confidence.Up = LiftingMethodStandardSelection.ProcessValue(rt.Confidence.Up); rt.Mu.Down = LiftingMethodStandardSelection.ProcessValue(rt.Mu.Down); rt.Mu.Up = LiftingMethodStandardSelection.ProcessValue(rt.Mu.Up); return(rt); }
private static int IntervalEstimation(int count, Worksheet sheet, IntervalEstimation ie, IntervalEstimation ie01, double confidenceLevel) { sheet.Range["B" + count + ":H" + count + ""].Text = "置信水平" + confidenceLevel + ""; sheet.Range["B" + count + ":H" + count + ""].Merge(); count++; sheet.Range["B" + count + ":H" + count + ""].Text = "均值区间估计:(" + ie.Mu.Down + "," + ie.Mu.Up + ")"; sheet.Range["B" + count + ":H" + count + ""].Merge(); count++; sheet.Range["B" + count + ":H" + count + ""].Text = "标准差区间估计:(" + ie.Sigma.Down + "," + ie.Sigma.Up + ")"; sheet.Range["B" + count + ":H" + count + ""].Merge(); count++; sheet.Range["B" + count + ":H" + count + ""].Text = "响应概率为99.9%区间估计:(" + ie.Confidence.Down + "," + ie.Confidence.Up + ")"; sheet.Range["B" + count + ":H" + count + ""].Merge(); count++; sheet.Range["B" + count + ":H" + count + ""].Text = "响应概率为0.1%区间估计:(" + ie01.Confidence.Down + "," + ie01.Confidence.Up + ")"; sheet.Range["B" + count + ":H" + count + ""].Merge(); count++; return(count); }
//拟然比法区间计算绘图 public SideReturnData QuasiLikelihoodRatioMethod(double Y_Ceiling, double Y_LowerLimit, int Y_PartitionNumber, double ConfidenceLevel, double favg, double fsigma, double[] xArray, int[] vArray, int intervalChoose) { var sideReturnData = GetSideReturnDataValue(Y_Ceiling, Y_LowerLimit, Y_PartitionNumber); xArray = LiftingMethodStandardSelection.InverseProcessArray(xArray); for (int i = 0; i < sideReturnData.responseProbability.Length; i++) { IntervalEstimation ie = new IntervalEstimation(); if (intervalChoose == 0) { ie = GetIntervalEstimationValue(SingleSideEstimation(xArray, vArray, sideReturnData.responseProbability[i], ConfidenceLevel, LiftingMethodStandardSelection.InverseProcessValue(favg), fsigma)); } else { ie = GetIntervalEstimationValue(DoubleSideEstimation(xArray, vArray, sideReturnData.responseProbability[i], ConfidenceLevel, LiftingMethodStandardSelection.InverseProcessValue(favg), fsigma)); } sideReturnData.Y_LowerLimits[i] = ie.Confidence.Down; sideReturnData.Y_Ceilings[i] = ie.Confidence.Up; double fq = sideReturnData.responseProbability[i]; sideReturnData.responsePoints[i] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + LiftingDistributionSelection.QValue(fq) * fsigma); } return(sideReturnData); }
public IntervalEstimation IntervalDistribution(double[] xArray, int[] vArray, double reponseProbability, double confidenceLevel, double favg, double fsigma) { MLR_polar.Likelihood_Ratio_Polar(xArray, vArray, "logistic", favg, fsigma, reponseProbability, confidenceLevel, out var final_result); return(IntervalEstimation.Parse(final_result)); }