PsiMetalog2Fit(num_coef, x_values, y_values)
PsiMetalog2Fit() computes 2 to 16 coefficients for PsiMetalog2 by fitting m pairs of historical data points and associated probabilities, representing a cumulative distribution function, or CDF (monotonic and increasing). This function only fits for the num_coef specified. Note: This function is computationally expensive. It is recommended to use the Fit dialog, instead of this function, for fitting a distribution to a Metalog2 distribution.
PsiMetalog2Fit accepts three arguments: num_coef, x_values and y_values.
numCoef: A scalar; the number of coefficients to produce.
The minimum value for this argument is 2 and the maximum is 16.
2 <= numCoef <= 16
The value for this argument must be less than or equal to the length of the x_values and y_values arrays.
numCoef <= Length(x_values/y_values)
x_values: An array containing the historical data points. There is no limit on the number of historical data points that may be supplied.
Values must be unique. No values may be repeated in the historical data.
Missing values are not supported.
y_values: (Optional) Contains the associated probabilities for the historical data.
Probabilities must be unique and should occur in ascending order.
Probabilities must be between 0 and 1.
0 < y_values < 1
Missing or 0 values are not supported in the y_values array.
y_values ≠ 0
PsiMetalog2Fit() returns a Dynamic Array. You need only enter the Psi function in one cell as a normal function, i.e., rather than a control array. The contents of the Dynamic Array will "spill" down the column. If a nonblank cell is "blocking" the contents of the Dynamic Array, PsiMetalog2Fit() will return #SPILL until such time as the blockage is removed.
Example: The formula PsiMetalog2Fit(5, A2:E2, A1:E1) is entered into cell A3 where the Y values are probabilities (between 0 and 1) contained in cells A1:E1 and the X_values are contained in cells A2:E2 column. This function computes 5 coefficients by fitting 5 pairs. Note: User must enter the function as an array formula in a horizontal or vertical range-vector with num_coef cells (in order to see all requested coefficients).
A1 = 0.010, A2 = 10
B1 = 0.100, B2 = 22
C1 = 0.500, C2 = 33
D1 = 0.900, D2 = 43
E1 = 0.990, E2 = 50
Parameters
num_coef, x_values, y_values
Range of Function Values