Graphs Two Cumulative Distribution Functions.

DESCRIPTION:

For a one sample problem, compares the empirical distribution function (edf) of the sample with a hypothesized cumulative distribution function. For a two sample problem, compares the edfs for the two samples. This graphical comparison is often useful before performing the Kolmogorov-Smirnov test (function ks.gof).

USAGE:

cdf.compare(x, y = NULL, distribution = "normal", ...)  

REQUIRED ARGUMENTS:

x
numeric vector. NAs and Infs are allowed but will be removed.

OPTIONAL ARGUMENTS:

y
numeric vector. NAs and Infs are allowed but will be removed.
distribution
character string that specifies the hypothesized distribution in the one sample test. For two samples, i.e. when y is specified, this argument is ignored. distribution can be one of: "normal", "beta", "cauchy", "chisquare", "exponential", "f", "gamma", "lognormal", "logistic", "t", "uniform", "weibull", "binomial", "geometric", "hypergeometric", "negbinomial", "poisson", or "wilcoxon". You need only supply the first characters that uniquely specify the distribution name. For example, "logn" and "logi" uniquely specify the lognormal and logistic distributions.
...
For one sample, parameter arguments for the S-PLUS function that generates p-values for the hypothesized distribution.

SIDE EFFECTS:

Produces a plot of the two compared cdfs on the current graphics device.

SEE ALSO:

, , (to create QQ plots), , , ..

EXAMPLES:

# one sample 
z <- rnorm(100)                   
cdf.compare(z,dist="normal")          #compare with a normal distn. 
cdf.compare(z,dist="chisquare",df=2)  #compare with a chisquare distn. 
# two sample 
x <- rnorm(25) 
y <- rexp(100) 
cdf.compare(x,y)