confints {gemR} | R Documentation |
Confidence Intervals of Effect Differences
Description
Confidence Intervals of Effect Differences
Usage
confints(X1, ...)
## Default S3 method:
confints(X1, X2, confidence = 0.95, df.used = 0, ...)
## S3 method for class 'GEM'
confints(
X1,
factor = 1,
levels = c(1, 2),
confidence = 0.95,
df.used = X1$df.used,
...
)
## S3 method for class 'confints'
plot(
x,
y,
xlab = "",
ylab = "values",
sorted = TRUE,
labels = FALSE,
nonZero = FALSE,
xlim = NULL,
ylim = NULL,
text.pt = 12,
...
)
Arguments
X1 |
|
... |
Further arguments to |
X2 |
|
confidence |
Level of confidence, default = 0.95. |
df.used |
Optional argument indicating how many degrees of freedom have been consumed during deflation. Default = 0. |
factor |
( |
levels |
|
x |
Object of class |
y |
Not used. |
xlab |
X label ( |
ylab |
Y label ( |
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). |
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.
See Also
Analyses using GEM
: elastic
, pca
, sca
, neuralnet
, pls
.
Examples
data(MS)
# Subset to reduce runtime in example
MS$proteins <- MS$proteins[,20:70]
# Compare MS and non-MS patients within group 1
conf <- with(MS, confints(proteins[MS == "yes" & group == 1,],
proteins[MS == "no" & group == 1,]))
p1 <- plot(conf)
p2 <- plot(conf, nonZero = TRUE) # Only intervals without 0.
grid.arrange(p1,p2)
# Comparison repeated but based on ER matrices
gem <- GEM(proteins ~ MS * group, data = MS)
print(effs <- colnames(gem$symbolicDesign)) # Inspect factor names
confGEM <- confints(gem, factor=effs[3], levels=c("yes.1","no.1"))
p1g <- plot(confGEM)
p2g <- plot(confGEM, nonZero = TRUE) # Only intervals without 0.
grid.arrange(p1g,p2g)
# Shorter plot with labels
confShort <- conf[1:10,]
p1 <- plot(confShort, labels = TRUE)
p2 <- plot(confShort, labels = TRUE, nonZero = TRUE)
grid.arrange(p1,p2)