plotCI: Confidence Interval Plot

Description Usage Arguments Details Author(s) See Also Examples

View source: R/plotCI.R

Description

Plots multiple confidence intervals on the same graph, and determines the proportion of confidence intervals containing the true population mean.

Usage

1
2
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 NULL if unknown.

plot.midpoints

Logical; plots the midpoints of the confidence intervals if TRUE (default); otherwise, does not plot the midpoints.

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

CI.t.test

Examples

1
2
3
4
# 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 )

jmuOutlier documentation built on Aug. 6, 2019, 1:03 a.m.