rejectionPlot: Creates a Rejection Plot.

View source: R/rejectionPlot.R

rejectionPlotR Documentation

Creates a Rejection Plot.

Description

This function plots the observed and expected numbers of rejected tests and their ratio as a function of alpha.

Usage

  rejectionPlot(X,lCol="red",xlim=NULL,crit=NULL,rejLine = NULL,
                alpha = 0.01, rej.lty = c("dotted"), rej.col = "black",
		incLegend=NULL)

Arguments

X

Matrix or vector of p-values, as obtained from gmw function.

lCol

Vector of of line colors

xlim

An interval for alpha values (for the plotting). Default is [0,1].

crit

Shall the distance or the ratio be plotted, see details.

rejLine

Type of rejection line. Options are "bh","bonferroni" and "simes".

alpha

Alpha for the multiple testing adjusted p-value- determines the slope of the rejection line.

rej.lty

Line type of the rejection line.

rej.col

Colour of the rejection line.

incLegend

Position of a possible legend.

Details

The matrix X contains p-values as given from the gmw function. The rows correspond to different tests, and the columns to different variables.

The function plots, for each test separately, the observed and expected numbers of rejected tests and their ratio (crit="ratio") or distance (crit="distance") as a function of alpha.

Value

A rejection plot

Author(s)

Daniel Fischer

References

Fischer, D., Oja, H., Schleutker, J., Sen, P.K., Wahlfors, T. (2013): Generalized Mann-Whitney Type Tests for Microarray Experiments, Scandinavian Journal of Statistic, to appear.

Fischer, D., Oja, H. (2013): Mann-Whitney Type Tests for Microarray Experiments: The R Package gMWT, submitted article.

See Also

gmw

Examples

X <- matrix(c(rnorm(50,2,1),rnorm(60,2,1),rnorm(40,2.5,1)),byrow=TRUE, ncol=10)
colnames(X) <- letters[1:10]
g <- c(rep(1,5),rep(2,6),rep(3,4))


test1 <- gmw(X,g,test="mw",type="external",alternative="greater",goi=c(2,3))
test2 <- gmw(X,g,test="kw",type="external")
test3 <- gmw(X,g,test="jt",type="external",alternative="greater")

tests <- rbind(test1$p.values,test2$p.values,test3$p.values)

rejectionPlot(tests,lCol=c("green","red","blue"))

gMWT documentation built on April 19, 2023, 5:11 p.m.