private SideReturnData GetSideReturnDataValue(double Y_Ceiling, double Y_LowerLimit, int Y_PartitionNumber) { SideReturnData sideReturnData = new SideReturnData(); double Y_ScaleLength = (LiftingDistributionSelection.QValue(Y_Ceiling) - LiftingDistributionSelection.QValue(Y_LowerLimit)) / Y_PartitionNumber; sideReturnData.responseProbability = new double[Y_PartitionNumber + 1]; for (int i = 0; i <= Y_PartitionNumber; i++) { if (i == 0) { sideReturnData.responseProbability[i] = Y_LowerLimit; } else { sideReturnData.responseProbability[i] = LiftingDistributionSelection.PValue(LiftingDistributionSelection.QValue(Y_LowerLimit) + i * Y_ScaleLength, 0, 1); } } sideReturnData.Y_Ceilings = new double[sideReturnData.responseProbability.Length]; sideReturnData.Y_LowerLimits = new double[sideReturnData.responseProbability.Length]; sideReturnData.responsePoints = new double[sideReturnData.responseProbability.Length]; return(sideReturnData); }
public double ResponsePointCalculate(double fq, double favg, double fsigma) => LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + (LiftingDistributionSelection.QValue(fq) * fsigma));
//计算多组试验结果 public MultigroupTest MultigroupTestResult(int[] nj, double[] Gj, double[] Hj, double[] muj, double[] sigmaj) { int nfinal = 0; var multigroupTest = get_multiGroup_result(nj, muj, sigmaj, Gj, Hj, out nfinal); double f001 = Math.Sqrt(Math.Pow(multigroupTest.Sigma_mu, 2) + Math.Pow(multigroupTest.Sigma_sigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(0.001), 2)); pub_function.resolution_getReso(f001, 0.000001, out multigroupTest.prec01); double f999 = Math.Sqrt(Math.Pow(multigroupTest.Sigma_mu, 2) + Math.Pow(multigroupTest.Sigma_sigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(0.999), 2)); pub_function.resolution_getReso(f999, 0.000001, out multigroupTest.prec999); double p001 = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(multigroupTest.μ0_final) - LiftingDistributionSelection.DistributionProcess() * multigroupTest.σ0_final); pub_function.resolution_getReso(p001, 0.000001, out multigroupTest.rpse01); double p999 = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(multigroupTest.μ0_final) + LiftingDistributionSelection.DistributionProcess() * multigroupTest.σ0_final); pub_function.resolution_getReso(p999, 0.000001, out multigroupTest.rpse999); return(multigroupTest); }
//拟然比法区间计算绘图 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); }
private double[] GetDoubleArray(double Tfw, double Tfw_dance, double fq, double favg, double fsigma, double fsigmaavg, double fsigmasigma) { double[] ie = new double[8]; ie[0] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + LiftingDistributionSelection.QValue(fq) * fsigma + Tfw * Math.Sqrt(Math.Pow(fsigmaavg, 2) + Math.Pow(fsigmasigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(fq), 2))); ie[1] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + LiftingDistributionSelection.QValue(fq) * fsigma - Tfw * Math.Sqrt(Math.Pow(fsigmaavg, 2) + Math.Pow(fsigmasigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(fq), 2))); ie[2] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + LiftingDistributionSelection.QValue(fq) * fsigma + Tfw_dance * Math.Sqrt(Math.Pow(fsigmaavg, 2) + Math.Pow(fsigmasigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(fq), 2))); ie[3] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + LiftingDistributionSelection.QValue(fq) * fsigma - Tfw_dance * Math.Sqrt(Math.Pow(fsigmaavg, 2) + Math.Pow(fsigmasigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(fq), 2))); ie[4] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + Tfw * fsigmaavg); ie[5] = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) - Tfw * fsigmaavg); ie[6] = fsigma + Tfw * fsigmasigma; ie[7] = fsigma - Tfw * fsigmasigma; return(ie); }
//响应点计算 public double ResponsePointCalculation(double fq, double fsimga, double favg) { double rpc = LiftingMethodStandardSelection.ProcessValue(LiftingMethodStandardSelection.InverseProcessValue(favg) + LiftingDistributionSelection.QValue(fq) * fsimga); pub_function.resolution_getReso(rpc, 0.000001, out rpc); return(rpc); }
public double[] ResponsePointStandardError(double Sigma_mu, double Sigma_sigma) { double[] rpse = new double[2]; rpse[0] = pub_function.resolution_getReso(Math.Sqrt(Math.Pow(Sigma_mu, 2) + Math.Pow(Sigma_sigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(0.001), 2)), 0.000001); rpse[1] = pub_function.resolution_getReso(Math.Sqrt(Math.Pow(Sigma_mu, 2) + Math.Pow(Sigma_sigma, 2) * Math.Pow(LiftingDistributionSelection.QValue(0.999), 2)), 0.000001); return(rpse); }