plotCI {jmuOutlier} | R Documentation |
Confidence Interval Plot
Description
Plots multiple confidence intervals on the same graph, and determines the proportion of confidence intervals containing the true population mean.
Usage
plotCI(CI, mu = NULL, plot.midpoints = TRUE,
col = c("black", "red", "darkgreen", "purple"))
Arguments
CI |
N by 2 matrix or 2 by N matrix consisting of N two-sided confidence intervals. |
mu |
Numeric; the population mean, and is |
plot.midpoints |
Logical; plots the midpoints of the confidence intervals if |
col |
A vector of size four, specifying the colors of the line representing population mean, confidence intervals not containing the population mean, confidence intervals containing the population mean, and the sample means, respectively. |
Details
The title of the graph states the proportion of the confidence intervals
containing the true population mean, when the population mean is not NULL
.
Author(s)
Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA
See Also
Examples
# Plot fifty 90% confidence intervals, each based on 13 observations from a
# Normal( mean=70, sd=10 ) distribution.
plotCI( replicate( 50, t.test( rnorm( 13, 70, 10 ), conf.level=0.9 )$conf.int ), 70 )