2.1.24.5.2.22 ocmath_para_wbl3


Description

Estimate parameters for 3-paramete Weibull distribution

Syntax

int ocmath_para_wbl3( int iSize, const double * pData, double alpha, double * pPara, const double * pdFixed = NULL, double * pCov = NULL, double * pSE = NULL, double * pCI = NULL, double * pAD = NULL, double * pPval = NULL, int nPercents = 0, const double * pPercents = NULL, double * pPercentiles = NULL, double * pLower = NULL, double * pUpper = NULL, double * pLogLikelihood = NULL )

Parameters

iSize
[input]input data size
pData
[input]input data
alpha
[input]alpha value
pPara
[output]shape, scale and threshold parameter
pdFixed
[input]Fixed parameter value or missing value if not fixed
pCov
[output]covariance
pSE
[output]Standard error of mean
pCI
[output]confidence interval
pAD
[output]Anderson-Darling statistic
pPval
[output]P-value
nPercents
[input]number of Percents
pPercents
[input] Percents
pPercentiles
[output] Percentiles
pLower
[output] lower confidence
pUpper
[output] upper confidence
pLogLikelihood
[output] logLike value

Return

return 0 on successful exit; if an error or warning has been detected, then it returns the specific error or warning code.

Examples

EX1

void ocmath_para_wbl3_ex(){
	
	Worksheet wks = Project.ActiveLayer(); 
	Dataset ds( wks, 0); 
	vector vData( ds );
	vector 	vPerc = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 99.5};
	vector vPs(3);
	vector vFixed(3);
	vFixed = NANUM;
	int nPerc = vPerc.GetSize();
	vector vRefX;
	vRefX.SetSize(nPerc);
	vector vLower, vUpper;
	vLower.SetSize(nPerc);
	vUpper.SetSize(nPerc);
	vector vSE(3), vCI(3*2), vCov(9);
	double dAlpha = 0.05;
	double dAD, dP;
	int nn = ocmath_para_wbl3(vData.GetSize(), vData, dAlpha, vPs, vFixed, vCov, vSE, vCI, &dAD, &dP, nPerc, vPerc, vRefX, vLower, vUpper);

	return;
}

Remark

See Also

Header to Include

origin.h

Reference