- x
numeric vector of observations. Missing (NA
), undefined (NaN
), and
infinite (Inf
, -Inf
) values are allowed but will be removed.
- y
a numeric vector (not necessarily of the same length as x
).
Missing (NA
), undefined (NaN
), and infinite
(Inf
, -Inf
) values are allowed but will be removed.
The default value is y=NULL
, in which case the empirical cdf of
x
will be plotted along with the theoretical cdf specified by the
argument distribution
.
- discrete
logical scalar indicating whether the assumed parent distribution of x
is discrete (discrete=TRUE
) or continuous (discrete=FALSE
; the default).
- prob.method
character string indicating what method to use to compute the plotting positions
(empirical probabilities). Possible values are
plot.pos
(plotting positions, the default if discrete=FALSE
) and
emp.probs
(empirical probabilities, the default if discrete=TRUE
).
See the help file for ecdfPlot
for more explanation.
- plot.pos.con
numeric scalar between 0 and 1 containing the value of the plotting position constant.
When y
is supplied, the default value is plot.pos.con=0.375
.
When y
is not supplied, for the normal, lognormal, three-parameter lognormal,
zero-modified normal, and zero-modified lognormal distributions, the default value
is plot.pos.con=0.375
.
For the Type I extreme value (Gumbel) distribution (distribution="evd"
),
the default value is plot.pos.con=0.44
. For all other distributions, the
default value is plot.pos.con=0.4
.
See the help files for ecdfPlot
and qqPlot
for more
information. This argument is ignored if prob.method="emp.probs"
.
- distribution
when y
is not supplied,
a character string denoting the distribution abbreviation. The default value is
distribution="norm"
. See the help file for
Distribution.df
for a
list of possible distribution abbreviations. This argument is ignored if y
is supplied.
- param.list
when y
is not supplied,
a list with values for the parameters of the distribution. The default value is
param.list=list(mean=0, sd=1)
. See the help file for Distribution.df
for the names and possible values of the parameters associated with each distribution.
This argument is ignored if y
is supplied or estimate.params=TRUE
.
- estimate.params
when y
is not supplied,
a logical scalar indicating whether to compute the cdf for x
based on estimating the distribution parameters (estimate.params=TRUE
) or
using the known distribution parameters specified in param.list
(estimate.params=FALSE
). The default value is TRUE
unless the argument
param.list
is supplied. The argument estimate.params
is ignored if y
is supplied.
- est.arg.list
when y
is not supplied and estimate.params=TRUE
,
a list whose components are optional arguments associated with the function used to
estimate the parameters of the assumed distribution (see the help file
Estimating Distribution Parameters).
For example, all functions used to estimate distribution parameters have an
optional argument called method
that specifies the method to use to estimate the parameters.
(See the help file for Distribution.df
for a list of available estimation
methods for each distribution.) To override the default estimation method, supply the argument
est.arg.list
with a component called method
; for example
est.arg.list=list(method="mle")
. The default value is
est.arg.list=NULL
so that all default values for the estimating function are used.
This argument is ignored if estimate.params=FALSE
or y
is supplied.
- x.col
a numeric scalar or character string determining the color of the empirical cdf
(based on x
) line or points. The default value is x.col="blue"
.
See the entry for col
in the help file for par
for more
information.
- y.or.fitted.col
a numeric scalar or character string determining the color of the empirical cdf
(based on y
) or the theoretical cdf line or points.
The default value is
y.or.fitted.col="black"
. See the entry for
col
in the help file for par
for more information.
- x.lwd
a numeric scalar determining the width of the empirical cdf (based on x
) line.
The default value is x.lwd=3*par("cex")
.
See the entry for lwd
in the help file for par
for more information.
- y.or.fitted.lwd
a numeric scalar determining the width of the empirical cdf (based on y
)
or theoretical cdf line.
The default value is y.or.fitted.lwd=3*par("cex")
.
See the entry for lwd
in the help file for par
for more information.
- x.lty
a numeric scalar determining the line type of the empirical cdf
(based on x
) line. The default value is
x.lty=1
. See the entry for lty
in the help file for par
for more information.
- y.or.fitted.lty
a numeric scalar determining the line type of the empirical cdf
(based on y
) or theoretical cdf line. The default value is
y.or.fitted.lty=2
.
See the entry for lty
in the help file for par
for more information.
- digits
when y
is not supplied,
a scalar indicating how many significant digits to print for the distribution
parameters. The default value is digits=.Options$digits
.
- type, main, xlab, ylab, xlim, ylim, ...
additional graphical parameters (see lines
and par
).
In particular, the argument type
specifies the kind of line type.
By default, the function cdfCompare
plots a step function (type="s"
)
when discrete=TRUE
, and plots a straight line between points
(type="l"
) when discrete=FALSE
.
The user may override these defaults by supplying the graphics parameter type
(type="s"
for a step function, type="l"
for linear interpolation,
type="p"
for points only, etc.).