Generates pseudorandom numbers from the F distribution.
DFN — Numerator
degrees of freedom. (Input)
DFN must be positive.
DFD — Denominator
degrees of freedom. (Input)
DFD must be positive.
R — Vector of length NR containing the random F deviates. (Output)
NR — Number of
random numbers to generate. (Input)
Default: NR = size (R,1).
Generic: CALL RNFDF (DFN, DFD, R [,…])
Specific: The specific interface names are S_RNFDF and D_RNFDF.
Single: CALL RNFDF (NR, DFN, DFD, R)
Double: The double precision name is DRNFDF.
Routine RNFDF generates pseudorandom numbers from an F distribution (see Chapter 17, Probability Distributions Functions and Inverses, routine FDF).
The routine RNSET can be used to initialize the seed of the random number generator. The routine RNOPT can be used to select the form of the generator.
In this example, RNFDF is used to generate five pseudorandom deviates from an F distribution with parameters DFN = 2 and DFD = 3.
USE
UMACH_INT
USE
RNFDF_INT
IMPLICIT NONE
INTEGER NR
PARAMETER (NR=5)
INTEGER NOUT
REAL DFD, DFN, R(NR)
CALL UMACH(2, NOUT)
CALL RNSET(123457)
DFN = 2.0e0
DFD = 3.0e0
CALL RNFDF(DFN, DFD, R)
WRITE (NOUT, 99999) R
99999 FORMAT (' F Random deviates: ', 5F10.4)
END
F Random deviates: 0.0814 0.3639 0.1323 1.5415 1.0350
PHONE: 713.784.3131 FAX:713.781.9260 |