check.pdf {lmomco}R Documentation

Check and Potentially Graph Probability Density Functions

Description

This convenience function checks that a given probability density function from lmomco appears to workout as mathematically valid. Basically a pdf function must integrate to unity. The check.fs function permits some flexibility in the limits of integration and provides a high-level interface from graphical display of the pdf.

Usage

check.pdf(pdfunc,  para, lowerF=0.001, upperF=0.999, 
eps=0.02, verbose=FALSE, plot=FALSE, plotlowerF=0.001, 
plotupperF=0.999, ...)

Arguments

pdfunc 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 check.pdf function.)
verbose Is verbose output desired?
plot Should a plot (polygon) of the pdf integration be produce?
plotlowerF Alternative lower limit for the generation of the curve depicting the pdf function.
plotupperF Alternative upper limit for the generation of the curve depicting the pdf function.
... Additional arguments that are passed onto the integration function.

Value

An R list structure is returned

isunity Given the eps is F close enough.
F The numerical integration of the probability density function from lowerF to upperF.

Author(s)

W.H. Asquith

Examples

lmr <- vec2lmom(c(100,40,0.1)) # Arbitrary L-moments
gev <- pargev(lmr) # parameters of Generalized Extreme Value distribution
wei <- parwei(lmr) # parameters of Weibull distribution

# The Weibull is effectively a reversed GEV and the plots in the
# following examples should demonstrate this.

# Two examples that should integrate to "unity" given default parameters.
check.pdf(pdfgev,gev,plot=TRUE)
check.pdf(pdfwei,wei,plot=TRUE)

# Two examples that will not, but the integrated value on the return list
# should be very close to the median (F=0.5) and the resulting plots
# should affirm what this convenience function is actually doing.
check.pdf(pdfgev,upperF=0.5,gev,plot=TRUE)
check.pdf(pdfwei,upperF=0.5,wei,plot=TRUE)

[Package lmomco version 0.96.3 Index]