* PROGRAM FOR NON-CENTRAL F(1,4,5) DISTRIBUTION * The reference for computing non-central F probabilities with * non-centrality parameter C is: * Norton, APPLIED STATISTICS, 1983, pp. 84-85 * "A Simple Algorithm for Computing the non-central F Distribution" * The method is exact to an accuracy set in SHAZAM at EPS = 0.0001. SAMPLE 1 1 GEN1 CRIT=16 GEN1 DF1=1 GEN1 DF2=4 GEN1 C=5 DISTRIB CRIT / TYPE=F DF1=DF1 DF2=DF2 C=C * Now use the Davies algorithm. * Since the Davies algorithm works on chi-square and F is the ratio of * two chi-square variables, you must convert the statistic to the * sum of chi-squares by moving the denominator to the left. * That is, F=(CHI1/df1)/(CHI2/df2) becomes 0=(1/df1)CHI1-(F/df2)CHI2 DIM LAMB 2 DF 2 NC 2 GENR DF=DF1 GENR LAMB=1/DF GENR NC=C SAMPLE 2 2 GENR DF=DF2 GENR LAMB=-CRIT/DF2 GENR NC=0 SAMPLE 1 1 GEN1 C=0 DISTRIB C / TYPE=DAVIES N=2 DFVEC=DF LAMBDA=LAMB NONCEN=NC STOP