Learn R Programming

extremeStat (version 1.3.0)

plotLfit: Plot distributions fitted with L-moments

Description

Plot histogram and distribution densities or ecdf with cumulated probability

Usage

plotLfit(dlf, nbest = 5, selection = NULL, order = TRUE, rmse = 4, cdf = FALSE, log = FALSE, supportends = TRUE, breaks = 20, xlim = extendrange(dlf$dat, f = 0.15), ylim = NULL, col = "grey", main = paste(if (cdf) "Cumulated", "density distributions of", dlf$datname), xlab = dlf$datname, ylab = if (cdf) "(Empirical) Cumulated Density (CDF)" else "Probability Density Function (PDF)", las = 1, distcols = berryFunctions::rainbow2(nbest), lty = 1, add = FALSE, logargs = NULL, legend = TRUE, legargs = NULL, histargs = NULL, ...)

Arguments

dlf
List as returned by distLfit, containing the elements dat, parameter, gof, datname
nbest
Number of distributions plotted, in order of goodness of fit. DEFAULT: 5
selection
Names of distributions in dlf$parameter that will be drawn. Overrides nbest. DEFAULT: NULL
order
Logical: order legend and colors by RMSE, even if dlf$gof is unordered or selection is given? DEFAULT: TRUE
rmse
Integers. If rmse != 0, RMSE values are added to legend. They are rounded to rmse digits. DEFAULT: 4
cdf
If TRUE, plot cumulated DF instead of probability density. DEFAULT: FALSE
log
If TRUE, logAxis is called. Only makes sense if dlf$dat is already logarithmic and ranges eg. from -2 to 3. DEFAULT: FALSE
supportends
If TRUE, dots are placed at the support bounds. DEFAULT: TRUE
breaks
hist breaks. DEFAULT: 20
xlim, ylim
hist or ecdf axis limits.
col
hist bar color or ecdf point color. DEFAULT: "grey"
main, xlab, ylab
hist or ecdf main, xlab, ylab. DEFAULT: abstractions fom dlf$datname
las
Label Axis Style for orientation of numbers along axes. DEFAULT: 1
distcols
Color for each distribution added with lines. DEFAULT: rainbow2
lty
Line TYpe for plotted distributions. Recycled vector of length nbest. DEFAULT: 1
add
If TRUE, hist/ecdf is not called before adding lines. This lets you add lines highly customized one by one. DEFAULT: FALSE
logargs
List of arguments passed to logAxis if log=TRUE. DEFAULT: NULL
legend
Should legend be called? DEFAULT: TRUE
legargs
List of arguments passed to legend except for legend and col. DEFAULT: NULL
histargs
List of arguments passed to hist or ecdf except for x, freq. DEFAULT: NULL
...
Further arguments passed to lines, like type, pch, ...

Value

invisible dlf object, see printL

Details

By default, this plots density instead of CDF, because the distributions are easier to discern and tail behaviour is easier to judge visually. See also http://www.vosesoftware.com/ModelRiskHelp/index.htm#Presenting_results/Cumulative_plots/Relationship_between_cdf_and_density_(histogram)_plots.htm

See Also

distLfit, plotLquantile

Examples

Run this code
 # See distLfit

Run the code above in your browser using DataLab