Densities for two distinct samples are estimated and plotted.
overlapDensity(x0, x1, ratio = c(0.05, 20), ratio.number = FALSE,
plotvalues = c("Density", "Numbers"), gpnames = c("Control", "Treatment"),
cutoffs = c(lower = TRUE, upper = TRUE), bw = FALSE,
xlab = "Score", ylab = NULL,
col = 1:2, lty = 1:2, lwd = c(1, 1), ...)overlap.density(x0, x1, ratio = c(0.05, 20), ratio.number = FALSE,
plotvalues = c("Density", "Numbers"), gpnames = c("Control", "Treatment"),
cutoffs = c(lower = TRUE, upper = TRUE), bw = FALSE,
xlab = "Score", ylab = NULL,
col = 1:2, lty = 1:2, lwd = c(1, 1), ...)
control group measurements
treatment group measurements
if not NULL
, the range within which the relative
number per unit interval (ratio.number=TRUE
) or
relative probability density (ratio.number=FALSE
)
of observations from the two groups are required to lie
will be used to determine lower and upper bounds on the
values of x0
and x1
.
[The relative numbers at any point are estimated from
(density1*n1)/(density0*x0)]
If TRUE (default), then ratio
is taken as the ratio of number of points per unit
interval
If set to Number
then the y-axis
scale is chosen so that total area undere the curve is equal
to the sample size; otherwise (plotvalues="Density"
)
total area under each cueve is 1. Any other setting does
not give a plot.
Names of the two samples
logical vector, indicating whether density estimates should be truncated below (lower=TRUE) or above (upper=TRUE)
logical, indicates whether to overwrite with a gray scale plot
Label for x-axis
Label for y-axis
standard color parameter
standard line type preference
standard line width preference
Other parameters to be passed to plot()
J.H. Maindonald
t.test
attach(two65)
overlapDensity(ambient,heated)
t.test(ambient,heated)
Run the code above in your browser using DataLab