plot.ierror: Plot Errors in Inversion Methods

Description Usage Arguments Details Author(s) See Also Examples

Description

Method for plotting errors in numerical inversion methods.

Usage

1
2
## S3 method for class 'rvgt.ierror'
plot(x, maxonly=FALSE, tol=NA, ...)

Arguments

x

an object of class "rvgt.ierror" or a list of such objects.

maxonly

logical. If TRUE, only show maximal errors.

tol

maximal tolerated error (optional).

...

further graphical parameters.

Details

Plot errors stored in an object of class "rvgt.ierror". The function plots range, interquartile range, median, and maximum. If maxonly is TRUE, then only the maximal errors are plotted.

If present, the maximal tolerated u-error tol is marked by a blue dashed line. Furthermore, tol also can be used to control the plotting range for the error. The plotting range depends on the maximal observed error. If tol is given, then the range is between 1.1*tol and 10*tol.

Argument x must be an object of class "rvgt.ierror" that contains information about u-errors. Such an object is created by uerror or xerror.

Alternatively, when the method is called by its full name, plot.rvgt.ierror, then the first argument x may also be a list of such objects. Then maximual errors for multiple experiments will be plotted in the same graph with different colors (that is, with maxonly=TRUE). Thus one can compare errors of different inverse distribution functions.

Author(s)

Josef Leydold [email protected]

See Also

uerror, xerror.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Create a table of u-errors for spline interpolation of
## the inverse CDF of the standard normal distribution and
## the beta distribution
aqn <- splinefun(x=pnorm((-100:100)*0.05), y=(-100:100)*0.05,
                 method="monoH.FC")
uerrn <- uerror(n=1e5, aqdist=aqn, pdist=pnorm)

aqb <- splinefun(x=pbeta((0:100)*0.01,shape1=2,shape2=5),
                 y=(0:100)*0.01, method="monoH.FC")
uerrb <- uerror(n=1e5, aqdist=aqb, pdist=pbeta, shape1=2, shape2=5)

## Plot u-errors of the normal distribution
plot(uerrn)

## Plot maximal u-errors of the normal distribution
plot(uerrn,maxonly=TRUE)

## Compare the u-errors of these two distributions and
## draw maximal tolerated error
plot.rvgt.ierror(list(uerrn,uerrb),tol=1.e-6)

rvgtest documentation built on May 29, 2017, 9:11 a.m.