check.pdf {lmomco} | R Documentation |
Check and Potentially Graph Probability Density Functions
Description
This convenience function checks that a given probability density function (pdf
) from lmomco appears to numerically be valid. By definition a pdf
function must integrate to unity. This function permits some flexibility in the limits of integration and provides a high-level interface from graphical display of the pdf
.
Usage
check.pdf(pdf, para, lowerF=0.001, upperF=0.999,
eps=0.02, verbose=FALSE, plot=FALSE, plotlowerF=0.001,
plotupperF=0.999, ...)
Arguments
pdf |
A probability density function from lmomco. |
lowerF |
The lower bounds of nonexceedance probability for the numerical integration. |
upperF |
The upper bounds of nonexceedance probability for the numerical integration. |
para |
The parameters of the distribution. |
eps |
An error term expressing allowable error (deviation) of the numerical integration from unity. (If that is the objective of the call to the |
verbose |
Is verbose output desired? |
plot |
Should a plot (polygon) of the |
plotlowerF |
Alternative lower limit for the generation of the curve depicting the |
plotupperF |
Alternative upper limit for the generation of the curve depicting the |
... |
Additional arguments that are passed onto the R function |
Value
An R list
structure is returned
isunity |
Given the |
F |
The numerical integration of |
Author(s)
W.H. Asquith
Examples
lmrg <- vec2lmom(c( 100, 40, 0.1)) # Arbitrary L-moments
lmrw <- vec2lmom(c(-100, 40,-0.1)) # Reversed Arbitrary L-moments
gev <- pargev(lmrg) # parameters of Generalized Extreme Value distribution
wei <- parwei(lmrw) # parameters of Weibull distribution
# The Weibull is a reversed GEV and plots in the following examples show this.
# Two examples that should integrate to "unity" given default parameters.
layout(matrix(c(1,2), 2, 2, byrow = TRUE), respect = TRUE)
check.pdf(pdfgev,gev,plot=TRUE)
check.pdf(pdfwei,wei,plot=TRUE)