plot.mc {mc2d}R Documentation

Plots Results of a Monte Carlo Simulation

Description

Plots the empirical cumulative distribution function of a mcnode or a mc object ("0" and "V" nodes) or the empirical cumulative distribution function of the estimate of a mcnode or mc object ("U" and "VU" nodes).

Usage

## S3 method for class 'mc':
plot(x, prec=0.01, stat=c("median", "mean"), lim=c(0.025, 0.975),
          na.rm=TRUE, griddim=NULL, xlab=NULL, ylab="Fn(x)", main="",
          draw=TRUE, ...)
## S3 method for class 'mcnode':
plot(x, ...)
## S3 method for class 'plotmc':
plot(x, ...)
## S3 method for class 'mccut':
plot(x, stat=c("median", "mean"), lim=c(0.025, 0.975), griddim=NULL,
          xlab=names(x), ylab="Fn(x)", main="", draw=TRUE, ...)

Arguments

x a mcnode or a mc objects
prec the precision of the plot. 0.01 will provide an ecdf from the 0.00, 0.01, .02, ..., 1.00 quantiles, 0.001 will provide a 0.000, 0.001, 0.002, ..., 1.000 quantiles,...
stat the function used for estimates (2D mc or mcnode). By default the median.
lim a vector of numbers (between 0 and 1) indicating the enveloppe (2D mc or mcnode) . Maybe NULL or empty.
na.rm Should NA values be discarded
griddim a vector of two integers, indicating the size of the grid of the graph. If NULL, the grid is calculated to produce a "nice" graph.
xlab vector of labels for the x-axis. If NULL, use the name of the node.
ylab vector of labels for the y-axis.
main vector of main titles of the graph.
draw Should the plot be drawn?
... further arguments to be passed to plot.ecdf.

Details

plot.mcnode is a user-friendly function that send the mcnode to plot.mc.

For "VU" and "U" mcnodes, quantiles are calculated using quantile.mc within each of the nsu simulations (i.e. by columns of each mcnode). The medians (but may be the means using stat="mean") calculated from the nsu values are plotted. The 0.025 and 0.975 quantiles (default values of lim) of these quantiles are used as the enveloppe.

Value

A plot.mc object, list of the quantiles used to plot the draw.

Author(s)

Regis Pouillot

References

Cullen AC and Frey HC (1999) Probabilistic techniques in exposure assessment. Plenum Press, USA, pp. 81-155.

See Also

ecdf, plot, quantile.mc

Examples

data(total)
plot(xVUM3)
plot(total)



[Package mc2d version 0.1-5 Index]