plconfint {relevance} | R Documentation |
Plot Confidence Intervals
Description
Plot confidence or relevance interval(s) for several samples and for the comparison of two samples, also useful for replications and original studies
Usage
plconfint(x, y = NULL, select=NULL, overlap = NULL, pos = NULL,
xlim = NULL, refline = 0, add = FALSE, bty = "L", col = NULL,
plpars = list(lwd=c(2,3,1,4,2), posdiff=0.35,
markheight=c(1, 0.6, 0.6), extend=NA, reflinecol="gray70"),
label = TRUE, label2 = NULL, xlab="", ...)
pltwosamples(x, ...)
## Default S3 method:
pltwosamples(x, y = NULL, overlap = TRUE, ...)
## S3 method for class 'formula'
pltwosamples(formula, data = NULL, ...)
Arguments
x |
For
For |
y |
data for a second confidence interval (for |
select |
selects samples, effects, or studies |
overlap |
logical: should shortened intervals be shown to show significance of differences? see Details |
pos |
positions of the bars in vertical direction |
xlim |
limits for the horizontal axis. |
refline |
|
add |
logical: should the plotted elements be added to an existing plot? |
bty |
type of 'box' around the plot, see |
col |
color to be used for the confidence intervals, usually a vector of colors if used. |
plpars |
graphical options, see Details |
label , label2 |
labels for intervals (or intervall pairs)
to be dislayed on the left and right hand margin, respectivly.
If |
xlab |
label for horizontal axis |
formula , data |
formula and data for the |
... |
further arguments to the call of |
Details
Columns 4 and 5 of x
are typically used to indicate
an "overlap interval", which allows for a graphical assessment
of the significance of the test for zero difference(s),
akin the "notches" in box plots:
The difference between a pair of groups is siginificant if their
overlap intervals do not overlap.
For equal standard errors of the groups, the standard error of the
difference between two of them is larger by the factor sqrt(2)
.
Therefore, the intervals should be shortened by this factor, or
multiplied by 1/sqrt(2)
, which is the default for
overlapfactor
.
If only two groups are to be shown, the factor is adjusted to unequal
standard errors, and accurate quantiles of a t distribution are used.
The graphical options are:
lwd
:line widths for: [1] the interval, [2] middle mark, [3] end marks, [4] overlap interval marks, [5] vertical line marking the relevance threshold
markheight
:determines the length of the middle mark, the end marks and the marks for the overlap interval as a multiplier of the default length
extend
:extension of the vertical axis beyond the range
reflinecol
:color to be used for the vertical lines at relevances 0 and 1
Value
none
Author(s)
Werner A. Stahel
See Also
Examples
## --- regression
data(swiss)
rr <- lm(Fertility ~ . , data = swiss)
rt <- termtable(rr)
plot(rt)
## --- termeffects
data(d.blast)
rlm <- lm(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast)
rte <- termeffects(rlm)
plot(rte, single=TRUE)
## --- replication
data(d.osc15Onesample)
td <- d.osc15Onesample
tdo <- structure(td[,c(1,2,6)], names=c("effect", "n", "teststatistic"))
tdr <- structure(td[,c(3,4,7)], names=c("effect", "n", "teststatistic"))
rr <- replication(tdo,tdr)
plconfint(attr(rr, "estimate"), refline=c(0,1))