Plot cumulative distribution function for a set of data.
This is a generic function; see
for a version for
resamp objects.
USAGE:
plotCDF(x, weights, cumWeights, new=T, ...)
REQUIRED ARGUMENTS:
x
a vector of numeric data.
OPTIONAL ARGUMENTS:
weights
a vector of weights; if supplied then a cumulative distribution
function is plotted for a weighted distribution, with probability
weights[i] (after normalizing to sum to 1) on observation
x[i].
cumWeights
vector of cumulative weights; if supplied then
x must be sorted,
and the last cumulative weight should equal 1.
new
logical, if
TRUE (the default) then create a new plot, else
add to the existing plot.
...
additional arguments, to pass to graphical functions
plot,
lines,
and
segments.
VALUE:
A list (with the invisible flag set to prevent printing), with components
x
sorted values of
x
y
value of the empirical distribution function at values of
x;
cumulative weights.