This function evaluates the inverse of the noncentral F cumulative distribution function (CDF).
FNIN — Function value, the value of the inverse of the cumulative distribution function evaluated at P. The probability that a noncentral F random variable takes a value less than or equal to FNIN is P. (Output)
P — Probability
for which the inverse of the noncentral F cumulative distribution
function is to be evaluated. (Input)
P must be non-negative
and less than 1.
DF1 — Number of
numerator degrees of freedom of the noncentral F
distribution. (Input)
DF1 must be positive.
DF2 — Number of
denominator degrees of freedom of the noncentral F
distribution. (Input)
DF2 must be positive.
LAMBDA —
Noncentrality parameter. (Input)
LAMBDA must be non-negative.
Generic: FNIN (P, DF1, DF2, LAMBDA)
Specific: The specific interface names are S_FNIN and D_FNIN.
If X is a noncentral chi-square random variable with noncentrality parameter λ and ν1 degrees of freedom, and Y is a chi-square random variable with ν2 degrees of freedom which is statistically independent of X, then
is a noncentral F-distributed random variable whose CDF is given by
where:
and Γ(.) is the gamma function, and p = CDF(f) is the probability that F < f. The correspondence between the arguments of function FNIN(P,DF1,DF2,LAMBDA) and the variables in the above equations is as follows: ν1 = DF1, ν2 = DF2, λ = LAMBDA, and p = P.
Function FNIN evaluates
Function FNIN uses bisection and modified regula falsi search algorithms to invert the distribution function CDF(f), which is evaluated using function FNDF. For sufficiently small p, an accurate approximation of can be used which requires no such inverse search algorithms.
This example traces out a portion of an inverse noncentral F distribution with parameters .
USE UMACH_INT
USE FNDF_INT
USE FNIN_INT
IMPLICIT NONE
INTEGER NOUT, I
REAL F, LAMBDA, DF1, DF2, CDF, CDFINV,F0(8)
DATA F0 / 0.0, .4, .8, 1.2, 1.6, 2.0, 2.8, 4.0 /
CALL UMACH (2, NOUT)
DF1 = 100.0
DF2 = 10.0
LAMBDA = 10.0
WRITE (NOUT,'("DF1: ", F4.0, "; DF2: ", F4.0, &
"; LAMBDA: ", F4.0 // " F P = CDF(F) CDFINV(P)")')&
DF1, DF2, LAMBDA
DO I = 1, 8
F = F0(I)
CDF = FNDF(F, DF1, DF2, LAMBDA)
CDFINV = FNIN(CDF, DF1, DF2, LAMBDA)
WRITE (NOUT,'(1X, F5.1, 2(2X, E12.6))') F, CDF, CDFINV
END DO
END
DF1: 100.; DF2: 10.; LAMBDA: 10.
F P = CDF(F) CDFINV(P)
0.0 0.000000E+00 0.000000E+00
0.4 0.488790E-02 0.400000E+00
0.8 0.202633E+00 0.800000E+00
1.2 0.521143E+00 0.120000E+01
1.6 0.733853E+00 0.160000E+01
2.0 0.850413E+00 0.200000E+01
2.8 0.947125E+00 0.280000E+01
4.0 0.985358E+00 0.400000E+01
PHONE: 713.784.3131 FAX:713.781.9260 |