Learn R Programming

ER (version 1.1.1)

confints: Confidence Intervals of Effect Differences

Description

Confidence Intervals of Effect Differences

Usage

confints(X1, X2, confidence = 0.95, df.used = 0)

# S3 method for confints plot( x, y, xlab = "", ylab = "normalised log2", sorted = TRUE, labels = FALSE, nonZero = FALSE, xlim = NULL, ylim = NULL, text.pt = 12, ... )

Value

An object of class confints, which holds the information needed to perform statistics or plot the confidence intervals is returned from confints. The plotting routine returns a ggplot structure for plotting.

Arguments

X1

data.frame containing first effect.

X2

data.frame containing second effect.

confidence

Level of confidence, default = 0.95.

df.used

Optional argument indicating how many degrees of freedom have been consumed during deflation. Default = 0.

x

Object of class confint.

y

Not used.

xlab

X label (character)

ylab

Y label (character)

sorted

Logical indicating if intervals should be sorted according to their mean values, or a vector of indices/labels to sort by.

labels

Logical indicating if sample labels should be used on x axis.

nonZero

Logical indicating if intervals are required not to include zero.

xlim

Limits of the horizontal scale.

ylim

Limits of the vertical scale.

text.pt

Size scaling of text in the plot (default = 16).

...

Further arguments to qplot.

See Also

ER, elastic and pls.

Examples

Run this code
data(MS)
# Compare MS and non-MS patients within cluster 1
conf <- with(MS, confints(proteins[MS == "yes" & cluster == 1,],
                          proteins[MS == "no"  & cluster == 1,]))
p1 <- plot(conf)
p2 <- plot(conf, nonZero = TRUE) # Only intervals without 0.
grid.arrange(p1,p2)

# Shorter plot with labels
confShort <- conf[1:10,]
p1 <- plot(confShort, labels = TRUE)
p2 <- plot(confShort, labels = TRUE, nonZero = TRUE)
grid.arrange(p1,p2)

Run the code above in your browser using DataLab