OCshow {OCplus} | R Documentation

## Show one ore several OC curves graphically

### Description

Plots empirical OC curves for one or several data sets simultaneously, showing the local or global false discovery rate among the top regulated genes. This is the preferred way of comparing the OC of different analyses.

### Usage

    OCshow(x, ..., global = TRUE, percentage = TRUE, top = 0.1, legend, lty, col, main, xlab, ylab)

### Arguments

`x, ...` | one or several objects created by either `EOC`, `fdr1d`, or `fdr2d`
`global` | logical value indicating whether to show the global or the local false discovery rates; note that if any of the objects to be plotted was created by `EOC`, only global Fdr is available.
`percentage` | logical switch indicating whether to show the percentage of top regulated genes or the actual numbers; note that the cutoff `top` is always a percentage
`top` | a value between 0 and 1 specifying the percentage of top-regulated genes that is to be shown in the plot
`legend` | a character vector giving names for each of the objects to be plotted for a legend in the left upper corner
`lty, col` | line styles and colors for the different OC curves
`main` | a plot title
`xlab, ylab` | axis labels

### Details

Each object generated by `EOC`, `fdr1d`, and `fdr2d` lists for each gene a t-statistic and either a local or a global false discovery rate. The OC curves are constrcuted by ordering the genes according to the false discovery rates, and counting how many fall under a given threshold. These counts are plotted (either directly or as percentage of all genes) on the horzontal axis, while the thresholds are plotted on the vertical axis. Where appropriate, local false discovery rates are converted to global rates by simple averaging.

### Author(s)

A. Ploner

### See Also

`EOC`, `fdr1d`, `fdr2d`

### Examples

    # We simulate a small example with 5 percent regulated genes and
    # a rather large effect size
    set.seed(2003)
    xdat = matrix(rnorm(50000), nrow=1000)
    xdat[1:25, 1:25] = xdat[1:25, 1:25] - 2
    xdat[26:50, 1:25] = xdat[26:50, 1:25] + 2
    grp = rep(c("Sample A","Sample B"), c(25,25))

    # Compute the different false discovery rates
    # p0 is fixed
    global = EOC(xdat, grp, plot=FALSE, p0=0.95)
    local1d = fdr1d(xdat, grp, p0=0.95)
    local2d = fdr2d(xdat, grp, p0=0.95)

    # Some possible arrangements
    leg = c("global","local1d","local2d")
    par(mfrow=c(2,2))
    OCshow(global, local1d, local2d, legend=leg, main="Default")
    OCshow(global, local1d, local2d, legend=leg, percentage=FALSE,
           main="Number of genes")
    OCshow(global, local1d, local2d, legend=leg, top=1, main="All genes")
    OCshow(local1d, local2d, legend=leg[2:3], global=FALSE, main="Local fdr")

[Package OCplus version 1.68.0 Index]