average.fdr {OCplus} | R Documentation

## Average a two-dimensional local false discovery rate

### Description

This function averages two-dimensional local false discovery rates as computed by `fdr2d` for binned values of the first test statistic and across the values of the second test statistic. The result can easily be plotted and should be comparable to the one-dimensional fdr as provided by `fdr1d`, provided that the smoothing parameters were chosen suitably.

### Usage

    average.fdr(x, breaks)

### Arguments

`x` | an object returned by `fdr2d`.
`breaks` | breaks defining intervals into which the first test statistic is binned; by default the same values that were used by `fdr2d`.

### Details

Assuming that we have smoothed the estimate suitably and have chosen the proportion of non-dffierentially expressed genes suitably, we should get very much the same results from `fdr2d` as from `fdr1d` when we average across the logarithmized standard errors, see Examples.

The averaging is done across the estimated values for the actual genes; this corresponds to a weighted mean of the smoothed estimates on a grid, where the weight is proportional to cell frequencies.

Note that it is usuually easier to get a good match in the tails of the curves than in the center, which is okay, as this is where we want to estimate the fdr reliably.

### Value

A matrix with two columns `tstat` and `fdr.local`.

### Author(s)

A. Ploner

### References

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

### See Also

`fdr2d`, `fdr1d`

### Examples

    # Create res1d
    example(fdr1d)

    # Compute fdr2d using the p0
    res2d = fdr2d(xdat, grp, p0=p0(res1d))

    # Show it
    par(mfrow=c(2,1))
    plot(res1d, main="fdr1d and averaged fdr2d")
    lines(average.fdr(res2d), col="red")
    plot(res2d, grid=TRUE, main="fdr2d is averaged across columns")

[Package OCplus version 1.68.0 Index]