ev1ppf(3f) - [M_datapac:PERCENT_POINT] compute the extreme value type 1
(Gumbel) percent point function
SUBROUTINE EV1PPF(P,Ppf)
REAL(kind=wp),intent(in) :: P
REAL(kind=wp),intent(out) :: Ppf
EV1PPF(3f) computes the percent point function value for the extreme
value type 1 distribution.
The extreme value type 1 distribution used herein has mean = Euler's
number = 0.57721566 and standard deviation = pi/sqrt(6) = 1.28254983.
This distribution is defined for all x and has the probability
density function
f(x) = (exp(-x)) * (exp(-(exp(-x))))
Note that the percent point function of a distribution is identically
the same as the inverse cumulative distribution function of the
distribution.
P The value (between 0.0 and 1.0 exclusively) at which the
percent point function is to be evaluated.
PPF The percent point function value for the extreme value type
1 distribution with mean = Euler's number = 0.57721566 and standard
deviation = pi/sqrt(6) = 1.28254983.
Sample program:
program demo_ev1ppf
use M_datapac, only : ev1ppf
implicit none
! call ev1ppf(x,y)
end program demo_ev1ppf
Results:
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
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | P | |||
real(kind=wp), | intent(out) | :: | Ppf |
SUBROUTINE EV1PPF(P,Ppf) REAL(kind=wp),intent(in) :: P REAL(kind=wp),intent(out) :: Ppf !--------------------------------------------------------------------- ! ! CHECK THE INPUT ARGUMENTS FOR ERRORS ! IF ( P<=0.0_wp .OR. P>=1.0_wp ) THEN WRITE (G_IO,99001) 99001 FORMAT (' ***** FATAL ERROR--THE FIRST INPUT ARGUMENT TO EV1PPF(3f) IS OUTSIDE THE ALLOWABLE (0,1) INTERVAL *****') WRITE (G_IO,99002) P 99002 FORMAT (' ','***** THE VALUE OF THE ARGUMENT IS ',E15.8,' *****') Ppf = 0.0_wp RETURN ELSE Ppf = -LOG(LOG(1.0_wp/P)) ENDIF END SUBROUTINE EV1PPF