Description Usage Arguments Details Value Note Author(s) References See Also Examples
Plots to visualize the result of a Global Test in terms of the contributions of the covariates and the subjects.
1 2 3 4 5 6 7 8 9 10 11 12 13 | covariates(object,
what = c("p-value", "statistic", "z-score", "weighted"),
cluster = "average", alpha = 0.05, sort = TRUE, zoom = FALSE,
legend = TRUE, plot = TRUE, colors, alias, help.lines = FALSE,
cex.labels = 0.6, ylim, pdf, trace)
features(...)
subjects(object,
what = c("p-value", "statistic", "z-score", "weighted"),
cluster = "average", sort = TRUE, mirror = TRUE,
legend = TRUE, colors, alias, help.lines = FALSE,
cex.labels = 0.6, ylim, pdf)
|
object |
A |
what |
Gives a choice between various presentations of the same plot. See below under details. |
cluster |
The type of hierarchical clustering performed for the dendrogram. Default is average linkage clustering. For other options, see |
alpha |
Parameter between 0 and 1. Sets the level of family-wise error control in the multiple testing procedure performed on the dendrogram. See below under details. |
sort |
If |
zoom |
If |
legend |
If |
plot |
If |
colors |
The colors to be used for the bars. See |
alias |
Optional alternative labels for the bars in the plots. Should be a character vector of the same length as the number of covariates or subjects, respectively. |
help.lines |
If |
cex.labels |
Magnification factor for the x-axis labels. |
ylim |
Override for the y axis limits of the barplot. |
pdf |
Optional filename ( |
trace |
If |
mirror |
If |
... |
All arguments of |
These two diagnostic plots decompose the test statistics into the contributions of the different covariates and subjects to make the influence of these covariates and subjects visible.
The covariates
plot exploits the fact that the global test statistic for a set of alternative covariates can be written as a weighted sum of the global test statistics for each single contributing covariate. By displaying these component global test results in a bar plot the covariates
plot gives insight into the subset of covariates that is most responsible for the significant test result. The plot can show the p-values
of the component tests on a reversed log scale (the default); their test statistics
, with stripes showing their mean and standard deviation under the null hypothesis; the z-scores
of these test statistics, standardized to mean zero and standard deviation one; or the weighted
test statistics, where the test statistics are multiplied by the relative weight that each covariate carries in the overall test. See the Vignette for more details.
The dendrogram of the covariates
plot is based on correlation distance if the directional
argument was set to TRUE
in the call to gt
, and uses absolute correlation distance otherwise. The coloring of the dendrogram is based on the multiple testing procedure of Meinshausen (2008): this procedure controls the family-wise error rate on all 2n-1
hypotheses associated with the subsets of covariates induced by the clustering graph. All significant subsets are colored black; non-significant ones remain grey. This coloring serves as an additional aid to find the subsets of the covariates most contributing to a significant test result.
The features
function is a synonym for covariates
, using exactly the same arguments.
The subjects
plot exploits the fact that the global test can be written as a sum of contributions of each individual. Each of these contributions is itself a test statistic for the same null hypothesis as the full global test, but one which puts a greater weight on the observed information of a specific subject. These test statistic of subject i
is significant if, for the other subjects, similarity in the alternative covariates to subject i
tends to coincide with similarity in residual response to subject i
. Like the covariates
plot, the subjects
plot can show the p-values
of these component tests on a reversed log scale (the default); their test statistics
, with stripes showing their mean and standard deviation under the null hypothesis; the z-scores
of these test statistics, standardized to mean zero and standard deviation one; or the weighted
test statistics, where the test statistics are multiplied by the relative weight that each covariate carries in the overall test. Setting mirror=FALSE
reverses the bars of subjects with a negative residual response (not applicable if p-values
are plotted). The resulting statistics
values have the additional interpretation that they are proportional to the first order estimates of the linear predictors of each subject under the alternative, i.e. subjects with positive values have higher means under the alternative than under the null, and subjects with negative values have lower means under the alternative than under the null. See the Vignette for more details.
The dendrogram of the subjects
plot is always based on correlation distance. There is no analogue to Meinshausen's multiple testing method for this dendrogram, so multiple testing is not performed.
If called to make a single plot, the covariates
function returns an object of class gt.object
. Several methods are available to access this object: see gt.object
. The subjects
function returns a matrix. If called to make multiple plots, both functions return NULL
.
The term "z-score" is not meant to imply a normal distribution, but just refers to a studentized score. The z-scores of the subjects
plot are asymptotically normal under the null hypothesis; the z-scores of the covariates
plot are asymptotically distributed as a chi-squared variable with one degree of freedom.
Jelle Goeman: j.j.goeman@lumc.nl; Livio Finos.
General theory and properties of the global test are described in
Goeman, Van de Geer and Van Houwelingen (2006) Journal of the Royal Statistical Society, Series B 68 (3) 477-493.
Meinshausen's method for multiple testing
Meinshausen (2008) Biometrika 95 (2) 265-278.
For more references related to applications of the test, see the vignette GlobalTest.pdf included with this package.
Diagnostic plots: covariates
, subjects
.
The gt.object
function and useful functions associated with that object.
Many more examples in the vignette!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Simple examples with random data here
# Real data examples in the Vignette
# Random data: covariates A,B,C are correlated with Y
set.seed(1)
Y <- rnorm(20)
X <- matrix(rnorm(200), 20, 10)
X[,1:3] <- X[,1:3] + Y
colnames(X) <- LETTERS[1:10]
# Preparation: test
res <- gt(Y,X)
# Covariates
covariates(res)
covariates(res, what = "w")
covariates(res, zoom = TRUE)
# Subjects
subjects(res)
subjects(res, what = "w", mirror = FALSE)
# Change legend, colors or labels
covariates(res, legend = c("upregulated", "downregulated"))
covariates(res, col = rainbow(2))
covariates(res, alias = letters[1:10])
# Extract data from the plot
out <- covariates(res)
result(out)
extract(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.