# plot.fdr2d.result: Plotting the bivariate local false discovery results In OCplus: Operating characteristics plus sample size and local fdr for microarray experiments

## Description

These functions provide different ways of plotting the output `fdr2d`.

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```## S3 method for class 'fdr2d.result' plot(x, levels, nr.plot = 20, add = FALSE, grid = FALSE, pch = ".",xlab, ylab, vfont = c("sans serif", "plain"), lcol = "black", ...) Tornadoplot(x, levels, nr.plot = 20, label = FALSE, constrain = FALSE, pch = ".", xlab, ylab, vfont = c("sans serif", "plain"), lcol = "black", ...) Volcanoplot(x, df, levels, nr.plot = 20, label = FALSE, constrain = FALSE, pch = ".", xlab, ylab, vfont = c("sans serif", "plain"), lcol = "black", ...) ```

## Arguments

 `x` an object created by `fdr2d`. `df` the appropriate degrees of freedom for a two-sample t-test with equal variances (in order to provide p-values for the volcano plot). `levels` vector of levels for drawing fdr isolines `nr.plot` number of equidistant breaks defining a two-dimensional grid for smoothing isolines, see Details. `add` logical value indicating whether to create a new plot, or to add to an existing plot. `grid` logical value indicating whether the original grid used for estimating the local fdr should be shown. `label` logical value indicating whether to draw labels on the isolines. `constrain` logical flag indicating whether transformed fdr values should be made monotnously decreasing with the absolute size of the first test statistic, see `fdr2d`. `pch, xlab, ylab` the usual graphical parameters `vfont` vector font specification for labelling the isolines, see `contour`. `lcol` colour used for drawing the isolines `...` extra graphical parameters passed to `plot.default`.

## Details

The plot format is basically a scatter plot of the observed test statistics, overlayed with isolines showing the estimated fdr. The generic plot function displays the original test statistics that are used to estimate the fdr, i.e. the two-sample t-statistics and the logarithmized standard errors; the other plots use different, but mathematically equivalent test statistics:

• mean difference and logarithmized standard error for the tornado plot,

• mean difference and -\log10(p) for the volcano plot, where p is the p-value from the standard two-sample t-test.

By default, the estimated fdr isolines are smoothed and cropped to the convex hull of the observed test statistics by using akima. This is entirely a graphical pre-processing step which produces smoother isolines and enforces sanity at the edges of the observed distribution; it does not change the estimated fdr at all. This graphical smoothing is controlled via the argument `nr.plot`, which specifies the grid size, with lower values resulting in stronger smoothing. In order to suppress graphical smoothing, set `nr.plot` to zero.

Note that the test statistics and the fdr for the volcano- and tornado plots are not computed from scratch, but rather through transformation of the original results. Specifically, the isolines in these plots are also transformed; this has the unfortunate side effect that the labelling of isolines in these plots is not nearly as pretty as the standard provided by `contour`. This functionality is currently not available outside of `contour`, and our implementation in `DrawContourlines` frankly leaves a lot to be desired. We apologize for the inconvenience.

## Value

The original `x`, invisibly.

A. Ploner

## References

Ploner A, Calza S, Gusnanto A, Pawitan Y (2005) Multidimensional local false discovery rate for micorarray studies. Submitted Manuscript.

`fdr2d`, `DrawContourlines`
 ```1 2 3 4 5 6 7 8 9``` ```# Create res2d example(fdr2d) par(mfrow=c(2,2)) plot(res2d, main="Generic plotting") Volcanoplot(res2d, df=length(grp)-2, main="Volcano plot", label=TRUE) Tornadoplot(res2d, main="Tornado plot", label=TRUE) # This is without graphical smoothing plot(res2d, main="Generic plotting, raw", nr.plot=0) ```