fran(3f) - [M_datapac:RANDOM] generate F random numbers
Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
References
SUBROUTINE FRAN(N,Nu1,Nu2,Istart,X)
INTEGER,intent(in) :: N INTEGER,intent(in) :: Nu1 INTEGER,intent(in) :: Nu2 INTEGER,intent(inout) :: Istart REAL(kind=wp),intent(out) :: X(:)
FRAN(3f) generates a random sample of size n from the F distribution with integer degrees of freedom parameters = NU1 AND NU2.This distribution is defined for all non-negative x.
The probability density function is given in the references below.
N The desired integer number of random numbers to be generated. NU1 The integer degrees of freedom for the numerator of the F ratio. nu1 should be a positive integer variable. NU2 The integer degrees of freedom NU2 should be a positive integer variable for the denominator of the F ratio. ISTART An integer flag code which (if set to 0) will start the generator over and hence produce the same random sample over and over again upon successive calls to this subroutine within a run; or (if set to some integer value not equal to 0, like, say, 1) will allow the generator to continue from where it stopped and hence produce different random samples upon successive calls to this subroutine within a run.
X A vector (of dimension at least N) into which the generated random sample will be placed.
Sample program:
program demo_fran use M_datapac, only : fran implicit none ! call fran(x,y) end program demo_franResults:
The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.
John Urban, 2022.05.31
CC0-1.0
o Mood and Grable, Introduction to the Theory of Statistics, 1963, pages 231-232. o Johnson and Kotz, Continuous Univariate Distributions--2, 1970, pages 75-93. o Hastings and Peacock, Statistical Distributions--A Handbook for Students and Practitioners, 1975, page 64.
Nemo Release 3.1 | fran (3) | February 23, 2025 |